-
Notifications
You must be signed in to change notification settings - Fork 10
Start decaffeination of codebase #758
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
* Init coffee TODO list (for conversion) * Show number of lines in coffee TODO list * Sort list according to number of lines in coffee files * Remove import_manuscript.coffee * Replace deprecated location.reload(true) with cache busting * Delete error.coffee * Replace subscription swatch coffee by JS * Replace location.reload() in identify.coffee * Decaffeinate update for answers (in lecture edit mode) * Decaffeinate delete_edge * Delete new.coffee * Decaffeinate default target update in quiz * Decaffeinate cancel edit tags (erdbeere) * Decaffeinate display_info (for erdbeere) * Decaffeinate edit tags * Decaffeinate delete_account modal rendering * Decaffeinate cancel_edit tutorials * Add watch out for section * Decaffeinate validate certificate (tutorials) * Decaffeinate cancel edit assignment * Decaffeinate cancel_import_media (Reset button) * Decaffeinate cancel_action as tutor (e.g. move to another tut) * Decaffeinate cancel_edit_correction (as tutor) * Decaffeinate validate quiz certificates (as tutor) * Decaffeinate new vertex (in quiz) * Delete render_sidebar * Decaffeinate late submission accept * Decaffeinate reject submission (as tutor) * Decaffeinate refresh_token (for submissions as tutor) * Add 😭 emoji
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.
Pull Request Overview
This PR aims to start the decaffeination of the codebase by updating various JavaScript and ERB components for improved functionality and consistency. Key changes include:
- Updating UI behavior on multiple views (e.g., toggling subscriptions, updating media and tag forms)
- Introducing a cache-busting reload function and integrating it into the application
- Adjusting ESLint configuration to incorporate new import ordering and globals
Reviewed Changes
Copilot reviewed 39 out of 48 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
app/views/profile/toggle_thread_subscription.js.erb | Adds a jQuery statement to toggle a subscription switch state |
app/views/notifications/destroy_all.js | Introduces a call to reload the page without cache |
app/views/media/cancel_import_media.js.erb | Updates media cancellation UI by modifying DOM elements |
app/views/erdbeere/edit_tags.js | Toggles visibility for tag editing UI elements |
app/views/erdbeere/display_info.js.erb | Adjusts display of information for "erdbeere" components |
app/views/erdbeere/cancel_edit_tags.js | Reverses tag editing UI changes |
app/views/assignments/cancel_edit.js.erb | Replaces assignment rows in the UI using updated partial rendering |
app/views/answers/update.js.erb | Collapses an answer UI element after an update |
app/assets/javascripts/reload.js | Implements a cache-busting URL reload function |
app/assets/javascripts/application.js | Integrates the reload function into the main application script |
.config/eslint.mjs | Reorders imports and adds a global for the reload function |
Files not reviewed (9)
- .vscode/settings.json: Language not supported
- app/views/answers/update.coffee: Language not supported
- app/views/assignments/cancel_edit.coffee: Language not supported
- app/views/erdbeere/cancel_edit_tags.coffee: Language not supported
- app/views/erdbeere/edit_tags.coffee: Language not supported
- app/views/lectures/render_sidebar.coffee: Language not supported
- app/views/media/cancel_import_media.coffee: Language not supported
- app/views/media/import_manuscript.coffee: Language not supported
- app/views/profile/toggle_thread_subscription.coffee: Language not supported
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.
LGTM. Fell free to resolve the one comment as you like.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #758 +/- ##
======================================
Coverage ? 54.25%
======================================
Files ? 171
Lines ? 7364
Branches ? 0
======================================
Hits ? 3995
Misses ? 3369
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is to tackle #698 in the long-term. This PR was already once reviewed in the form of PR #732, but didn't find it's way into
dev
at that time. Meanwhile, further progress was made on the branchcoffee/more
, but that is something for another PR.