Skip to content
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

Rename application_old and only include where relevant #4374

Merged
merged 3 commits into from
Jan 31, 2023

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Jan 31, 2023

This pull request renames application_old.js to ace_editor.js as this is the only legacy code still included.
It is also no longer loaded on every page, as the code is only relevant on the detail page of an exercise, where the code editor is actually shown.

Closes #4360.

@jorg-vr jorg-vr added the chore Repository/build/dependency maintenance label Jan 31, 2023
@jorg-vr jorg-vr self-assigned this Jan 31, 2023
@jorg-vr jorg-vr marked this pull request as ready for review January 31, 2023 09:26
@jorg-vr jorg-vr requested a review from a team as a code owner January 31, 2023 09:26
@jorg-vr jorg-vr requested review from bmesuere and chvp and removed request for a team January 31, 2023 09:26
@@ -2,6 +2,7 @@
<%= javascript_include_tag 'exercise' %>
<% if @activity.exercise? %>
<%= javascript_include_tag 'submission' %>
<%= javascript_include_tag 'ace_editor' %>
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure and it's hard to test, but exercise.ts uses the ace global which I think is defined in the ace editor file. Because the order of inclusion changed (app_old was included as the first js file) this might break in some cases. To be sure, I think it's better to add this include first here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ace is only used inside a function, which is only executed upon document ready, so I don't think it matters.
But I switched the inclusion order anyway

@jorg-vr jorg-vr requested a review from bmesuere January 31, 2023 10:07
@bmesuere bmesuere temporarily deployed to naos January 31, 2023 10:50 — with GitHub Actions Inactive
@jorg-vr jorg-vr merged commit 85957b3 into develop Jan 31, 2023
@jorg-vr jorg-vr deleted the chore/rename-application-old branch January 31, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Repository/build/dependency maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename application_old.js
3 participants