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 janky db refreshing #39796

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Fix janky db refreshing #39796

merged 1 commit into from
Mar 7, 2024

Conversation

rafpaf
Copy link
Contributor

@rafpaf rafpaf commented Mar 7, 2024

Closes #39732

Description

The problem is that when a new database is added, the tables are handled in a background process which updates the data available through /api/database. The Browse databases page pulls in data from that endpoint. But when the endpoint has fresh data to provide, the page goes into a loading state for a split second, causing the page to instantly scroll back up to the top, which is annoying.

This PR fixes the problem by showing the loading spinner only when there are no databases already loaded into the page.

Loom

@metabase-bot metabase-bot bot added the .Team/AdminWebapp Admin and Webapp team label Mar 7, 2024
@rafpaf rafpaf added the backport Automatically create PR on current release branch on merge label Mar 7, 2024
@rafpaf rafpaf added this to the 0.50 milestone Mar 7, 2024
@rafpaf rafpaf marked this pull request as ready for review March 7, 2024 19:42
@rafpaf rafpaf force-pushed the fix-39732-janky-db-refreshing branch from 60214b3 to 165ca0b Compare March 7, 2024 19:43
@rafpaf rafpaf requested review from iethree and a team March 7, 2024 19:44
Copy link
Contributor

@iethree iethree left a comment

Choose a reason for hiding this comment

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

🥳

@iethree
Copy link
Contributor

iethree commented Mar 7, 2024

let's backport this to 49, it's a simple bugfix for a feature in 49 (milestone should be 49)

Copy link

replay-io bot commented Mar 7, 2024

Status Complete ↗︎
Commit 165ca0b
Results
⚠️ 2 Flaky
2337 Passed

@rafpaf rafpaf modified the milestones: 0.50, 0.49 Mar 7, 2024
@rafpaf rafpaf merged commit 819fe3d into master Mar 7, 2024
109 checks passed
@rafpaf rafpaf deleted the fix-39732-janky-db-refreshing branch March 7, 2024 21:42
github-actions bot pushed a commit that referenced this pull request Mar 7, 2024
metabase-bot bot added a commit that referenced this pull request Mar 7, 2024
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
@calherries calherries removed this from the 0.49 milestone Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/AdminWebapp Admin and Webapp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browse database page refreshes N seconds when a new db is added that makes the page unusable
3 participants