|
Is using a directive's link function to tack the DOM element to the scope the least bad way to get it to the controller? (moving this from the 'Modern' thread because Angular 1.5 is officially old, probably)JavaScript code:
|
# ? Nov 3, 2017 15:09 |
|
|
# ? Jun 6, 2024 05:37 |
|
How often do you guys use Git Fetch? I'm still in the process of learning the differences between Git Pull and Git Fetch and it seems like the only real difference is that you can review merge changes before you merge them with Git Fetch, correct?
|
# ? Nov 3, 2017 16:30 |
|
Grump posted:How often do you guys use Git Fetch? Every time, but I don’t like being thrust into conflict resolution either via rebase or merge Grump posted:I'm still in the process of learning the differences between Git Pull and Git Fetch and it seems like the only real difference is that you can review merge changes before you merge them with Git Fetch, correct? Yes. Also useful if you have a fork or have multiple remotes you’re fetching from.
|
# ? Nov 3, 2017 17:21 |
|
I've always used Fetch
|
# ? Nov 3, 2017 17:56 |
|
When I open the website I'm working on in Android and try and open the camera to take a picture to attach to a post, the browser crashes. I have remote DevTools enabled for Chrome on my computer but all I get is "DevTools was disconnected from the page". Is there a way to get more information on the issue from remove DevTools or from within Android itself?
|
# ? Nov 3, 2017 17:58 |
|
I can't remember the last time I used git fetch.
|
# ? Nov 3, 2017 18:01 |
|
Gotcha. After using it a bit, it defintiely seems helpful.
|
# ? Nov 4, 2017 05:43 |
|
Thermopyle posted:I can't remember the last time I used git fetch. I don't think I've ever used git fetch. Off to the docs I go. Hi-Ho.
|
# ? Nov 4, 2017 16:54 |
|
Git pull is like git fetch + merge. So, pull pulls whatever and merges it into your current branch. You'd use fetch when you don't want the merge step. For my workflows I basically never don't want the merge step, so it's always git pull for me. Thermopyle fucked around with this message at 17:38 on Nov 4, 2017 |
# ? Nov 4, 2017 17:36 |
|
I'm probably quite late to the party but I only recently discovered Jackbox and it inspired me to try and create a similar 'local multiplayer use-your-smartphone' type trivia game. Basically
The thing is my experience in web dev has been pretty much exclusively Apache/MySQL/PHP so I'm not entirely sure how I'd go about doing this, especially the 'push questions to player devices' part. I mean, I could create a php page to pick a question from a bank of questions, but then each client device would have to refresh the page each time there was a new question. The only sort-of guide I could find was this article on Medium but it doesn't go into a lot of detail, I don't know any AngularJS and hadn't heard of Firebase. I'm not sure I want to be signing up for hosting services for something I planned to do as a bit of fun. Ideally what I'd like to achieve is the demo shown in that article but I think I might be a bit out of my depth here. Is an application like this doable in nodejs? Should I be learning how to use nodejs first before jumping into a project like this?
|
# ? Nov 4, 2017 17:42 |
|
You just need websockets here, not all of what node provides. As you're already familiar with PHP, it might be best to take your first shot using PHP with things like Amp or React. In fact, you could probably get away with using the Amp "Getting Started" tutorial and modifying it from there to use websockets instead.
|
# ? Nov 4, 2017 18:57 |
|
Anybody used CSS containment? I found a use for it, but seems more of a hack on flexible layouts. If I take a rather dumb HTML block that uses relative positioning everywhere, when I make an update the entire region repaints: Using CSS contain I can limit the repaint cost: However I had to set a width and height on the time, which leads to almost just jumping over to absolute positioning to get the same benefit.
|
# ? Nov 4, 2017 22:53 |
I use git fetch whenever I want to refresh the list of all the new branches that are on origin, which I need to do a lot in a CI/CD setup.
|
|
# ? Nov 6, 2017 11:17 |
|
McGlockenshire posted:You just need websockets here, not all of what node provides. As you're already familiar with PHP, it might be best to take your first shot using PHP with things like Amp or React. In fact, you could probably get away with using the Amp "Getting Started" tutorial and modifying it from there to use websockets instead. Thanks. I had a look at the Amp "Getting Started" tutorial and I think I'm in a bit over my head here. While I'm familiar with PHP I've not really done anything with networking/sockets/streams :/
|
# ? Nov 6, 2017 11:25 |
|
MrMoo posted:Anybody used CSS containment? I found a use for it, but seems more of a hack on flexible layouts. Nope, but I've never done anything the size of a billboard, either. Are you tweaking the live board daily now or is this a different one?
|
# ? Nov 6, 2017 14:56 |
|
That thing is eight monitors in portrait and is quite taxing on animating the ticker smoothly. As nVidia is awesome we already have to render the board rotated 90° for performance. The major problem I have is quantifying performance to gauge if any change makes things better or worse. So if nVidia requires a rotated video buffer does that mean there is a performance difference on the gigantic WebGL ticker? I'm developing on Intel hardware which is better behaved and consistent , usually working on something worse than production helps highlight bottlenecks but it runs pretty well. MrMoo fucked around with this message at 15:32 on Nov 6, 2017 |
# ? Nov 6, 2017 15:20 |
|
nexus6 posted:Is an application like this doable in nodejs? Should I be learning how to use nodejs first before jumping into a project like this? If you were to go the Node route, I'd highly suggest using Glitch to prototype it. They have some great starter apps for multiplayer games. https://glitch.com/~multiplayer-game There's also this tutorial (2015) about how to turn your phone into a controller: https://tutorialzine.com/2015/02/smartphone-remote-control-for-presentations
|
# ? Nov 6, 2017 16:45 |
|
Nybble posted:If you were to go the Node route, I'd highly suggest using Glitch to prototype it. They have some great starter apps for multiplayer games. https://glitch.com/~multiplayer-game Thanks, I'll check these out.
|
# ? Nov 8, 2017 14:59 |
|
MrMoo posted:That thing is eight monitors in portrait and is quite taxing on animating the ticker smoothly. As nVidia is awesome we already have to render the board rotated 90° for performance. The major problem I have is quantifying performance to gauge if any change makes things better or worse. So if nVidia requires a rotated video buffer does that mean there is a performance difference on the gigantic WebGL ticker? Thinking about it, that kinda makes sense because the normal workload is to render 'down' like that.
|
# ? Nov 8, 2017 17:03 |
|
NGINX configuration question! I have a React app sitting in front of a Django backend. For reasons, there are a couple Django URLs users need to access directly (and see views rendered by Django) in addition to needing all my api/* requests proxied. Currently my config looks something like so: code:
What I want / need to have happen is: All the URLs behind certain paths (ex: /api/*, /accounts/*, /whatever/*) are proxied to Django. All other URLs are attempted to be served directly (like my try_files does now) and served if found. Every other case should serve the same index.html file without any 301 or URL rewriting. After much googling, I think I want to do something like so: code:
Lumpy fucked around with this message at 18:00 on Nov 10, 2017 |
# ? Nov 10, 2017 17:38 |
|
Lumpy posted:NGINX configuration question! I recently ventured into nginx as well (I'm more familiar with tomcat and apache) to proxy two different servers and start prototyping some microservice architecture (with react and springboot). My config wasn't too different - I had two paths, just one to one server and one to another. I'm just using a tomcat instance and a new springboot-based Rest API. Overall I think you're on the right path. nginx, so far for me, has been deceptively simple and one of my sys admins even checked over it and said it looked solid. If you look at Apache's by comparison it too, if you're familiar with the setup and syntax isn't much different unless you want to do some really advanced things. code:
It's completely transparent to the user and works really well. It's also pretty simple to maintain. Keep and eye on the proxy timeout settings. If something is slow and it's not setup, nginx might return an error even tho the server is still rendering the request. A version very similar to above is sitting on our production servers and proxying traffic from NoVA to Tokyo and is extremely fast. edit: keeps adding bbcode to the urls. geeves fucked around with this message at 00:43 on Nov 11, 2017 |
# ? Nov 11, 2017 00:38 |
|
Lumpy posted:Does this look sane? Is there a better way to do this? I'm only amateur-level at nginx, but it seems ok to me. I think I'd ask in the linux thread maybe?
|
# ? Nov 11, 2017 02:41 |
|
Lumpy posted:Does this look sane? Is there a better way to do this? It seems reasonable looking at it. I mean, there's no other way to handle a mixed namespace where some routes go to Django and some go to file handling. Often with a traditional site with assets it would be the /static & /media location that would get whitelisted for filehandling whilst Django or whatever proxy-pass gets everything else, but in this case you need to/have decided to whitelist the Django routes instead whilst assuming everything else is try-files or the base-index (the SPA).
|
# ? Nov 11, 2017 03:12 |
|
Anyone have tips on how to implement a Bootstrap 2 sub-menu type thingy (http://getbootstrap.com/2.3.2/components.html#dropdowns - see: Submenus in Dropdowns) in Bootstrap 3? I make such bad assumptions about features included in things... Why on earth would something like submenus get depricated?
|
# ? Nov 13, 2017 22:49 |
|
Newf posted:Anyone have tips on how to implement a Bootstrap 2 sub-menu type thingy (http://getbootstrap.com/2.3.2/components.html#dropdowns - see: Submenus in Dropdowns) in Bootstrap 3? Because they're bad UX and are especially miserable on mobile
|
# ? Nov 14, 2017 00:49 |
|
camoseven posted:Because they're bad UX and are especially miserable on mobile My ultimate goal is to get rid of Foundation since there's literally nothing else on the site that uses it. However, I'm not sure how best to replace/code a dropdown menu in a way that is easy to use on mobile. Is there any kind of consensus on how to handle something like this?
|
# ? Nov 14, 2017 00:55 |
|
camoseven posted:Because they're bad UX and are especially miserable on mobile Heaven forbid anyone make a website for desktops. Anyhow, I've jigged something up where my menu items pop a popover containing a listgroup. It's a real eyesore. Yay.
|
# ? Nov 14, 2017 05:51 |
|
Lol at the blanket “drop downs are bad UX”. Really for any mobile feature the two most important things are ease of tapping and ease of dismissal. If you take the ... menu on a Facebook post for example, I️ like that all the options are easy to tap and I️ can swipe to dismiss (obviously a native app luxery). I️ think something that spans 100vw and has a close button at the bottom is ideal.
|
# ? Nov 14, 2017 13:21 |
|
Nested dropdown menus can gently caress right off, on desktop, mobile or otherwise
|
# ? Nov 14, 2017 19:22 |
|
The Dave posted:Lol at the blanket “drop downs are bad UX”. No one said this. Sedro posted:Nested dropdown menus can gently caress right off, on desktop, mobile or otherwise This is the correct opinion.
|
# ? Nov 14, 2017 19:49 |
|
Sedro posted:Nested dropdown menus can gently caress right off, on desktop, mobile or otherwise Amazon does a pretty good job of it with their "Departments" drop down. Of course they've got a lot of UI/UX testing and engineering going on. http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown
|
# ? Nov 14, 2017 20:07 |
|
camoseven posted:No one said this. That's fair, I completely misread the posts since I was train-reading. My apologies.
|
# ? Nov 14, 2017 20:19 |
|
I feel like I'm making some real dumb React newbie mistakes with ReactCSSTransitionGroup. Can anyone tell me what I'm messing up here? I have my App component which has the child component Welcome. App's render looks like this: code:
Within Welcome, my render looks like this: code:
Finally, here's the CSS: code:
|
# ? Nov 15, 2017 00:23 |
|
What's your current version now? You should probably be moving onto https://reactcommunity.org/react-transition-group/ which is an extracted library. That has a different behaviour but is a little more amenable to customisation.
|
# ? Nov 15, 2017 00:53 |
|
The latest. I'll give that a shot if it's The New Hotness. However I'd still be interested in hearing what I've done wrong so I can at least learn something from my mistakes.
|
# ? Nov 15, 2017 00:59 |
|
kedo posted:The latest. I'll give that a shot if it's The New Hotness. Honestly css based animations are always a bit fraught to break, I'd start off by checking that the classes are actually getting added by slowing things right down and observing your states. See what's going on.
|
# ? Nov 15, 2017 01:03 |
|
kedo posted:The latest. I'll give that a shot if it's The New Hotness. I'm not sure what ReactCSSTransitionGroup does, but IDK how it could animate an element when you're telling React not to render that element at all (because it's undefined in your app container when pageState is training). Maybe it's supposed to do some magic to work around that, but that's what it looks like to me.
|
# ? Nov 15, 2017 15:19 |
|
Maybe a better question is this: how would ya'll recommend I apply transitions to component on mount/unmount? My immediate goal is to apply a simple transition animation, eg. fade in when it mounts and fade out before it unmounts. Some googling pointed me towards miscellaneous transition group libraries and I landed on the one that has a page in React's main documentation.Munkeymon posted:I'm not sure what ReactCSSTransitionGroup does, but IDK how it could animate an element when you're telling React not to render that element at all (because it's undefined in your app container when pageState is training). Maybe it's supposed to do some magic to work around that, but that's what it looks like to me. My understanding is that it's supposed to defer the unmount by X milliseconds (set by the timeout) so that it can run its animation before it unmounts.
|
# ? Nov 15, 2017 15:54 |
|
kedo posted:Maybe a better question is this: how would ya'll recommend I apply transitions to component on mount/unmount? My immediate goal is to apply a simple transition animation, eg. fade in when it mounts and fade out before it unmounts. Some googling pointed me towards miscellaneous transition group libraries and I landed on the one that has a page in React's main documentation. The key thing is that you can't mount / render a TransitionGroup directly. It has to be inside something. This is what I do for my loading screen and it works just ducky: JavaScript code:
|
# ? Nov 15, 2017 16:42 |
|
|
# ? Jun 6, 2024 05:37 |
|
Lumpy posted:
|
# ? Nov 15, 2017 16:49 |