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

feat(store-ui): Loading Button molecule #962

Merged
merged 10 commits into from
Oct 21, 2021
Merged

Conversation

Gmantiqueira
Copy link
Contributor

@Gmantiqueira Gmantiqueira commented Sep 17, 2021

What's the purpose of this pull request?

As the title says, this PR creates the Loading Button molecule.

- Updating stores with this component (WIP).

How it works?

How to test it?

References

@Gmantiqueira Gmantiqueira requested a review from a team as a code owner September 17, 2021 19:36
@netlify
Copy link

netlify bot commented Sep 17, 2021

✔️ Deploy Preview for storeui ready!

🔨 Explore the source changes: d19ab27

🔍 Inspect the deploy log: https://app.netlify.com/sites/storeui/deploys/6171a3628bf3a50008627adb

😎 Browse the preview: https://deploy-preview-962--storeui.netlify.app/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 17, 2021

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 d19ab27:

Sandbox Source
Store UI Typescript Configuration

Copy link
Contributor

@igorbrasileiro igorbrasileiro left a comment

Choose a reason for hiding this comment

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

I'm questioning the existence of this component, and for me, it's the same thing as the IconButton. It's the Button component with a slight difference in render child. By doing this, we are just adding one more component to maintain. Does it make sense? Take a look on this article: https://kentcdodds.com/blog/inversion-of-control

We can still have this component for internal purposes but not expose it through API.

@Gmantiqueira
Copy link
Contributor Author

I'm questioning the existence of this component, and for me, it's the same thing as the IconButton. It's the Button component with a slight difference in render child. By doing this, we are just adding one more component to maintain. Does it make sense? Take a look on this article: https://kentcdodds.com/blog/inversion-of-control

We can still have this component for internal purposes but not expose it through API.

@igorbrasileiro Lets talk about this subject again in our refinement. I'm not 100% satisfied about these components as well.

Gonna let this one in standby meanwhile.

Copy link
Contributor

@igorbrasileiro igorbrasileiro left a comment

Choose a reason for hiding this comment

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

Great job, @Gmantiqueira! 👏 🚀

@igorbrasileiro igorbrasileiro linked an issue Oct 13, 2021 that may be closed by this pull request

const LoadingButton = forwardRef<HTMLButtonElement, LoadingButtonProps>(
function LoadingButton(
{ children, loading, testId = 'store-loading-button', ...props },
Copy link
Member

Choose a reason for hiding this comment

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

How about

Suggested change
{ children, loading, testId = 'store-loading-button', ...props },
{ children, loading, testId = 'store-loading-button', ...rest },

?

I'm. a bit skeptical of using the props word when it doesn't really mean the same thing as "all props received by the component". I think it might be confusing

@Gmantiqueira Gmantiqueira merged commit 6083ea0 into master Oct 21, 2021
@Gmantiqueira Gmantiqueira deleted the feat/loading-button branch October 21, 2021 19:55
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.

Loading Button
6 participants