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(system component): don't dispatch loading state for users; faster loading, prevent reloads on tab change #1562

Merged
merged 10 commits into from
Apr 30, 2024

Conversation

domsteinbach
Copy link
Contributor

resolves DEV-3530

@domsteinbach domsteinbach marked this pull request as ready for review April 23, 2024 14:05
Copy link
Contributor

@irmastnt irmastnt left a comment

Choose a reason for hiding this comment

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

@domsteinbach would you consider to adjust this code according to official material documentation: https://material.angular.io/components/tabs/overview#tabs-and-navigation

Also users should not be loaded when "System Administration" or "All projects" tab is opened (see screenshot). It should be loaded only when user clicks on "All Users" tab.

image

irmastnt

This comment was marked as off-topic.

@domsteinbach
Copy link
Contributor Author

would you consider to adjust this code according to official material documentation: https://material.angular.io/components/tabs/overview#tabs-and-navigation
Also users should not be loaded when "System Administration" or "All projects" tab is opened (see screenshot). It should be loaded only when user clicks on "All Users" tab.

Funny, it was my very intention to not let the tabs route, as it is a really, really bad UX. I prefer to have things ready without any waiting time when someone is changing tabs in a ui. It was not expensive to preload the users imho, but of value. Otherwise, when the tabs are routing, it is annoying: When a user navigates to system, then there is another loading time for when the tab is changed to /users. The users list is also destroyed after changing the tab back. Every tab change will reload the projects/all the users with all the users images again and again (which needs to be fixed there of course).

@domsteinbach domsteinbach requested a review from irmastnt April 29, 2024 09:42
@irmastnt
Copy link
Contributor

Thanks @domsteinbach. Its really better now.
Its not necessary to load users when projects tab is opened. Preloading data is a guessing game, possibly this data may never be used. Therefore this technique should be used only for exceptional cases. Also user wants to have latest data before starting working with it.
Lets have it as a common way to load data for tabs.

@irmastnt irmastnt merged commit 26bb3f4 into main Apr 30, 2024
13 checks passed
@irmastnt irmastnt deleted the enhanced-tabs branch April 30, 2024 14:56
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.

2 participants