nextcloud-libraries / nextcloud-libraries/nextcloud-vue
`NcAppSettingsDialog` re-renders its content on resize
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 246
- Forks
- 99
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 103
Description
Have noticed that components inside <NcAppSettingsSection> are destroyed and mounted again when:
- Resize window
- data property
isMobilefrom mixin is updated - computed property
hasNavigationis updated accordingly - function update (probably) forces component to re-render all its content
https://github.com/nextcloud/nextcloud-vue/blob/cf90618d4490ea239e4b96c261176554bbe5d56f/src/components/NcAppSettingsDialog/NcAppSettingsDialog.vue#L269
https://github.com/nextcloud/nextcloud-vue/blob/cf90618d4490ea239e4b96c261176554bbe5d56f/src/components/NcAppSettingsDialog/NcAppSettingsDialog.vue#L351
I'm not in good relationships with Vue render() functionality, but can this behavior be avoided somehow, with KeepAlive, maybe?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/components/NcAppSettingsDialog/NcAppSettingsDialog.vue at the referenced lines around 269 and 351, then reproduce the dialog behavior while resizing the window. Trace the isMobile and hasNavigation updates and confirm that the NcAppSettingsSection contents remain mounted after resizing without breaking the navigation layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100