-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat(store-ui): Add Skeleton Atom #911
Conversation
✔️ Deploy Preview for storeui ready! 🔨 Explore the source changes: 1eea48d 🔍 Inspect the deploy log: https://app.netlify.com/sites/storeui/deploys/613f4ce8a3c8ba000712624c 😎 Browse the preview: https://deploy-preview-911--storeui.netlify.app |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1eea48d:
|
Awesome! Just one thing, I'm not sure about the styling. We're trying to decouple everything from @emotion and putting every CSS rule inside our themes. For example, the What about putting only the essential styles inside the Maybe something like this works:
Then it'll push the keyframes rule with pure JS. But well, I'm not sure. |
Good to know! Thank you, I'll look into it |
maybe you just leave the classes inside the component and the style is added by the theme. For example, if you are using Tailwind, you can use one of these animations: https://tailwindcss.com/docs/animation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job @lariciamota 👏 ! Left some comments
Hey, @lariciamota . I think this PR is a little confused, I say not in relation to what you did, but in relation to the Issue. We want our components to be style agnostic, just logic. However, it is impossible to make Skeleton without being biased by some lib (in your case @emotion/core). I believe we should review what exactly we want with this Component. One suggestion would be to have just one div that receives the |
@emersonlaurentino I don't think so, this way our Skeleton component will be "useless" and the component functionality itself will be inside the theme. I prefer doing all the logic inside the component with native CSS, since the Skeleton doesn't need to have so many customizations. I believe that people will not change those styles very often. The problem here is the CSS Specificity. If we put the logic inside the |
357a07b
to
2222557
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!
92e590e
to
ee4407b
Compare
ee4407b
to
1eea48d
Compare
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* Spinner component for loading * Spinner exports * Fix data-testid Co-authored-by: Igor Brasileiro <brasileiro456@gmail.com> * remove explicit children prop Co-authored-by: Igor Brasileiro <brasileiro456@gmail.com> * BREAKING CHANGE: Remove deprecated folders (#927) * feat(store-ui): adding list atom (#918) Create List component as an Atom. * feat(store-ui): Add Skeleton Atom (#911) * Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement * Spinner exports * lint * Fix Spinner test * removing duplicated line in package.json Co-authored-by: Igor Brasileiro <brasileiro456@gmail.com> Co-authored-by: Tiago Gimenes <tlgimenes@gmail.com> Co-authored-by: Bento Pereira <40964933+bentoper@users.noreply.github.com> Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* Spinner component for loading * Spinner exports * Fix data-testid Co-authored-by: Igor Brasileiro <brasileiro456@gmail.com> * remove explicit children prop Co-authored-by: Igor Brasileiro <brasileiro456@gmail.com> * BREAKING CHANGE: Remove deprecated folders (#927) * feat(store-ui): adding list atom (#918) Create List component as an Atom. * feat(store-ui): Add Skeleton Atom (#911) * Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement * Spinner exports * lint * Fix Spinner test * removing duplicated line in package.json Co-authored-by: Igor Brasileiro <brasileiro456@gmail.com> Co-authored-by: Tiago Gimenes <tlgimenes@gmail.com> Co-authored-by: Bento Pereira <40964933+bentoper@users.noreply.github.com> Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
* BREAKING CHANGE: Remove deprecated folders (#927) * feat(store-ui): adding list atom (#918) Create List component as an Atom. * feat(store-ui): Add Skeleton Atom (#911) * Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement * Spinner exports * lint * Loading Button molecule * removing duplicated line in package.json * Remove loading prop default value * Adds component inheritance inside docs * change spread props naming Co-authored-by: Tiago Gimenes <tlgimenes@gmail.com> Co-authored-by: Bento Pereira <40964933+bentoper@users.noreply.github.com> Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
What's the purpose of this pull request?
Add the Skeleton Atom to store-ui with its story and test
How it works?
How to test it?
https://github.com/vtex-sites/storecomponents.store/pull/1197
References