Skip to content

chore: Remove erb templete requirments from editor#2964

Closed
arkirchner wants to merge 4 commits into
mainfrom
ak/remove_some_js_erb
Closed

chore: Remove erb templete requirments from editor#2964
arkirchner wants to merge 4 commits into
mainfrom
ak/remove_some_js_erb

Conversation

@arkirchner

Copy link
Copy Markdown
Contributor

Configurations can be suppied to JavaScript with data attributes. This simplifies the JavaScript migration to Webpack.

@arkirchner arkirchner self-assigned this Jun 13, 2025
@arkirchner arkirchner added the javascript Pull requests that update Javascript code label Jun 13, 2025
@arkirchner arkirchner force-pushed the ak/remove_some_js_erb branch from d3f2a89 to 51e2447 Compare June 13, 2025 20:37
@arkirchner arkirchner marked this pull request as ready for review June 13, 2025 20:38
@codecov

codecov Bot commented Jun 13, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.55%. Comparing base (df3ae19) to head (f14cdff).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2964      +/-   ##
==========================================
- Coverage   69.60%   69.55%   -0.05%     
==========================================
  Files         214      214              
  Lines        6820     6823       +3     
==========================================
- Hits         4747     4746       -1     
- Misses       2073     2077       +4     

☔ 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.

@arkirchner arkirchner marked this pull request as draft June 13, 2025 21:28

@MrSerth MrSerth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already made a few comments before you switched to the draft, so please find them below.

Thanks for working on moderninzing the assets. I think the initiative is good, but would also recommend on focussing on some aspects before opening up too many topics and PRs in parallel.

Comment thread app/assets/javascripts/editor/editor.js.erb
Comment thread app/assets/javascripts/editor/participantsupport.js
Comment thread app/views/layouts/application.html.slim Outdated
@arkirchner arkirchner force-pushed the ak/remove_some_js_erb branch from 51e2447 to 16380ef Compare June 16, 2025 08:47
Configurations can be suppied to JavaScript with data attributes.
This simplifies the JavaScript migration to Webpack.
@arkirchner arkirchner force-pushed the ak/remove_some_js_erb branch from 16380ef to 3599da6 Compare June 16, 2025 08:58
@arkirchner arkirchner marked this pull request as ready for review June 16, 2025 09:19
Comment thread app/helpers/application_helper.rb Outdated
@arkirchner arkirchner force-pushed the ak/remove_some_js_erb branch from 106fffc to f14cdff Compare June 16, 2025 16:58
@@ -1,5 +1,5 @@
doctype html
html lang=I18n.locale data-default-locale=I18n.default_locale
html lang=I18n.locale *html_data_attributes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After we got the other parts right here, I am returning to my previous question regarding the gloabl scope.

Previously, you wrote:

The JavaScript needs this when the page loads. I don't want to make too large changes to JavaScript at the moment.

Some of the data attributes are not needed when the page loads, but can also be parsed later, I'd say. Rather than touching this part multiple times, I would suggest to get it right now.

@arkirchner

Copy link
Copy Markdown
Contributor Author

Closing this because the complexity has exploded through the reviews.

@arkirchner arkirchner closed this Jun 17, 2025
@MrSerth

MrSerth commented Jun 17, 2025

Copy link
Copy Markdown
Member

Closing this because the complexity has exploded through the reviews.

I am really surprised by this conclusion, and think we got a good progress already. Since we all spent some time already, the migration is needed (and you chose to work on this topic), I would be in favor of finalizing it. From my side, there is a single comment left right now, specifically the scope of the attributes.

@nenock Can you help out, please?

@MrSerth

MrSerth commented Jul 4, 2025

Copy link
Copy Markdown
Member

We finished the migration with #2997 (and openHPI/codeharbor#2059 for CodeHarbor). Therefore, I am removing the old branch.

@MrSerth MrSerth deleted the ak/remove_some_js_erb branch July 4, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants