PetriP-TNT
Member
any suggestions on what to check out and keep an eye on?
For creating a portfolio / CV site or in general?
any suggestions on what to check out and keep an eye on?
Bit of both, i'd like to use some new things to build it with, should've said that in my first post. ^^For creating a portfolio / CV site or in general?
Part of the reason this works on mobile is because of the "touchend" event on html. This is when your finger leaves the touchable area of the web page, and in this case it closes the popovers. Click and touch events are similar but behave slightly differently, and this code assigns the close event to both. "Html" is equivalent to the document or the root element of the page. Events bubble up, so if you have html > body > div > a the <a> will trigger a touch event, then the <div> that contains it, then the <body> and then the <html>. So html will capture all events but what this code is doing when it finally triggers the event on html is asking "was the top-most element that was clicked the popover?" If yes then you clicked the popover and we don't want to close it, otherwise close it.
Thanks! Will check out React. Made some tutorials with Angular couple of months ago, but didn't manage to finish it on a level that i can actually use it, due to work.I've used Angular and React, and I still enjoy using React. I'd suggest trying that.
So to leverage this conversation, it sounds like I'll be moving to an Angular 2 project coming up. Mostly a new section with new code. I really don't understand why they chose Angular 2, we haven't used it and they do very little of their own front-end so it's not a maintenance thing either. I'm guessing it has to do with them currently using Angular 1 but since they'd need to modify their code to upgrade the existing portions it doesn't seem there is any benefit to it and I'm personally tepid on using something marked as "beta". I'm not sure how set on this path they are but if anyone would like to chime in with pros and cons it might help drive our conversations with them.
Have a laugh people!
Are you actively searching for a new job? Because you should be
Oh christ I remember you, you still work there???
Have a laugh people!
Have a laugh people!
The solution he came up with?
He wants a page, hidden from the navigation tree of the project (because SECURITY!!), containing a simple textarea where he can write his queries and have them executed directly on the production DB.
Let it sink in.
Yup!
I'm using react to render sliders where the min is 0 and max is 225 but uh. The values aren't changing.
class Foo extends React.Component {
constructor() {
this.state = {value: 0};
}
handleChange(event) {
this.setState({value: event.target.value});
}
render() {
return <input type="range" min="0" max="255" value={this.state.value} onChange={this.handleChange.bind(this)} />
}
}
So, due to a high motivation thanks to the new year, a few weekends of regular sleep and all posts in here about the hot stuff in web dev, i'm thinking of building a little portfolio/cv site. Nothing big, just the usual details about me, and the projects i did in my various jobs.
Now i fear, i might lose the motivation when i start digging through all frameworks, etc. ... therefor ... any suggestions on what to check out and keep an eye on?
I'm curious. Do you guys make things like sliders, or do you just use whatever open source tool you can find?
I'm curious. Do you guys make things like sliders, or do you just use whatever open source tool you can find?
How about just stock native web? http://caniuse.com/#feat=input-range
Supporting dead browsers or obnoxious styling is something to avoid if you're able.
Yeah, you can take "just what's needed" in theory, but it's seldom done... How many login pages have been done that load bootstrap's whole JS and styles when they're just actually using the .form stuff Oh my bandwidthTo be fair you can customize your own Bootstrap build... but I never see anyone do that because it's so much easier to just to point to the CDN and forget about it.
I think by "slider" it was meant "slideshow". As for dead browsers, clients decide for you most of the time :/
Yeah, you can take "just what's needed" in theory, but it's seldom done... How many login pages have been done that load bootstrap's whole JS and styles when they're just actually using the .form stuff Oh my bandwidth
/bootstrap-rant
Yeah so every time it comes up I feel like I'm on a mission. Bootstrap is bad when taken as a whole in places where tiny parts of it only are needed. You need its grid? Sure! You need its slider? Great! But chances are you don't need slider, grid, a fucking tone of styles, navigation and the Bible in typographic rules. Bootstrap is great for prototypes and quickly-built back offices. It's also, as Kalnos just pointed out, a great resource in which to learn good front-end patterns.
In general practice the CDN is actually the better way to go as it will cache and given how pervasive bootstrap is it's likely they already have it. Rehosting is generally not useful but people do it anyway, I guess in the very unlikely scenario the CDN goes down.
And as always, I'll come back at that and say that Bootstrap is uberly customizable, well scaling and overall very flexible framework that is great for prototypes and big production type apps and websites a like.
Most likely you won't need everything it offers (all 200 kilobytes of it), but if you are just dumping it in as a whole the convenience it offers most likely triumphs over the things you saved looking for that 1kb grid system and perfect modal popup and okay-ish something else. If you know what you are doing, you can always cherry pick the parts that you absolutely need. And I am not saying it's something every project needs either, but the "great for prototypes and quickly-built back offices" parts irks me to hell.
In my experience, Bootstrap is for one of three situations:
1. You're building a site where the design doesn't matter
2. You're a backend developer, not a frontend developer
3. You're a designer, not a frontend developer
I have never needed a grid, I have never needed pre-built components (barring a datepicker here and there, which I'd get on its own via 400 other options, not something like bootstrap). I've been building CSS elements from scratch for almost 20 years, these kind of things honestly slow me down more than help me out.
If there's a spec that's "make an admin site" with zero design direction, fine, drop boostrap in there and let it look like bootstrap. But if your project is designed to look like it looks like, rather than like bootstrap, it's just not worth it.
Again, just in my experience.
(I've never understood this "use Bootstrap because it's responsive" claim either, I just straight-up don't know what it means. Design components aren't responsive, actual site designs are responsive. Bootstrap is not a design. When you have a layout that needs to stretch and break, I don't know what Bootstrap offers me here that writing a breakpoint myself doesn't.)
In general practice the CDN is actually the better way to go as it will cache and given how pervasive bootstrap is it's likely they already have it. Rehosting is generally not useful but people do it anyway, I guess in the very unlikely scenario the CDN goes down.
And as always, I'll come back at that and say that Bootstrap is uberly customizable, well scaling and overall very flexible framework that is great for prototypes and big production type apps and websites a like.
Most likely you won't need everything it offers (all 200 kilobytes of it), but if you are just dumping it in as a whole the convenience it offers most likely triumphs over the things you saved looking for that 1kb grid system and perfect modal popup and okay-ish something else. If you know what you are doing, you can always cherry pick the parts that you absolutely need. And I am not saying it's something every project needs either, but the "great for prototypes and quickly-built back offices" parts irks me to hell.
* { box-sizing: border-box }
For some reason I thought local storage would be hard to use and I didn't check out how to use it. Now I had to change the login page to our application to show the user's name and avatar on the next visit. The avatar would probably be too big to go in a cookie and I don't want to build a service that returns user info before you log in (preventing probing for usernames by generating fake avatars would help, but it still feels wrong).
So I decided to check out localStorage. Super easy! 5/5 will use again
Opinion question: How do people feel about starting a reset.css with
Code:* { box-sizing: border-box }
since this should be the sensical default anyway.
Me, too. First thing I add to a new (S)CSS file.I've been doing that lately.
Is it a controlled component? You'll want to change the value of `value` with a change handler
Code:class Foo extends React.Component { constructor() { this.state = {value: 0}; } handleChange(event) { this.setState({value: event.target.value}); } render() { return <input type="range" min="0" max="255" value={this.state.value} onChange={this.handleChange.bind(this)} /> } }
https://facebook.github.io/react/docs/forms.html#controlled-components
You can also use uncontrolled components, in which case use defaultValue instead of value, otherwise your component is stuck at the value.
I'm using a change handler.
Opinion question: How do people feel about starting a reset.css with
Code:* { box-sizing: border-box }
since this should be the sensical default anyway.
is the latest chrome messing with anyone else's flexbox stuff?
https://twitter.com/josericaurte/status/692889447361216512
is the latest chrome messing with anyone else's flexbox stuff?
https://twitter.com/josericaurte/status/692889447361216512