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

Avoid spinner when switching tabs in dashboard #6894

Merged
merged 3 commits into from
Mar 6, 2023

Conversation

philippotto
Copy link
Member

I noticed that there was an incorrectly spinner every time one switches the active tab in the dashboard (which replaced the entire table).

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • open dashboard and switch tabs --> table should not be replaced by a spinner for a brief moment

Issues:

Verified

This commit was signed with the committer’s verified signature. The key has expired.
philippotto Philipp Otto
@philippotto philippotto self-assigned this Mar 2, 2023
@philippotto philippotto requested a review from hotzenklotz March 2, 2023 17:33
@@ -122,3 +122,7 @@ td.nowrap * {
.min-height-0 {
min-height: 0;
}

.text-center {
Copy link
Member

Choose a reason for hiding this comment

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

This is not used in the PR. Do you still want to merge it?

Copy link
Member Author

@philippotto philippotto Mar 3, 2023

Choose a reason for hiding this comment

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

I noticed that the spinner in question was centered by using a text-center class which didn't exist (which didn't work obviously). That's why I added this class.

Copy link
Member

Choose a reason for hiding this comment

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

Ah. Good point. Maybe a Bootstrap leftover: https://getbootstrap.com/docs/5.0/utilities/text/#text-alignment

Copy link
Member

@hotzenklotz hotzenklotz left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -2053,6 +2053,8 @@ export async function getPricingPlanStatus(): Promise<APIPricingPlanStatus> {
return Request.receiveJSON("/api/pricing/status");
}

export const cachedGetPricingPlanStatus = _.memoize(getPricingPlanStatus);
Copy link
Member

@hotzenklotz hotzenklotz Mar 3, 2023

Choose a reason for hiding this comment

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

Caching is not without its own problems. The status might update (e.g. new people will join, more datasets will be uploaded taking up space etc...)
How long does this cache live? Until the next page refresh, right? So, the above points might not be a such a big issue after all.

The approach is fine by me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Until the next page refresh, right?

Yes, exactly. When visiting the orga page, the non-cached version is used. So, only the dashboard is affected. If outdated data is noticed, the user will likely hit refresh to fix it.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@philippotto philippotto enabled auto-merge (squash) March 6, 2023 08:46
@philippotto philippotto merged commit db2ce2f into master Mar 6, 2023
@philippotto philippotto deleted the fix-spinner-in-dashboard branch March 6, 2023 09:04
hotzenklotz added a commit that referenced this pull request Mar 6, 2023
…come_header_UI

* 'master' of github.com:scalableminds/webknossos: (34 commits)
  Slim down view mode dropdown by using icons (#6900)
  Logging on password reset/change (#6901)
  When merging volume tracings, also merge segment lists (#6882)
  avoid spinner when switching tabs in dashboard (#6894)
  Upgrade Antd to v4.24 (#6865)
  Support n5 end-chunks with chunksize differing from metadata chunksize (#6890)
  Implement http range requests for HttpsSeekableByteChannel (#6869)
  new GH action for adding issues to project board
  Fix links in Changelog (#6881)
  adds dedicated explore method for zarr datasets with a datasource-properties.json (#6879)
  Release 23.03.0 (#6880)
  Fix superUser being wrongly marked as organization owners (#6876)
  Followups for OME-TIFF export (#6874)
  Fix reload-precomputed-mesh functionality (#6875)
  Adds OME-TIFF export (#6838)
  Add evolutions 99,100 to migration guide (#6871)
  Add link to imprint and privacy to help menu (#6870)
  Annotation Locking Mechanism (#6819)
  Update deprecated antd <Menu> (#6860)
  Add functions to get and set segment colors to the frontend API (#6853)
  ...
hotzenklotz added a commit that referenced this pull request Mar 13, 2023
…pdown-menu

* 'master' of github.com:scalableminds/webknossos:
  Avoid SQL error when fetching view config for zero-layer dataset (#6912)
  Fix date formatting for VX reports (#6908)
  Fix rare crash when viewing shared annotation (#6892)
  Slim down view mode dropdown by using icons (#6900)
  Logging on password reset/change (#6901)
  When merging volume tracings, also merge segment lists (#6882)
  avoid spinner when switching tabs in dashboard (#6894)
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.

None yet

2 participants