Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Load collections of different resources on change #816

Conversation

nickvergessen
Copy link
Contributor

Fix #814

While this works, it now immediately causes a request when changing a Talk room, even if the sidebar tab is not the shown one.
Anyone has an idea? @marcoambrosini @juliushaertl

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added the bug Something isn't working label Feb 16, 2022
@juliusknorr
Copy link
Contributor

While this works, it now immediately causes a request when changing a Talk room, even if the sidebar tab is not the shown one.

I see the same actually in deck and was wondering if we should rather adjust either deck or nextcloud-vue to only render the SidebarTabs once the tab becomes active. I could imagine that the slot for the tab is for example then only shown if active

https://github.com/nextcloud/nextcloud-vue/blob/master/src/components/AppSidebarTab/AppSidebarTab.vue#L36

<slot v-if="isActive"/>

Otherwise I don't see a clean way to delay the API call until the UI is actually visible.

@nickvergessen
Copy link
Contributor Author

cc @skjnldsv ^ any opinion on modifying the vue lib?

@skjnldsv
Copy link
Contributor

cc @skjnldsv ^ any opinion on modifying the vue lib?

Needs to be heavily tested. One of the issue is that it will force-reload the entire tab every time you change. So you will lose a lot of snappiness. Especially for heavy tabs like Sharing 🤔

@skjnldsv
Copy link
Contributor

I would actually cover this differently. If you want to not fire all the data when the tab is not shown, you can detect and handle this by watching the isActive and load/render only if true.

You have more flexibility as a dev if you can safely manage the rendering of your tab rather than enforcing this for everyone I would say :)

@nickvergessen
Copy link
Contributor Author

I would actually cover this differently. If you want to not fire all the data when the tab is not shown, you can detect and handle this by watching the isActive and load/render only if true.

You have more flexibility as a dev if you can safely manage the rendering of your tab rather than enforcing this for everyone I would say :)

That sounds clever, let me try that.

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen requested a review from skjnldsv March 4, 2022 09:22
@nickvergessen nickvergessen marked this pull request as ready for review March 4, 2022 09:22
@nickvergessen
Copy link
Contributor Author

Works

@nickvergessen
Copy link
Contributor Author

Talk PR to test it with: nextcloud/spreed#6956

@nickvergessen
Copy link
Contributor Author

Please review @juliushaertl @skjnldsv @marcoambrosini

Signed-off-by: Joas Schilling <coding@schilljs.com>
@juliusknorr juliusknorr merged commit f54beff into master Apr 12, 2022
@delete-merged-branch delete-merged-branch bot deleted the bugfix/814/allow-loading-a-different-resource-without-remount branch April 12, 2022 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CollectionList should reload data on object change
3 participants