-
Notifications
You must be signed in to change notification settings - Fork 156
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: quota modal usage #10185
refactor: quota modal usage #10185
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
3bc5b1f
to
f77f3ae
Compare
f77f3ae
to
29cfa98
Compare
29cfa98
to
ce89493
Compare
packages/web-runtime/src/App.vue
Outdated
typeof modal.customComponentAttrs === 'function' | ||
? modal.customComponentAttrs() | ||
: modal.customComponentAttrs | ||
" |
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.
We will have this logic in a lot of places in the future I assume - maybe worth adding a helper function for this?
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.
Hate it (the if function then call else use value
), that was exactly the reason why I went for always the callback
when I adjusted the SideBarPanel
interface...
Helper would be ok-ish, but the helper might also advocates such type definitions. I'm also fine without the helper. 🤷
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.
Then let's make it always a function, I need to rebase anyway.
ce89493
to
7c1a424
Compare
Before, the state of the quota modal was handled by the outside where it was being used. This caused quite some boilerplate code because it's effectively always the same. Refactors the quota modal usage so that the modal state handling is done via the quota action instead, meaning the consuming party doesn't need to care about it anymore.
7c1a424
to
b1d875a
Compare
Quality Gate failedFailed conditions 30.77% Condition Coverage on New Code (required ≥ 50%) |
Description
Before, the state of the quota modal was handled by the outside where it was being used. This caused quite some boilerplate code because it's effectively always the same.
Refactors the quota modal usage so that the modal state handling is done via the quota action instead, meaning the consuming party doesn't need to care about it anymore.
Related Issue
Types of changes