nextcloud-libraries / nextcloud-libraries/nextcloud-vue

`NcAppSettingsDialog` re-renders its content on resize

Open
#4,185 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug feature: settings
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:

  1. Resize window
  2. data property isMobile from mixin is updated
  3. computed property hasNavigation is updated accordingly
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.