Live data from Hacker News

Rails 6.1

weblog.rubyonrails.org

61–70 of 87 posts

Re: Rails 6.1

#61
post #35

Earlier quoted context omitted.

I was sold on hey.com's UI design already because it's using for dropdown menus. The really fun part, though: the summary content isn't just a menu icon, it's a trigger for some (currently unpublished) Turbolinks variant. The menu content is loaded (and subsequently 304'd) dynamically as a server-rendered partial (sans layout). Most tellingly, if you visit the menu content's XHR URL with regular browsing then hey.com…

> Especially so since I have a mission to replace all my dropdown & modal boilerplate with and elements, and I like to build services that still work if JS is disabled. Can you elaborate on why ` ` is specifically exciting to you?

You can try inspecting dropdown or button that shows modal on Github.com, they are using it all over the places.

Re: Rails 6.1

#62
One of my favorite characteristic of Rails community is there is less to non-existence of superiority of paradigm nonsense. Since I switched to other languages/frameworks, discussion around Slack/forum is plenty of non-realworld usage .. great engineering (without user interaction). It's painful when you want to ship, not only to play.

Rails is full of libs for building real business. Github and Shopify 's engineers are around, this contributes great sense of realword usage. Features extracted from that are battle-tested.

Bonus is DHH is still involving since he loves programming anyway, and he is a great communicator, spicy tweets on HTML CSS keeps the web sane .. from those madness.

Re: Rails 6.1

#63

Earlier quoted context omitted.

>Ruby 3 Oh shit, I didn't realize that that's the scheduled Christmas release. Finally, all strings frozen by default!

Ruby 3.0 will not have frozen strings by default: https://bugs.ruby-lang.org/issues/11473#note-53

I still can't believe they changed their mind about this. It's the cause of so many bugs and security issues.

Re: Rails 6.1

#64
I'm hoping for vuejs and rails tie together. As a previous rails developer I never loved backbone angular or react but felt at home with vuejs and am jealously watching the laravel community embrace vue

Re: Rails 6.1

#65

Hey, sorry for the aside - I am a Rails developer since Rails 4ish and we are running Rails 5 at work. I'm using Rails 6 for my own projects and in these side projects, I've been having a huge hell of a time trying to grok "right ways" to do things with webpacker/webpack. I seem to encounter issues every single time with deploys to Heroku because of precompilation issues, or imports not running right. But tutorials g…

Hey, I'm a JS dev who's been splashing around in rails for the past year or so. I'm happy to help! I just had a similar issue this morning, and I asked in the Ruby on Rails Link slack [1]. They're pretty helpful in there.

For what it's worth, my issue was that Heroku was running `rake assets:precompile` without node_modules being installed. This was because `yarn install` failed. I looked closely at the logs and saw an error about the yarn file needing to be updated (the lockfile pins exact versions). So I ran `yarn install` locally to update it, redeployed, and it worked. So far I've been able to use node modules with sprockets this way just fine (in JS and Sass). Webpack-generated JS bundles work well too. Anyway, happy to help in there, just tag me :)

[1] https://www.rubyonrails.link/

Re: Rails 6.1

#66
post #35

Earlier quoted context omitted.

I was sold on hey.com's UI design already because it's using for dropdown menus. The really fun part, though: the summary content isn't just a menu icon, it's a trigger for some (currently unpublished) Turbolinks variant. The menu content is loaded (and subsequently 304'd) dynamically as a server-rendered partial (sans layout). Most tellingly, if you visit the menu content's XHR URL with regular browsing then hey.com…

> Especially so since I have a mission to replace all my dropdown & modal boilerplate with and elements, and I like to build services that still work if JS is disabled. Can you elaborate on why ` ` is specifically exciting to you?

It works without Javascript, which means a few things.

Firstly, for customers; it works behind asset-blocking insane corporate firewalls, or for some poor schmuck in the sticks getting one bar of cell data and just enough to load our HTML, or simply to impress anyone running uBlock₀ in Advanced mode.

Secondly; because front-end Javascript bitrots faster than any code I've ever seen in four decades in tech. Reducing the quantity of JS in favour of letting the browser just do its job, is one of the best investments I can make against technical debt. JS can't be abandoned completely, but I measure every kilobyte jealously, and graceful degradation to baseline browser behaviour is my north star; simply using baseline browser behaviour is by definition my optimum limit for long-term productivity.

Thirdly; for folks depending on assistive browsing technologies. Yes, they do work in the face of dynamic web pages & SPAs, but many screen readers are still at their best when tabbing through plain HTML with a sprinkling of ARIA markup.

Finally, it's also a simple yet versatile mechanism. Good for anything from FAQ items to dropdown menus, even with default styles.

Re: Rails 6.1

#67
post #6

It's a really nice time to be a Ruby / Rails developer. Rails itself has made some really nice improvements with this release and there is also the "NEW MAGIC" should be following in the next couple of days which is currently being sold as what Rails was to the back end, this will be to the front end. Ruby 3 is also just a few days away which brings optional type checking to helps add some additional structure to lar…

I’m so glad the pendulum seems to be swinging back to sensible server side based web dev that embraces the web and layers in dynamic front end behavior when needed. Most sites need a small amount of JS. Some benefit from quite a bit more, and for that there are things like Stimulus. And maybe you need a ton and it needs to work offline and manage a ton of local state - for that there are the usual SPA suspects. But those are and should be outliers.

The fact that “let’s use React with a JSON API Backend” is becoming much less the default is a very good thing. Web dev went into a dark time for awhile there and I’m hopeful we are coming out of it.

Re: Rails 6.1

#68
post #10

>Error Objects Active Model’s errors are now objects with an interface that allows your application to more easily handle and interact with errors thrown by models. The feature was implemented by lulalala and includes a query interface, enables more precise testing, and access to error details. This has been in the work since Rails 5.x and I believe Lulalala extracted it from his work on Gitlab. And it was lot of har…

I'm out of the loop. what is New Magic?

[deleted]

Re: Rails 6.1

#69
post #64

I'm hoping for vuejs and rails tie together. As a previous rails developer I never loved backbone angular or react but felt at home with vuejs and am jealously watching the laravel community embrace vue

Hey, feel free to check out https://github.com/matestack/matestack-ui-core and see if that's your jam :) Rails+Vue.js pretty tightly coupled!

Re: Rails 6.1

#70
post #53

Earlier quoted context omitted.

Personally, I stay away from that entire bag of brain damage and do the asset pipeline with Sass and plain ES5 Javascript.

What's supposed to be the big win mixing webpack and Rails over, say, creating a separate React/Vue app and a Rails API? Webpack seems to slow-down the whole edit/view cycle which is pretty snappy in vanilla Rails.

Completely agree, I run a Rails 6 app which provides a JSON API. This is then used by Create React App app running in the /clients folder at the root of the Rails application folder. Keeps it separated nicely.
Post reply on HN