-
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: Add OutOfStock component #1314
Conversation
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 c728136:
|
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
expect(outOfStockMessage.tagName).toEqual('P') | ||
}) | ||
|
||
it('`outOfStockTitle` component should be an `paragraph`', () => { |
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.
I'm not sure about the title being a paragraph/div 🤔
The user could just use an heading tags.
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.
good point!
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.
Looking good! Pre-approved but left some points for discussion.
expect(outOfStockMessage.tagName).toEqual('P') | ||
}) | ||
|
||
it('`outOfStockTitle` component should be an `paragraph`', () => { |
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.
good point!
Co-authored-by: Filipe W. Lima <filipe.lima@vtex.com.br>
Co-authored-by: Filipe W. Lima <filipe.lima@vtex.com.br>
Co-authored-by: Eduardo Formiga <eduardo.formiga@gmail.com>
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
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.
I'm happy with this version that we came up 🤩
It favors the use of headings tags and avoid unnecessary/extra nodes in the DOM.
Well doneeeee Arthur!! 🌟
I've left a few suggestions, can you check it please :)
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.
Great 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.
I liked the change to the Component.InnerComponent
pattern, but I'm unsure if this is the right moment to introduce it. Other components use a different pattern (e.g. ComponentInnerComponent
). Maybe we open a discussion what which style to use? I feel like there are more pros to the former (e.g., only 1 import, autocomplete?), but I'm curious to know if there is any reason it hasn't been adopted from the start.
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
Is a good point, a like this patter with dot, but while we don't have an opinion about this, I will change the pattern |
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
Signed-off-by: Arthur Andrade arthurfelandrade@gmail.com
What's the purpose of this pull request?
This PR is part of the
Component Placement
project, to bring some components from base.store.How it works?
Component in FastStore
Component in BaseStore
The
OutOfStock
component works together with its own others components:Input
Button
How to test it?
Unit tests through Jest: yarn test packages/ui/src/organisms/OutOfStock/OutOfStock.test.tsx
Starters Deploy Preview
References
Component Placement - FSSS-249