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

fix(button.tsx): Relative Spinner size #868

Merged
merged 4 commits into from
Jul 21, 2023

Conversation

nigellima
Copy link
Collaborator

Summarize the changes made and the motivation behind them.

This PR makes the component inside the component to be relative to the Button size when isProcessing=true. It also adds an width animation when the flag is toggled.

processing

Reference related issues using # followed by the issue number.

Fix #850

If there are breaking API changes - like adding or removing props, or changing the structure of the theme - describe them, and provide steps to update existing code.

the Spinner component was not fitting inside the Button.tsx when isProcessing=true. Also a transition was added to the Button component to fit the Spinner.

Fix themesberg#850
@vercel
Copy link

vercel bot commented Jul 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2023 11:41pm

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch coverage: 99.82% and project coverage change: -0.02 ⚠️

Comparison is base (7461173) 99.54% compared to head (9058888) 99.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #868      +/-   ##
==========================================
- Coverage   99.54%   99.53%   -0.02%     
==========================================
  Files         163      166       +3     
  Lines        6621     6879     +258     
  Branches      401      418      +17     
==========================================
+ Hits         6591     6847     +256     
- Misses         30       32       +2     
Impacted Files Coverage Δ
src/components/Toast/theme.ts 100.00% <ø> (ø)
src/components/Dropdown/Dropdown.tsx 99.22% <99.41%> (-0.78%) ⬇️
src/components/Button/Button.tsx 100.00% <100.00%> (ø)
src/components/Button/ButtonBase.tsx 100.00% <100.00%> (ø)
src/components/Button/theme.ts 100.00% <100.00%> (ø)
src/components/Card/Card.tsx 100.00% <100.00%> (ø)
src/components/Carousel/Carousel.tsx 99.02% <100.00%> (+0.06%) ⬆️
src/components/DarkThemeToggle/DarkThemeToggle.tsx 100.00% <100.00%> (ø)
src/components/Dropdown/DropdownItem.tsx 100.00% <100.00%> (ø)
src/components/Dropdown/theme.ts 100.00% <100.00%> (ø)
... and 15 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@nigellima
Copy link
Collaborator Author

@rluders weird, the test in the CI / build workflow does not fail locally for me.

@tulup-conner
Copy link
Collaborator

@nigellima
Copy link
Collaborator Author

https://github.com/themesberg/flowbite-react/actions/runs/5605163775/jobs/10253955428#step:8:342 I'm also not sure why exactly this is happening

Could you re-run the workflow and see if the error persists? maybe it was some brittle failure

@rluders
Copy link
Collaborator

rluders commented Jul 20, 2023

I notice that some tests are failing, not 'cause the test subject is failing but because the test itself has some implementation issue... maybe some rendering, or delay process that is causing the issue. Probable we should create an issue to fix it, I'm sure that the problem isn't related to this PR specifically.

@rluders rluders merged commit 3662d5e into themesberg:main Jul 21, 2023
6 checks passed
@nigellima nigellima deleted the fix/button-spinner branch July 23, 2023 03:36
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.

Spinner icon inside Button does not adjust to button size
3 participants