Skip to content

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

Merged
merged 3 commits into from
Apr 17, 2025
Merged

Start decaffeination of codebase #758

merged 3 commits into from
Apr 17, 2025

Conversation

Splines
Copy link
Member

@Splines Splines commented Apr 16, 2025

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 branch coffee/more, but that is something for another PR.

Splines and others added 2 commits January 3, 2025 22:27
* 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
@Splines Splines requested a review from Copilot April 16, 2025 07:51
@Splines Splines self-assigned this Apr 16, 2025
Copy link

@Copilot Copilot AI left a 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

@Splines Splines temporarily deployed to testing-review April 16, 2025 08:01 — with GitHub Actions Inactive
Copy link
Collaborator

@fosterfarrell9 fosterfarrell9 left a 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.

Copy link

codecov bot commented Apr 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (dev@c52a6c4). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Splines Splines merged commit 64fba87 into dev Apr 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants