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

test(skeleton): Add stories and enabled snapshots #720

Merged
merged 17 commits into from
Jun 25, 2020
Merged

test(skeleton): Add stories and enabled snapshots #720

merged 17 commits into from
Jun 25, 2020

Conversation

mannycarrera4
Copy link
Contributor

@mannycarrera4 mannycarrera4 commented Jun 9, 2020

Summary

Fixes #717
Partially fixes: #683
Add snapshots for skeleton component

@mannycarrera4 mannycarrera4 changed the title Mc skeleton snaps test(skeleton): Add stories and enabled snapshots Jun 9, 2020
@mannycarrera4
Copy link
Contributor Author

Thoughts on the way it's being broken up?

@cypress
Copy link

cypress bot commented Jun 9, 2020



Test summary

369 0 1 0


Run details

Project canvas-kit
Status Passed
Commit bb0f8e4 ℹ️
Started Jun 23, 2020 2:54 PM
Ended Jun 23, 2020 2:57 PM
Duration 03:41 💡
OS Linux Ubuntu Linux - 18.04
Browser Electron 80

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@lychyi lychyi linked an issue Jun 10, 2020 that may be closed by this pull request
@lychyi lychyi added the ready for review Code is ready for review label Jun 10, 2020
@mannycarrera4 mannycarrera4 added the on hold PR is on hold until further notice label Jun 10, 2020
@mannycarrera4 mannycarrera4 changed the base branch from prerelease/v4 to master June 11, 2020 18:38
@mannycarrera4 mannycarrera4 added on hold PR is on hold until further notice and removed on hold PR is on hold until further notice ready for review Code is ready for review labels Jun 11, 2020
export const SkeletonStates = () => (
<div>
<h3>With Custom Line Count</h3>
<StaticStates>
Copy link
Member

Choose a reason for hiding this comment

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

StaticState isn't used anywhere. This only does something if className is used as a prop and only for pseudo states like .focus or .hover.

I agree with @lychyi where the table isn't necessary to show all component states - especially in this example where there isn't any matrix. But it does show nice text descriptions of what we're looking at. I think visual tests, like our functional tests, should have context easily available. The way the text is laid out helps describe what's in the visual snapshot.

The confusing part here is which skeleton types are being used.

First table is SkeletonText, but the label says "With Custom Line Count" even though the "Default" has no custom line count. Your variant would be your line count of 4.

Second table is SkeletonShape. with a few different widths, heights, and border radii.

Third table has SkeletonShape, SkeletonHeader, and SkeletonText. I can see by the story that SkeletonHeader is not obvious and makes me wonder if there are different header types (heights). I'd like to see side-by-side comparisons of skeletons to actual content. A common thing I see people get wrong with skeleton loading is that the "skeleton" isn't actually a skeleton of the layout - so layout shifts. Sometimes dramatically which defeats the entire purpose of skeleton loaders. We should have stories that show what they look like side-by-side so we can see that they line up correctly. We should have some stories that show loading at different loading times (best practices of when to show them) with the ability to reset.

Skeleton loaders are abused so many times and we don't help the situation since we don't provide any good examples.

@mannycarrera4 mannycarrera4 added ready for review Code is ready for review and removed on hold PR is on hold until further notice labels Jun 16, 2020
@lychyi lychyi added testing and removed testing labels Jun 17, 2020
@@ -13,7 +13,7 @@ export interface SkeletonProps {

const TRANSPARENCY_POSITION = 45;
const WHITE_SHEEN_WIDTH = 10;
const DURATION = 5;
const DURATION = 2;
Copy link
Member

Choose a reason for hiding this comment

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

Did you meant to change this value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, i ran it by the design team in PT, but Alex brought up a point that it might behave weird on larger screens?

Copy link
Member

Choose a reason for hiding this comment

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

I think changing that value should be from a GH issue explaining why it needs to change. Otherwise that context gets lost. There are so many things that exist without any context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's understandable, I'll revert this change until we have some more context

Copy link
Member

Choose a reason for hiding this comment

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

I found this: #134

I still think changing this value should be a different PR addressing this issue as well as a rationale for what the final number becomes.

@jpante jpante added this to In Progress in Current Sprint (7/20 - 8/9) via automation Jun 23, 2020
@jpante jpante removed this from In Progress in Current Sprint (7/20 - 8/9) Jun 25, 2020
@NicholasBoll NicholasBoll merged commit 39eb39e into Workday:master Jun 25, 2020
@NicholasBoll NicholasBoll mentioned this pull request Jul 7, 2022
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve visual snapshot coverage for skeleton loader Improve visual testing coverage
3 participants