Skip to content
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

Fix sidebar data loading for users #8276

Merged
merged 3 commits into from
Jan 19, 2023

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Jan 19, 2023

Description

This PR improves the loading of additional user data which is needed in the sidebar.

Before, this was handled by a custom showPanel event, that first loaded the additional data, then opened the sidebar. Problems here:

  1. This event was only fired on action click, not on select (see Loading additional user data does not work when opening sidebar via select-toggle #8275).
  2. We might have deeper component structures in the future. When some deep component (or a composable) wants to emit this event, we'd need to propagate the event all the way to the parent view component.
  3. There is no loading-indicator for the user. This might be no issue here, but in general this is bad.

The new approach uses the eventBus which is coupled with the useSidebar composable. Opening/closing the sidebar and setting the active panels is all being handled by the composable. Furthermore, the additional data is being loaded when a user gets selected. This way, it works on select-toggle as well.

Also, the sidebar now uses the loading state properly to show a loading spinner during data loading.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@JammingBen JammingBen self-assigned this Jan 19, 2023
@JammingBen JammingBen marked this pull request as ready for review January 19, 2023 10:58
@owncloud owncloud deleted a comment from update-docs bot Jan 19, 2023
Copy link
Member

@dschmidt dschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍🏻

@JammingBen JammingBen changed the title Fix sidebar data loading for users and groups Fix sidebar data loading for users Jan 19, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

69.0% 69.0% Coverage
0.0% 0.0% Duplication

@JammingBen JammingBen merged commit 1a30c70 into master Jan 19, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix-users-and-groups-data-loading branch January 19, 2023 11:30
@micbar micbar mentioned this pull request May 3, 2023
89 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading additional user data does not work when opening sidebar via select-toggle
2 participants