-
Notifications
You must be signed in to change notification settings - Fork 180
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
Feat: Move settings from individual pages into one settings modal #2502
Conversation
also - there's merge conflicts, you should merge in main |
Merged master back and addressed all the comments :) Thanks for the quick review |
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.
Nearly there, the biggest issue is with the User
type that you're requiring in props of various components - the way it's built currently it's asking for a type that will never exist during runtime and as such they're impossible to use without ignoring/overriding TS errors
} | ||
|
||
const infiniteLoad = async (state: InfiniteLoaderState) => { | ||
const cursor = extraPagesResult.value?.admin?.userList.cursor || null |
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.
You don't have to change this, but in the future I suggest using usePaginatedQuery()
which handles a lot of this stuff internally
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, I will change that in a follow-up :) We have a bunch of them still in this way, so I think I'll just address them all at once
packages/frontend-2/components/settings/user/profile/ChangePassword.vue
Outdated
Show resolved
Hide resolved
packages/frontend-2/components/settings/user/profile/DeleteAccount.vue
Outdated
Show resolved
Hide resolved
packages/frontend-2/components/settings/user/profile/DeleteAccountDialog.vue
Outdated
Show resolved
Hide resolved
packages/frontend-2/components/settings/user/profile/Details.vue
Outdated
Show resolved
Hide resolved
packages/frontend-2/components/settings/user/profile/EditAvatar.vue
Outdated
Show resolved
Hide resolved
@fabis94 Sorry had to add one more small thing, a check to see if you have access to the server settings (else they would always show in the sidebar) |
Description
In preparation for workspace settings (and additional settings like multiple emails) we are moving from individual settings pages to one modal where all settings can live. In order to make this work a few changes had to be made:
Changes
All component have been moved form individual folders to
components/settings
, for now split intouser
andserver
and a SettingsDialog that consumes them. Most of the logic has been reused from the previous implementation with just some tweaks.Routing; even though the settings dialog is not actually a page it is kind of behaving as one. When switching between settings "pages" the URLs should update, but because these are not "actual" pages so I've done the history manipulation outside of the router to avoid rerenders. This way also the original content behind the modal stays alive (so you don't lose your view in for example the viewer). However, these page should be available as directly URLs as well, but then render on top of the home page, so I added the routes programmatically and used the dashboard component for rendering.
In addition some small tweaks to existing dialogs, the dialog/sidebar component and copy in various places