view_component
cypress-rails
Our great sponsors
view_component | cypress-rails | |
---|---|---|
74 | 5 | |
3,145 | 313 | |
1.2% | 1.6% | |
9.0 | 6.7 | |
6 days ago | 2 months ago | |
Ruby | Ruby | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
view_component
- Things I wish I knew before moving 50K lines of code to React Server Components
-
Supercharged table component built with ViewComponent
When searching for examples of table components built with the ViewComponent gem, I was surprised to find none. After some inquiries, I came across examples that worked like this:
-
More expressive APIs for View Components
View components offer two primary ways to interact with the component: passing arguments to the initializer and using slots:
- Have you been using ViewComponent. What advantages do you see in it?
-
How can I integrate VueJS into a rails 7 application? What is the workflow?
For example, splitting out views into partials? Or the new ViewComponent feature that's becoming quite popular - https://viewcomponent.org/
- Helpers vs Components
-
Vanilla Rails view components with partials | Stanko K.R.
I used to do "pure ruby" approach to that -- but basically wound up realizing I was re-inventing github's view_component. Their design goals were similar enough to what I was trying to do, that it made more sense just to use that, rather than try to re-invent it myself.
-
Gnarly Learnings from March 2023
ViewComponent
- Os benefícios de componentizar as views do Rails
-
Does anyone kind of miss simpler webpages?
The linked one is my Rails implementation, written for ViewComponent. The official version uses Nunjucks.
cypress-rails
-
What Cypress E2E testing has taught us about our code
We use Cypress alongside cypress-rails and Cypress Testing Library.
-
Tip: if you're changing all your form_for to form_with, take the opportunity to make sure all forms are being tested.
To piggyback: This would be a type of browser test, so you would want to use something like Cypress (https://github.com/testdouble/cypress-rails) or Capybara (https://github.com/teamcapybara/capybara). RSpec has a good integration with Capybara. Cypress is JS-based so it will require some additional config.
-
Rails, Cypress : testing the whole stack is definitely easier
Now a very good news : integrating Cypress to Rails is really simple, because there's already a gem for that. Thanks to the amazing work of the teamdouble team. Their corresponding GitHub repository is here.
-
April: Forem Twitch Events Roundup 👾
Some of the links mentioned in the stream: Forem end-to-end docs Cypress documentation Making your UI tests resilient to change by Kent C. Dodds Forem’s use of Cypress in GitHub Cypress Rails Test Automation University
-
Rails 7 : an (imagined) preview
There's already a tool that perfectly handles this kind of test : Cypress. Why not a gem based on Cypress, that would replace entirely the default system tests stack ? So far, I am very happy with this gem : https://github.com/testdouble/cypress-rails/
What are some alternatives?
Stimulus - A modest JavaScript framework for the HTML you already have
ComfyJS - Comfiest Twitch Chat Library for JavaScript | NodeJS + Browser Support
turbo-rails - Use Turbo in your Ruby on Rails app
egghead-next - The frontend for egghead.io.
Tailwind CSS - A utility-first CSS framework for rapid UI development.
Open-Source-Ruby-and-Rails-Apps - Awesome Ruby and Rails Open Source applications 🌈
hotwire-rails - Use Hotwire in your Ruby on Rails app
forem - For empowering community 🌱
i18n-tasks - Manage translation and localization with static analysis, for Ruby i18n
digital-gardeners - Resources, links, projects, and ideas for gardeners tending their digital notes on the public interwebs
Ruby on Rails - Ruby on Rails
GreenSock-JS - GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web