|
Pollyanna posted:I'm tempted to just roll my eyes and say "whatever" at the people who want natural language forms exactly like https://www.ladderlife.com/get-quote and https://havenlife.com/term-life-insurance-quote.html and are unquestioningly pushing for us copying them down to the letter. I'm not a UX/UI designer, but I still feel like being THAT restrictive on things like date input might just annoy users. But, I'm also getting pushback on a PM over this (I don't know who else is in charge of design, user acceptance, etc. for this subject) who is really in the tank for it, so vv It'd be less effort and headache for me to just go with it, even if users end up disliking it. If I came across a site that used a form like that, I'd roll my eyes so hard the world would end.
|
# ? Jan 30, 2017 22:30 |
|
|
# ? May 22, 2024 07:24 |
|
ddiddles posted:If I came across a site that used a form like that, I'd roll my eyes so hard the world would end. Essentially those forms are for branding, not ux. they're supposed to be friendly conversations with your new buddy ol' pals the insurance company. Of course your buddy ol' pal the insurance company is anything but, which is why they make these forms.
|
# ? Jan 31, 2017 00:03 |
|
I don't think it's that bad really. They both provide a clear visual partition between text and input, there are placeholders so you know what kind of data it expects, and the input is in full english sentences so for more domain-specific input you can get a clearer picture of what it means from the sentence it is contained within (also if you do it right then it might be helpful for ESL speakers by being given more context instead of one word, if you phrase it the right way). edit: I'm also not sure what's bad about having a restrictive date format. piratepilates fucked around with this message at 00:42 on Jan 31, 2017 |
# ? Jan 31, 2017 00:40 |
|
I read this article today about Angular's new versioning. Seems quite loopy to me: https://ilikekillnerds.com/2016/12/angular-2-team/
|
# ? Jan 31, 2017 16:31 |
|
Plavski posted:I read this article today about Angular's new versioning. Seems quite loopy to me: https://ilikekillnerds.com/2016/12/angular-2-team/ I don't think It's too bad really: http://angularjs.blogspot.com/ quote:AngularJS for any 1.x release, and Angular for any 2+ release. "Angular 1.x" has been AngularJS since the beginning. Genpop as always trimmed out JS out of convenience. But AngularJS is the actual product name. The new product is just Angular, but they had to keep 2 in the name to differentiate. Considering 1.x vs. 2.x are in no way compatible it really is a completely separate product. They could have rebranded, perhaps even should have, but that's its own can of worms.
|
# ? Jan 31, 2017 20:56 |
|
Anyone here done much with GraphQL? I haven't really paid much attention to it since it came out, since I mostly build my backend projects with Python...but it looks like there a nice library for it now. Just from reading a bit this afternoon it looks like a nice alternative to REST APIs.
|
# ? Jan 31, 2017 21:05 |
|
Thermopyle posted:Anyone here done much with GraphQL? I haven't really paid much attention to it since it came out, since I mostly build my backend projects with Python...but it looks like there a nice library for it now. I really like Netflix's falcor lib for that sort of stuff. I found the GraphQL syntax really annoying.
|
# ? Feb 1, 2017 01:41 |
|
I like graphql's syntax but it gets annoying when you use the Relay spec with all these nodes and edges. I just want articles and authors. I played around with it on a Django backend, and it seemed to work well except for the ability to optimize queries with select_related and prefetch_related to avoid the n+1 query problem
|
# ? Feb 1, 2017 05:19 |
|
Munkeymon posted:JFC what a poo poo stupid design but hey that's Google and therefore Android for you. It's the same in Windows and in one of the more popular Bootstrap Datepicker libraries as well. It's a pretty common UI feature to click/tap on "thing you want to change". I agree the discoverability is poor but turning it into some weird anti-Google/Android thing is a little weird since it's not specifically a Google/Android thing by any stretch.
|
# ? Feb 1, 2017 06:19 |
|
The Wizard of Poz posted:It's the same in Windows and in one of the more popular Bootstrap Datepicker libraries as well. It's a pretty common UI feature to click/tap on "thing you want to change". I agree the discoverability is poor but turning it into some weird anti-Google/Android thing is a little weird since it's not specifically a Google/Android thing by any stretch. I'm not aware of a Windows-universal datepicker? IIRC the Windows Phone one looks a lot like the iOS one, both of which seem fine, as did the old Android one - I forget what they called the black with neon blue lines design. Also, there are two year fields in that control but only one of them changes when you jog the month and it's not the one you can tap to change the year but rather the one above the much bigger 'reset to today' button that's not at all visually distinct from that reset button, so, yeah, that design is bad. I might be too quick to blame all of Google, but I think their reputation deserved and I'm glad it looks like they're at least trying to turn it around. This was a backslide, though, and a really frustrating one when you have to test a form that's supposed to validate that the user is over 18
|
# ? Feb 1, 2017 15:08 |
|
Munkeymon posted:Using an actual type="date" to enter a birthday is currently a bad idea because the Android date control only lets you jog one month at a time, defaults to the current date and is really easy to set to the current date (accidentally press any of the green part at the top of the overlay in the image below!), so any adult is going to have to tap a stupid button 200+ times to get anywhere near their birthday. Why don't you take the spinner approach?
|
# ? Feb 1, 2017 19:39 |
|
Mindisgone posted:Why don't you take the spinner approach? Because there's one built in and rolling my own is usually worse in that case.
|
# ? Feb 1, 2017 20:22 |
|
Goons please share your experiences with Jest. I'm thinking of putting some time into it.
|
# ? Feb 3, 2017 19:51 |
|
gently caress this field. I have to relean everything I learned about Webpack, which wasn't much, becuase of Webpack 2. So now I'm trying to do the most basic of things, but of course, tutorials are either "hello world" or "here's a giant multi-page website using 17 other technologies". All I want is it to compiles SASS, which of course it's ignoring. I was following this, until I actually tried to follow it. webpack --watch works, but when I try npm run build it has a bunch of errors*. Why? because gently caress me, I guess? I'm sure by the time I figure out where I went wrong in literally copy/pasting a tutorial Webapack To be fair, the tutorial is 4 days old, so I'm sure it's completely out of date and useless now. * code:
|
# ? Feb 3, 2017 22:02 |
|
Are you writing ES6? The first two lines of your error message tell you what messed up. It came across a back tick character it didn't like on line 74, which is used for template strings in ES6.
|
# ? Feb 3, 2017 22:09 |
|
ddiddles posted:Are you writing ES6? I dunno, am I? I only say it that way because I'm just following the linked tutorial I see ` in app.js code:
If the back-tick is what it is complaining about, why did webpack --watch work but npm run build not work? Also, more rhetorical: Why would the tutorial be written in such a way that it won't work even if you follow it? I'm sorry I ranted earlier (again) I feel "old", like everything is moving too fast and I can't catch up.
|
# ? Feb 3, 2017 22:22 |
|
The Merkinman posted:I'm sorry I ranted earlier (again) I feel "old", like everything is moving too fast and I can't catch up.
|
# ? Feb 3, 2017 22:25 |
|
It does kind of suck, but I also feel like it's not all churn for the sake of churn...technologies are getting better. I've not done much frontend work in a few months...I just know I'm going to have to spend a day catching back up with whats going on on my next front end project.
|
# ? Feb 3, 2017 22:27 |
|
Kekekela posted:Goons please share your experiences with Jest. I'm thinking of putting some time into it. I've tried it several times... https://twitter.com/tivac/status/798402354596970497 https://twitter.com/tivac/status/800796474334285827 https://twitter.com/tivac/status/811108589448237056 It's ok, now that they've got easier single-process mode I keep meaning to loop back around on it. Never got around to trying out the snapshot stuff. Tivac fucked around with this message at 23:55 on Feb 3, 2017 |
# ? Feb 3, 2017 23:53 |
|
The Merkinman posted:I dunno, am I? I only say it that way because I'm just following the linked tutorial Use semi-colons you madman edit: my theory is that webpack might have uglifyjs built in to compress the bundles .js file, and uglifyjs might just support ES5 instead of ES6, so unless you have BabelJS or something similar compiling your code to ES5, UglifyJS has no idea what a backtick is or what to do with it. If that's correct then `webpack --watch` probably builds a development version of the file that isn't minified through uglifyjs, so there's no parsing error since uglifyjs never touches it, `npm run build` just calls `webpack -p` (I took a look at that tutorial's example repo, in package.json at the root) which seems to be a production build that will call uglifyjs and blow up. If that's correct then you either don't have babel, you don't have it set up right, or you don't have it configured in webpack right so it doesn't compile it to ES5. edit: if all of this is true then that'll be pretty funny, since most browsers support 99~% of ES6 features at this point, so you wouldn't even need BabelJS if it weren't for UglifyJS piratepilates fucked around with this message at 00:58 on Feb 4, 2017 |
# ? Feb 4, 2017 00:15 |
|
The Merkinman posted:I dunno, am I? I only say it that way because I'm just following the linked tutorial I've seen some odd behaviors and github issue slapfights over -p and now just do something like for my build: code:
edit: Also, and maybe I'm just tired here, but it seems weird that uglify is working on bundle.js, as when its part of the build chain for me its showing errors in the source files not the bundle.js. I guess it could just use source maps for that though. Kekekela fucked around with this message at 01:37 on Feb 4, 2017 |
# ? Feb 4, 2017 01:24 |
|
The Merkinman posted:I dunno, am I? I only say it that way because I'm just following the linked tutorial As dumb as it is, use ' instead of ` it appears your fancy single open quote is causing the compiler to poo poo itself.
|
# ? Feb 4, 2017 06:03 |
|
I started a React app, and I want to use a custom Javscript file with just plain Javascript and use a script tag in the index.html file. This is very difficult for me in React. I keep getting a syntax error as an unexpected "<" I haven't even written any React code yet, but I can't even get this to work? How do you write a JS file in React?
|
# ? Feb 4, 2017 21:36 |
|
Grump posted:I started a React app, and I want to use a custom Javscript file with just plain Javascript and use a script tag in the index.html file. What build tool are you using?
|
# ? Feb 4, 2017 21:44 |
|
Grump posted:I started a React app, and I want to use a custom Javscript file with just plain Javascript and use a script tag in the index.html file. Is there some specific reason you want to do that? React is pretty opinionated about where it wants code.
|
# ? Feb 4, 2017 23:12 |
|
Grump posted:I started a React app, and I want to use a custom Javscript file with just plain Javascript and use a script tag in the index.html file. You just put the script tag in your html. It doesn't have anything to do with React. That being said, you probably shouldn't do this and include your js via an import so webpack or whatever can bundle it for you.
|
# ? Feb 4, 2017 23:14 |
|
Grump posted:I started a React app, and I want to use a custom Javscript file with just plain Javascript and use a script tag in the index.html file. I also answered you in the other thread you asked this in.
|
# ? Feb 5, 2017 01:22 |
|
yeah I figured it out. I was originally importing the script into the component, as it should be, but I had onClick functions that were supposed to be hiding/showing a form, and that part should have been built into the component, rather than outside of it. I'm dumb. The thing has been working all day, and I didn't even realize it.
|
# ? Feb 5, 2017 01:43 |
|
I'm finally getting an opportunity to establish a "styleguide" for a project I'm working on. It's making me appreciate SCSS all the more, including breaking things up into different partials, calculating dimensions (not talking about calc(), but the #{} convention) based on constants, not to mention @mixins. Oh @mixins, how do I love thee? Let me count the ways...
|
# ? Feb 5, 2017 02:48 |
|
Grump posted:yeah I figured it out. I was originally importing the script into the component, as it should be, but I had onClick functions that were supposed to be hiding/showing a form, and that part should have been built into the component, rather than outside of it. Not sure if your example up there is what you are talking about, but mixing jQuery and React without a firm understanding of how React handles DOM is a recipe for headaches. If the two don't interact in any way on your page, go nuts though.
|
# ? Feb 5, 2017 03:28 |
|
Lumpy posted:Not sure if your example up there is what you are talking about, but mixing jQuery and React without a firm understanding of how React handles DOM is a recipe for headaches. If the two don't interact in any way on your page, go nuts though. Sounds like you've never experienced the bliss of working in a giant SPA that is jQuery BBQ wrapped by Angular, with a dash of React thrown in (using both Flux and Redux of course).
|
# ? Feb 5, 2017 03:29 |
|
Helicity posted:Sounds like you've never experienced the bliss of working in a giant SPA that is jQuery BBQ wrapped by Angular, with a dash of React thrown in (using both Flux and Redux of course). I think you have to commit a small genocide to reach that level of Hell.
|
# ? Feb 5, 2017 03:47 |
|
Helicity posted:Sounds like you've never experienced the bliss of working in a giant SPA that is jQuery BBQ wrapped by Angular, with a dash of React thrown in (using both Flux and Redux of course). Doesn't Angular use jQuery light, or if jQuery is present sort of absorb its powers?
|
# ? Feb 5, 2017 04:18 |
|
TheCog posted:Doesn't Angular use jQuery light, or if jQuery is present sort of absorb its powers? It does not USE it, so much as it has a built in jqLite library. If jQuery is already loaded, jqLite will not be. However, the main point is that the major feature modern SPA frameworks provide is managing the DOM for you, so you should be trying to let the framework do that, and not jumping in and out with jQuery and other manual DOM manipulation unless absolutely necessary. Skandranon fucked around with this message at 19:48 on Feb 5, 2017 |
# ? Feb 5, 2017 06:58 |
|
I guess the DOM manipulation part of it isn't even the horrible part - it's the lack of orthogonality. Unit testing BBQ state that drives jQuery widgets is nearly impossible, and we've got 50-75 widgets consisting of 300-1000 lines of code each. It took 8 dev days just to cleanly remove the dead BBQ code because it was so tangled up with other, important things. As much as I get annoyed with Abramov's lackadaisical approach to Redux at times, I am really glad that he and others are recognizing and promoting the value of concepts that have been around forever, but have typically been absent from the JavaScript world. Event sourcing is a key example.
|
# ? Feb 5, 2017 16:04 |
|
Another React-Redux question. Is there a reason you have to make a component handle its own state and when to update vs. just passing down props and dispatching parameterized actions for when global state needs to be updated? Forms in particular are kind of confusing to me, and that's where the majority of our weirdass code lives since our app is basically an overgrown form with some API calls. My fellow dev and I are getting really frustrated with the wonky, un-Redux-like code that our forms use because all the tutorials and documentation we read use and advocate for approaches wildly different from what we have in our codebase, so we don't feel like we're learning properly enough to contribute. It's getting a bit dire.
|
# ? Feb 5, 2017 19:48 |
|
Lumpy posted:Not sure if your example up there is what you are talking about, but mixing jQuery and React without a firm understanding of how React handles DOM is a recipe for headaches. If the two don't interact in any way on your page, go nuts though. Yeah I'm only using a bit of Jquery to handle a form submission and pushing the input of a form to an array. And then I'm importing that script to the form component. My only issue I've been having is that I'm hiding/showing form based on state and I'm having problems getting the script to run correctly after the button to render the form is clicked. I understand that the script isn't running because it can't find #addform on the page because <Form/> hasn't been rendered yet, but I don't get why it won't work after <Form/> has been rendered. My logic: code:
code:
code:
|
# ? Feb 6, 2017 03:28 |
|
Maybe do your form logic in an onSubmit attribute on the form element instead? It would couple your components to state, but probably that's what needs to be done in this case. This is were redux might help for managing state or in other words the list of Persons.
|
# ? Feb 6, 2017 04:00 |
|
Pollyanna posted:Another React-Redux question. Is there a reason you have to make a component handle its own state and when to update vs. just passing down props and dispatching parameterized actions for when global state needs to be updated? Forms in particular are kind of confusing to me, and that's where the majority of our weirdass code lives since our app is basically an overgrown form with some API calls. React and forms are not simple yet. I'm not sure I understand the question - Redux encourages a single global state, but you can have local state in your components. There is nothing forcing either approach or preventing a mix of the two. Although I don't like the overhead of local state in components, I tend to prefer the encapsulation it provides when doing forms. My global state doesn't need to track when someone types something into a field. Grump posted:Yeah I'm only using a bit of Jquery to handle a form submission and pushing the input of a form to an array. And then I'm importing that script to the form component. For starters, there's no reason to use jQuery for what you're doing. Besides not being terribly useful (http://youmightnotneedjquery.com/) it looks like you're trying to mix event binding and DOM manipulation with jQuery and how React works. That's going to be incredibly painful. Just fully embrace React. You've got that jQuery file and that Form component coupled in a weird way. Move the binding of the submit event into your Form component so it gets bound then the component is rendered. Right now, document ready is firing, you're binding to a jQuery selector that evaluates to nothing, and then when you actually mount your component of course nothing will be bound to it. Ultimately, you'll need a better way to manage your state. You can roll your own, but it's not fun. Flux is over-complicated. Redux is currently the go-to way for managing state in React. I'd highly recommend using React and Redux together. Before you hop into Redux, look around for a few 10-15 minute explanations of Event Sourcing. Once you generally understand event sourcing, you'll understand why Elm was written the way it was, and why Redux copied Elm. Don't fight the architecture or you'll be in pain. If you want to think of it in a Redux way, I'd create a function to get values out of the form and create a new Person, and bind an action creator to the submit event that dispatches an action called 'addUser'. Your list shouldn't be a var just hanging out in the scope of that one module with jQuery stuff, your Redux store should have a 'users' property that you expose via selector aptly named 'getUsers'. Once you're at that point, you can start struggling with validation and whether to track form state globally or locally. I'd probably suggest global state for beginners as the performance hit shouldn't be noticeable, and it's way easier to manage. luchadornado fucked around with this message at 04:15 on Feb 6, 2017 |
# ? Feb 6, 2017 04:11 |
|
|
# ? May 22, 2024 07:24 |
|
Pollyanna posted:Another React-Redux question. Is there a reason you have to make a component handle its own state and when to update vs. just passing down props and dispatching parameterized actions for when global state needs to be updated? Forms in particular are kind of confusing to me, and that's where the majority of our weirdass code lives since our app is basically an overgrown form with some API calls. In a Redux based app, React components should rarely hold their own state, and if they do, it should almost always related to some visual property that only that component or its children care about. There are a few forms libraries out there, I've used redux-forms with success, but I haven't used any others to know if it's the go-to solution these days.
|
# ? Feb 6, 2017 12:10 |