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

Implement skeleton loader (forms, query builder, attachment) #3334

Merged
merged 27 commits into from
May 16, 2023

Conversation

CarolineDenis
Copy link
Contributor

@CarolineDenis CarolineDenis commented Apr 11, 2023

Fixes #2998

@CarolineDenis CarolineDenis requested review from maxpatiiuk and a team April 11, 2023 20:35
@CarolineDenis CarolineDenis changed the title Implement skeleton loader for forms - query builder - attachment plug… Implement skeleton loader (forms, query builder, attachment) Apr 11, 2023
Triggered by c2ef61c on branch refs/heads/issue-2998
@CarolineDenis
Copy link
Contributor Author

CarolineDenis commented Apr 11, 2023

To test:
=> Change in the dev tool network tab: 'No throttling' to 'Slow 3G'

  • Open Query Builder, while loading, the skeleton should be displayed
  • Open a record set that contains attachments, click on attachment button icon, while attachment is loading the skeleton should be displayed.
  • Open attachment page and see skeleton while attachments are loading
  • Open an App Resource and while loading on the right, see skeleton

PS: If 3G not slow enough, you will have to pull the branch and replace the expected data by a temporary hardcoded 'undefined'.

*Can also test that animations are disabled for the skeletons when user choose no animation in his preferences

@CarolineDenis
Copy link
Contributor Author

Preview of a skeleton:

form.mov

Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

looks very nice in the UI
code could use some improvement though

Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

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

The skeleton is too stark in contrast to the background (black with a while gradient), needs to be something more like this:
image

Than this:
image

Also it is used in place of the loading indicator when the loading circle should still be used after attachments begin to display.

Full video:
https://user-images.githubusercontent.com/37256050/231314507-d62041a1-d632-4f04-8962-fd69fa7eab99.mp4

@grantfitzsimmons
Copy link
Member

It would be very nice to have skeleton loading dialogs instead. Forms generally do not have any loading time & some of the components that take a long time to load are:

  • The list of queries
  • The list of record sets
  • Creating an interaction

@grantfitzsimmons
Copy link
Member

image

Similar to my last feedback, this looks really odd with the black outline & makes the dialog massive when it should be very small

@grantfitzsimmons
Copy link
Member

See how this loads into a giant dialog that includes a loading wheel (not needed) then shrinks back to a small window upon completion? When things load quickly, this flashes by and looks bad

Screen.Recording.2023-04-11.at.7.13.10.PM.mov

@CarolineDenis CarolineDenis marked this pull request as draft April 12, 2023 14:11
@CarolineDenis
Copy link
Contributor Author

@grantfitzsimmons can you check this version for the previous components and send me your thoughts?

Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

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

image

https://coldfish-issue-2998.test.specifysystems.org/specify/

Open the queries dialog and see that it appears very condensed

Screenshot 2023-04-13 at 9 03 57 AM

@grantfitzsimmons
Copy link
Member

image

https://coldfish-issue-2998.test.specifysystems.org/specify/tree/taxon/?conformation=%7E%7E1%7E18940%7E18961-%7E18963-%7E18960----

There is also an issue with the form skeleton repeating and looking very odd

@grantfitzsimmons
Copy link
Member

You likely resized it like that intentionally or accidentally

If this is the case, then it would be claned when you wipe your localStorage or use incognito

No way! I refuse to believe it.

@CarolineDenis CarolineDenis marked this pull request as ready for review April 20, 2023 19:55
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

lots of small suggestions, nothing major

Triggered by 11d2496 on branch refs/heads/issue-2998
@maxpatiiuk
Copy link
Member

All looks good and I will approve this pull request as soon as https://github.com/specify/specify7/pull/3334/files#r1173934603 is fixed. Tell me if you want to meet to talk about that

@CarolineDenis
Copy link
Contributor Author

All looks good and I will approve this pull request as soon as https://github.com/specify/specify7/pull/3334/files#r1173934603 is fixed. Tell me if you want to meet to talk about that

yes would be nice

@CarolineDenis
Copy link
Contributor Author

All looks good and I will approve this pull request as soon as https://github.com/specify/specify7/pull/3334/files#r1173934603 is fixed. Tell me if you want to meet to talk about that

Added the aria prop to Skeleton.Root

Triggered by 47fff8c on branch refs/heads/issue-2998
@maxpatiiuk
Copy link
Member

There are still two unresolved comments. Besides those all looks good

Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

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

Almost ready!

Just one more thing, the form dialog is really wide by default, can we made this narrower initially?

Screen.Recording.2023-05-04.at.8.27.46.AM.mov

@CarolineDenis
Copy link
Contributor Author

@grantfitzsimmons could you test this PR this week please?

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.

Reduce loading dialogs in favor of skeleton loaders
4 participants