Closed HipsterBrown closed 1 year ago
Thanks for the feedback! Related to the deployment question:
When you deploy your application to production, the css:build task attaches to the assets:precompile task to ensure that all your package dependencies from package.json have been installed via yarn, and then runs yarn build:css to process your stylesheet entrypoint, as it would in development. This output is then picked up by the asset pipeline, digested, and copied into public/assets, as any other asset pipeline file.
https://github.com/rails/cssbundling-rails#css-bundling-for-rails
It should "just work" 🤞
Summary
Fixes https://github.com/orgs/Betterment/projects/10?pane=issue&itemId=21046385
This PR is an exploration to replace the vendored style_closet gem with a documented, out of the box design system that integrates well with Rails.
Other Information
As part of this exploration, stylesheet processing is handed off to cssbundle-rails using dart-sass, replacing the sass-rails gem. This provides the latest Scss syntax and ability to pull in styles from npm, i.e.
@primer/css
and@primer/view-components
.With the adoption of ViewComponents and Primer, there is further optimization available to create components for existing abstractions, like the Info Card, and replace simple_form with a more accessible alternative like view_component-form.
I chose not to migrate the JS processing to jsbundling-rails since it was not required to adopt Primer or ViewComponent.
If this feels like too much to do in a single PR, it should be possible to take a more incremental approach by:
This branch can serve as a blueprint for what the final result might look like.
/domain @Betterment/test_track_core
Screenshots:
![Screenshot 2023-03-03 at 16-33-41 Test Track Admin](https://user-images.githubusercontent.com/3051193/222839078-a8ec13ca-aefd-4d4b-9d6c-70b40c1ed9d7.png)