-
Notifications
You must be signed in to change notification settings - Fork 301
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
Development
: Replace deprecated before unload event with pending changes guard
#9479
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
client
Pull requests that update TypeScript code. (Added Automatically!)
label
Oct 14, 2024
coolchock
temporarily deployed
to
artemis-test3.artemis.cit.tum.de
October 15, 2024 08:45 — with
GitHub Actions
Inactive
coolchock
changed the title
Oct 15, 2024
Chore
: Replace deprecated beforeunload event with PendingChangesGuardGeneral
: Replace deprecated beforeunload event with PendingChangesGuard
coolchock
temporarily deployed
to
artemis-test3.artemis.cit.tum.de
October 15, 2024 09:06 — with
GitHub Actions
Inactive
HawKhiem
approved these changes
Oct 21, 2024
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.
Retested on TS3. Works as described
Cathy0123456789
temporarily deployed
to
artemis-test5.artemis.cit.tum.de
October 23, 2024 22:31 — with
GitHub Actions
Inactive
krusche
changed the title
Oct 24, 2024
General
: Replace deprecated beforeunload event with PendingChangesGuardDevelopment
: Replace deprecated before unload event with pending changes guard
|
github-actions
bot
added
the
deployment-error
Added by deployment workflows if an error occured
label
Oct 26, 2024
sachmii
added
deploy:artemis-test1
and removed
deployment-error
Added by deployment workflows if an error occured
labels
Oct 26, 2024
|
github-actions
bot
added
the
deployment-error
Added by deployment workflows if an error occured
label
Oct 26, 2024
sachmii
removed
the
deployment-error
Added by deployment workflows if an error occured
label
Oct 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
General
Client
Description
The
beforeunload
event, which is deprecated, was still in use in several parts of the codebase. This pull request replaces the deprecated event with thePendingChangesGuard
approach, ensuring a more robust and Angular-friendly solution for handling unsaved changes.Additionally, the
beforeunload
event has been completely removed from thecode-editor-container.component.ts
. Since file saving is now automatically triggered whenever the file content changes, there is no longer a need for the event in this context.Steps for Testing
Prerequisites:
The objective is to verify that the warning event, which alerts users about unsaved changes before leaving the page, still functions correctly in all places where the deprecated beforeunload event was replaced.
standardized-competency-management.component.ts
generate-competencies.component.ts
course-import-standardized-course-competencies.component.ts
import-course-competencies.component.ts
exam-participation.component.ts
modeling-submission.component.ts
quiz-exercise-update.component.ts
text-editor.component.ts
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Code Review
Manual Tests
Summary by CodeRabbit
New Features
PendingChangesGuard
to prevent navigation away from certain components if there are unsaved changes.TextEditorComponent
to enhance user experience.Bug Fixes
@HostListener
decorator and associated unsaved changes warning, simplifying component lifecycle management.Tests
canDeactivate
method behavior, improving clarity and maintainability.QuizExerciseUpdateComponent
to validate quiz exercise states and error handling.