-
Notifications
You must be signed in to change notification settings - Fork 29
refactor: Move Sprocket JS files to Webpack (Part 1) #3025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
795e570
to
ad943d2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3025 +/- ##
=======================================
Coverage 70.08% 70.08%
=======================================
Files 215 215
Lines 6850 6850
=======================================
Hits 4801 4801
Misses 2049 2049 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ad943d2
to
12f21d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you migrate these exact files first? Are they somehow connected or is it because you did not have to make any adjustments to them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the "independent" files color_mode_picker.js
and flash.js
(originating from lib
), why did you decide to mingle them within the sprocket_asset_import
folder rather than finishing the migration exemplary for them?
@christophblessing |
@MrSerth @christophblessing I didn't move the CSS at this point. It still is in the lib folder. I didn't want to integrate CSS changes here. |
Thanks for your answer. I am not fully convinced of your argumentation yet. For example, when looking at the
Mh, I see. What is your long-term plan for CSS, then? |
Well the event listener is my concern here. It is very coupled to application behavior. There might be reasons to keep this file in some kind of lib folder; however, there is not really a reason to create a lib folder for one file.
I am not sure at the moment. |
@MrSerth I want to move forward with this. Surely keeping this in the lib folder cannot be that important. |
Thanks for confirming we are on the same page. I didn't expect you'd be waiting for me here, currently. I thought there would be a response to the long-term migration strategy involving CSS, some progress with finishing the migration of the two former "lib" files, or some update on your planned research on the Webpack loading order or other details in this discussion of Part 2. That being said, I don't mind much of the folder, despite thinking that mingling parts of these "not-so-close" files together with the main application logic isn't completely desirable. |
JavaScript for RfCs, Flashes and the color mode can be moved without modifications. Relates to #3021
ddb6a43
to
721f80e
Compare
Thanks for the feedback. I went ahead and moved the CSS files into the app directory. Work on the Webpack will happen in the next steps. |
The `tubo:load` event is faster than the migration event. The color changing requires no sprocket code and can be controlled without the migration event. This removes the flickering in dark mode when navigating the page. This change is possible because the theme-changing logic was moved to Webpacker and loads before Sprockets. Please see #3025 Related to #3040
JavaScript for RfCs, Flashes and the color mode can be moved without
modifications.
Confirmed features:
Relates to #3021