Skip to content

[vtadmin] Add loading placeholder for entity table views + update default redirect to /schemas#10331

Merged
doeg merged 4 commits intovitessio:mainfrom
tinyspeck:sarabee-entities-loading-state
May 18, 2022
Merged

[vtadmin] Add loading placeholder for entity table views + update default redirect to /schemas#10331
doeg merged 4 commits intovitessio:mainfrom
tinyspeck:sarabee-entities-loading-state

Conversation

@doeg
Copy link
Copy Markdown
Contributor

@doeg doeg commented May 18, 2022

Description

  • Adds QueryLoadingPlaceholder loading state to all the entity table views (tablets, clusters, etc.)
  • Updates default redirect from /tablets to /schemas
  • Updates QueryLoadingPlaceholder to accept multiple queries (or, as before, just one query)

Updating the default redirect from /tablets to /schemas was a little feature request from Slack, and it makes sense to me!

(I think an even better UX would be to store, say, the user's last browsed entity table view and persist that in local storage, but ofc that's a lot more complicated.)

Since the /schemas view is the slowest of all the views (and for us it's very slow indeed, so #10120 is highly anticipated!) I also took this chance to add QueryLoadingPlaceholder since before it was simply blank and looked pretty broken.

The only caveat with this PR is that I am stumped as to how to write a good test for QueryLoadingPlaceholder's new queries prop in a way that isn't racy. 🤔 🤔 🤔 I know it's bad but... if I could just this once punt on adding that test... 🙈 I would appreciate it. The "failure mode" we'd be testing for, in this case, is that the loading placeholder would be shown when it shouldn't, or not shown when it should; certainly embarrassing but not probably world-ending. (I also tested this a bunch internally!)

Before (no spinner) and after (with spinner):

loading-before

loading

Related Issue(s)

N/A

Checklist

  • "Backport me!" label has been added if this change should be backported
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

N/A

doeg added 3 commits May 18, 2022 09:12
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
@doeg doeg requested review from ajm188 and notfelineit as code owners May 18, 2022 13:53
@doeg doeg added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: VTAdmin VTadmin interface release notes none labels May 18, 2022
@github-actions
Copy link
Copy Markdown
Contributor

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has the correct release notes label. release notes none should only be used for PRs that are so trivial that they need not be included.
  • If a new flag is being introduced, review whether it is really needed. The flag names should be clear and intuitive (as far as possible), and the flag's help should be descriptive.

Bug fixes

  • There should be at least one unit or end-to-end test.
  • The Pull Request description should either include a link to an issue that describes the bug OR an actual description of the bug and how to reproduce, along with a description of the fix.

Non-trivial changes

  • There should be some code comments as to why things are implemented the way they are.

New/Existing features

  • Should be documented, either by modifying the existing documentation or creating new documentation.
  • New features should have a link to a feature request issue or an RFC that documents the use cases, corner cases and test cases.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • vtctl command output order should be stable and awk-able.

Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
@doeg doeg merged commit f581bf1 into vitessio:main May 18, 2022
@doeg doeg deleted the sarabee-entities-loading-state branch May 18, 2022 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: VTAdmin VTadmin interface Type: Enhancement Logical improvement (somewhere between a bug and feature)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants