-
-
Notifications
You must be signed in to change notification settings - Fork 3k
refactor: move event handlers from simple-modals to respective files (@biplavbarua) #7333
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
refactor: move event handlers from simple-modals to respective files (@biplavbarua) #7333
Conversation
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 refactors the codebase by moving event handlers from simple-modals.ts to their respective page controller files (account-settings.ts and settings.ts) and extracts shared utilities to a new simple-modals-base.ts file to prevent circular dependencies.
Changes:
- Created
simple-modals-base.tsto exportPopupKey,list, andshowPopupfunction - Moved event handlers for account-related buttons from
simple-modals.tstoaccount-settings.ts - Moved event handlers for settings-related buttons from
simple-modals.tstosettings.ts
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
frontend/src/ts/modals/simple-modals-base.ts |
New file containing extracted PopupKey type, list object, and showPopup function to prevent circular dependencies |
frontend/src/ts/modals/simple-modals.ts |
Removed event handlers and showPopup function; now imports and re-exports from simple-modals-base.ts |
frontend/src/ts/pages/account-settings.ts |
Added event handlers for account-related buttons and imported showPopup from simple-modals-base.ts |
frontend/src/ts/pages/settings.ts |
Added event handlers for settings-related buttons (custom themes and fonts) and imported showPopup from simple-modals-base.ts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Refactored event handlers based on Copilot feedback:\n- Moved |
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Miodec
left a comment
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.
Thanks!
This PR addresses the
TODOinsimple-modals.tsby moving event handlers to their respective page controller files (account-settings.tsandsettings.ts).Key Changes:
.pageAccountSettingshandlers toaccount-settings.ts..pageSettingshandlers tosettings.ts.PopupKey,list, andshowPopuptosimple-modals-base.tsto resolve circular dependencies introduced by importing page controllers insimple-modals.ts(which now importshowPopupfrom base).Testing:
madge.tsc.