|
I think a lot of javascript bashing is pretty silly but it does kind of suck that in the span of half an hour we all just got recommended four different third party libraries for dealing with Date/Time functions.
|
# ? Nov 30, 2017 17:56 |
|
|
# ? Jun 10, 2024 11:36 |
|
prom candy posted:I think a lot of javascript bashing is pretty silly but it does kind of suck that in the span of half an hour we all just got recommended four different third party libraries for dealing with Date/Time functions. Counterpoint: Dates and times are awful in all languages.
|
# ? Nov 30, 2017 18:00 |
|
True but at least we can converge on one set of awful tools
|
# ? Nov 30, 2017 18:02 |
|
Munkeymon posted:Mutability weirdness. https://www.npmjs.com/package/js-joda is the better one IIRC
|
# ? Nov 30, 2017 18:21 |
|
Capri Sun Tzu posted:Can you go into a little more detail? I've got a few projects using moment that I might look at switching over. I would use moment again if I had to, but I would be a lot more strict in how I use it considering it's pretty easy to get tripped up by functions which modify in-place vs return which moment likes to have. I would avoid moment if I could avoid using any time date lib at all.
|
# ? Nov 30, 2017 20:17 |
|
Capri Sun Tzu posted:Can you go into a little more detail? I've got a few projects using moment that I might look at switching over. Does https://momentjs.com/docs/#/manipulating/utc-offset/ mutate the original? Can you be sure without setting up an example and scrutinizing everything in the debugger? Can you tell I've been there and done that
|
# ? Nov 30, 2017 20:25 |
|
I use moment, but the other thing I do is aggressively avoid ever touching the transport format until the absolute last moment (hah), so most of what’s travelling around my app are ISO format strings until I need to format them for human consumption or calculate against them. Feels like a reasonable policy at least. Wouldn’t mind trying out a proper immutable date library.
|
# ? Nov 30, 2017 22:26 |
|
Munkeymon posted:Mutability weirdness. https://www.npmjs.com/package/js-joda is the better one IIRC Besides immutability, JSJoda is also nice if you work with Java/Scala/Kotlin as its implementation matches Joda Time (it's being written by the same author) which became Java's official java.time package as of Java 8. There's still a lot to be completed with JSJoda, however it is still a great library.
|
# ? Dec 1, 2017 04:34 |
|
I'm looking to make a switch from Chrome to FFox as my default working browse, anyone got some list of really useful extensions for frontend work? Cookie editors, or maybe some DOM change inspectors and auditors? What's a good way to log/audit and see async or deferred scripts in action? I want to test an hypothesis where I load a Preact bundle after the initial DOM is loaded, with a placeholder for the eventual component to latch onto, and see the performance differences.
|
# ? Dec 4, 2017 14:19 |
|
Posting in appreciation of js-joda. It's got a few, what feels like, weird ways of going about things if you're trying to calculate a specific date or time. But it is infinitely clearer in practice than a similar solution provided by moment. Moment does internationalisation though.
|
# ? Dec 4, 2017 17:33 |
|
I haven't really paid attention to front-end development since 2010 or so and getting back into it now is pretty mind-blowing. Just trying to set up webpack to do more than basic stuff reminds me really strongly of modding a Bethesda game, spending two days trying to get all the crap working together and zero time of actually playing the game. Setting up webpack to serve your css is like a few seconds of googling plus writing code but I still haven't figured out how to make it do transformation from Sass AND not inject it directly into the bundle. I think their official docs are pretty poo poo because even though they have sections on individual loaders a lot of times it's hard to understand exactly what is the specific loader doing. Anyway, I work as a tech writer/information developer we got buttload of C/C++ files with doc blocks plus some texts written in Markdown which right now need to get commited to git, compiled by running a job in Jenkins and then depending on the purpose for example commited to git of our website and ran through another Jenkins job. While the pipeline could definitely be improved and is something I already brought up, I just wanted to do away with compiling the files that contain most of the text, that is the markdowns. My proof of concept is a very basic SPA that just loads a JSON file telling the app of the different versions of our docs in different directories. Each of those has another JSON file that has the table of contents with filenames. I use that to build the sidebar menu and the files are just loaded directly via JavaScript and injected into a page. Tell me if I'm completely dumb.
|
# ? Dec 4, 2017 19:55 |
|
I am a complete idiot when it comes to responsive design. Like I know how to leverage bootstraps grid system but beyond that I am helpless. Does anyone have any go-to bog-standard responsive design stuff I can look into. I am thinking about making a family friend a website for their business but I don't want it to suck dick and while I consider myself pretty good at layout/style/design I am still poo poo at responsiveness.
|
# ? Dec 4, 2017 20:23 |
|
lordfrikk posted:My proof of concept is a very basic SPA that just loads a JSON file telling the app of the different versions of our docs in different directories. Each of those has another JSON file that has the table of contents with filenames. I use that to build the sidebar menu and the files are just loaded directly via JavaScript and injected into a page. You're doing everything the modern way. Which is to serve a static page that loads what it needs via JSON and then dynamically builds the DOM live on the client side. It sounds like you're on the right track if you're a hipster.
|
# ? Dec 5, 2017 15:35 |
|
I'm at a weird time in my life where I cannot decide between having lots of spinners for all the different things that load everywhere. Or whether there should be one single spinner somewhere always at the same place on the page. Then just have a value that counts up and down the number of different things that are loading to decide whether the spinner should be spinning.
|
# ? Dec 5, 2017 15:39 |
|
Nolgthorn posted:I'm at a weird time in my life where I cannot decide between having lots of spinners for all the different things that load everywhere. Or whether there should be one single spinner somewhere always at the same place on the page. Then just have a value that counts up and down the number of different things that are loading to decide whether the spinner should be spinning.
|
# ? Dec 5, 2017 15:58 |
|
Nolgthorn posted:I'm at a weird time in my life where I cannot decide between having lots of spinners for all the different things that load everywhere. Or whether there should be one single spinner somewhere always at the same place on the page. Then just have a value that counts up and down the number of different things that are loading to decide whether the spinner should be spinning. The latter would annoy me. Why can't I see and interact with the chunks that are loaded and ready?
|
# ? Dec 5, 2017 15:59 |
|
Nolgthorn posted:a value that counts up and down the number of different things that are loading I think you may have just reinvented the loading bar?
|
# ? Dec 5, 2017 16:15 |
|
Knifegrab posted:I am a complete idiot when it comes to responsive design. Like I know how to leverage bootstraps grid system but beyond that I am helpless. Does anyone have any go-to bog-standard responsive design stuff I can look into. I am thinking about making a family friend a website for their business but I don't want it to suck dick and while I consider myself pretty good at layout/style/design I am still poo poo at responsiveness. Make your window 320px wide and add your content. Make it look good. Then, make your window wider and wider until things look stupid. There’s your first breakpoint. Add css in media queries until it stops looking stupid. Now make your window wider and wider, and if it looks stupid again, decide if you want another breakpoint or just a max width. Congratulations, you are a responsive wizard!
|
# ? Dec 5, 2017 17:27 |
|
Don't forget to add specific media queries for elements that don't line up properly, the "it's only this time" rule, and then have a cascade of unmanageable css files
|
# ? Dec 5, 2017 17:53 |
|
Doom Mathematic posted:I think you may have just reinvented the loading bar? I like the idea of websites using a permanent loading bar across the top of the page, that empties when there are things to load. I also think web browsers should do a similar thing or replace the need for on-page spinners/loading bars altogether. Embrace the modern skinny jeans web, Chrome.
|
# ? Dec 5, 2017 18:19 |
|
Nolgthorn posted:I like the idea of websites using a permanent loading bar across the top of the page, that empties when there are things to load. I also think web browsers should do a similar thing or replace the need for on-page spinners/loading bars altogether. I'm not searching for it now, but UX studies have shown those page top loading bars are confusing for users for some reason. A single spinner located somewhere on the page indicating that something somewhere on the page is also confusing for the user. Proximity to whatever content is loading is important.
|
# ? Dec 5, 2017 18:22 |
|
Thermopyle posted:I'm not searching for it now, but UX studies have shown those page top loading bars are confusing for users for some reason. Probably because the browser has a universal 'this thing is loading' indicator already? It's like when a design includes a back button in the page. Why? What the gently caress is that supposed to do that isn't already done for us? quote:A single spinner located somewhere on the page indicating that something somewhere on the page is also confusing for the user. Proximity to whatever content is loading is important. This is also important for accessibility. The indicator has to be as close as possible to or inside the thing you just interacted with to cause it to appear.
|
# ? Dec 5, 2017 18:43 |
|
As we move further into the realm of static pages that download dynamic content after they load, the loading indicator in the browser has become somewhat irrelevant. Even just loading js/css assets is gone now, as those are often loaded dynamically too. We're one step away from images being loaded the same way video is... or maybe a script downloads it, displays after it loads.
|
# ? Dec 5, 2017 19:39 |
|
Munkeymon posted:It's like when a design includes a back button in the page. Why? What the gently caress is that supposed to do that isn't already done for us? The answer I get every time I ask in response to the request to add one is that users aren't used to clicking on anything not on the web site. Which is stupid and of dubious truthfulness. Then they ask that the cancel button the page function a reset button since now there's a back button. Nolgthorn posted:We're one step away from images being loaded the same way video is... or maybe a script downloads it, displays after it loads. Isn't that basically what infinite scrolling sites like Pintrest do?
|
# ? Dec 5, 2017 20:51 |
|
My team has been up to some sneaky stuff in our company and we ended up with an open-source React component library. I'd love to get some feedback on it or even some Github stars if you like it: https://mineral-ui.com https://github.com/mineral-ui/mineral-ui
|
# ? Dec 7, 2017 22:13 |
|
I'm starting to learn some JavaScript with NodeJS right now, and when I'm good with the backend stuff I'm going to move on to some frontend framework/library. So which do I go with? I'm looking between Vue, Angular and React. Vue seems like the simplest to get going with, but I dunno? What do you lot think?
|
# ? Dec 7, 2017 22:43 |
|
-Anders posted:I'm starting to learn some JavaScript with NodeJS right now, and when I'm good with the backend stuff I'm going to move on to some frontend framework/library. We lot tend to recommend one of those three. Personally I love React + Redux for state management, but any of the three are solid. But pick React.
|
# ? Dec 7, 2017 22:56 |
|
Vue is probably the easiest to pick up, React is the most currently marketable, and Angular is fairly well established. I'd also go with React.
|
# ? Dec 7, 2017 23:09 |
|
I've had some fun with Aurelia. But I'm also making myself learn React...
|
# ? Dec 7, 2017 23:13 |
|
If job listings are anything to go buy, you want React.
|
# ? Dec 7, 2017 23:52 |
|
It's me, I'm the idiot using Angular
|
# ? Dec 8, 2017 02:08 |
|
Black Is Black posted:My team has been up to some sneaky stuff in our company and we ended up with an open-source React component library. I'd love to get some feedback on it or even some Github stars if you like it: Why'd you guys decide to do this, and what sets it apart from other component libraries? We have good in-house designers at my agency but I'd really love to start new projects from some kind of common component library instead of having to build buttons from scratch every time we start a new project. "Hey designer, what do you want for the focus state on this button" is a conversation I'm kind of tired of having. Edit: Follow up question for the thread: what tools do you use to collaborate with your designers? Do they write any code? How do you get them thinking in a component/interactive mindset if they design using tools like Sketch?
|
# ? Dec 8, 2017 06:26 |
|
prom candy posted:Why'd you guys decide to do this, and what sets it apart from other component libraries? We have good in-house designers at my agency but I'd really love to start new projects from some kind of common component library instead of having to build buttons from scratch every time we start a new project. "Hey designer, what do you want for the focus state on this button" is a conversation I'm kind of tired of having. In my development, I like to take the approach of throwing poo poo at a canvas and seeing what sticks. I don’t even think most of my coworkers know what a focus state is. disclaimer: my core job function is warehousing data and analytics
|
# ? Dec 8, 2017 06:30 |
|
Thanks for the advice on frameworks. Sounds like react is the way to go. Udemy was having a sale so I purchased a few courses on there, for all the three major frameworks so I can read up on whatever I need.
|
# ? Dec 8, 2017 09:14 |
|
-Anders posted:Thanks for the advice on frameworks. Sounds like react is the way to go. Udemy was having a sale so I purchased a few courses on there, for all the three major frameworks so I can read up on whatever I need. Definitely get a solid understanding of Javascript (ES6) first though. Don't just dive into a framework immediately. That will make you a developer with bad habits.
|
# ? Dec 8, 2017 11:41 |
|
Grump posted:Definitely get a solid understanding of Javascript (ES6) first though. Don't just dive into a framework immediately. That will make you a developer with bad habits. Oh don't worry, this is for later. I just wanted to pick up some training courses while they were on sale for the holidays. So far I'm pretty good with stuff like getting stuff in/out with JSON, using arrow functions for anonymous functions. Later today I'll have a go at async/await, just following along a pretty good course. It's primarily aimed at node.js, but all the entirely basic stuff like what functions are for and conditionals I know from earlier so that's a breeze so far. -Anders fucked around with this message at 12:25 on Dec 8, 2017 |
# ? Dec 8, 2017 12:18 |
|
-Anders posted:Oh don't worry, this is for later. I just wanted to pick up some training courses while they were on sale for the holidays. One thing I’ve found very helpful was to mess with arrays and object hashes, because while the contents can be the same, manipulating them effectively requires different treatment. Then, once you feel the pain of doing it correctly, introduce functions from lodash which solve these problems entirely. Screeps is pretty good for this, actually. I never really got into it, but I did walk away with better programming skills, even from a brief stint.
|
# ? Dec 8, 2017 14:04 |
|
prom candy posted:Edit: Follow up question for the thread: what tools do you use to collaborate with your designers? Do they write any code? How do you get them thinking in a component/interactive mindset if they design using tools like Sketch? They don't write code, with the exception of modifying CSS via Stylus. That helps them play around with global changes before even giving it to us in Dev. Getting into the component mindset I think was largely from a push from the UX team here. Start with basic things like h1 then up to button, eventually going to custom elements. Maybe letting them know it'll be more consistent from a brand standpoint will help? Has there been any particular pushback? Sketch has "libraries" so it is possible to do components in Sketch.
|
# ? Dec 8, 2017 14:50 |
|
The designer/product owner I work with - same person - uses Zeplin and sometimes gives me Sketch files, but doesn't give me any actual hard numbers - she expects me to extrapolate it from the designs themselves, and then comes back with a list of (tweaks i.e. pixels and font sizes) to be made after I put the PR up (or the equivalent of a PR in our case). Tickets inevitably take longer to complete as a result I don't know what the proper way to work with a non-technical designer is for a web developer who touches CSS, Javascript, and numbers. If only Zeplin/Sketch had the sizes, fonts, etc. embedded in them - but then wouldn't it just be CSS?
|
# ? Dec 8, 2017 15:42 |
|
|
# ? Jun 10, 2024 11:36 |
|
Pollyanna posted:The designer/product owner I work with - same person - uses Zeplin and sometimes gives me Sketch files, but doesn't give me any actual hard numbers - she expects me to extrapolate it from the designs themselves, and then comes back with a list of (tweaks i.e. pixels and font sizes) to be made after I put the PR up (or the equivalent of a PR in our case). Tickets inevitably take longer to complete as a result The designer/product owner being the same person seems like its own issue...
|
# ? Dec 8, 2017 15:58 |