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(component/progressbar): fix progressbar showing label when progress == 0 #698

Merged
merged 4 commits into from
Apr 17, 2023

Conversation

SrivatsaRUpadhya
Copy link
Contributor

@SrivatsaRUpadhya SrivatsaRUpadhya commented Apr 13, 2023

Description

Progress bar shows labels even when it is disabled at progress value is 0
The conditional rendering using the '&&' would return 0 on condition being false which would get displayed when progress value is 0. This was fixed using ternary operator instead. And also the label would get hidden at low progress values which is now

Fixes #696

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tested by trying to set the progress value to zero in the storybook.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ab6e96a) 99.42% compared to head (dfcc210) 99.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #698   +/-   ##
=======================================
  Coverage   99.42%   99.42%           
=======================================
  Files         130      130           
  Lines        6479     6480    +1     
  Branches      485      485           
=======================================
+ Hits         6442     6443    +1     
  Misses         37       37           
Impacted Files Coverage Δ
src/lib/components/Progress/Progress.tsx 100.00% <100.00%> (ø)
src/lib/theme/default.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

src/lib/theme/default.ts Outdated Show resolved Hide resolved
src/lib/components/Progress/Progress.tsx Outdated Show resolved Hide resolved
src/lib/components/Progress/Progress.tsx Outdated Show resolved Hide resolved
src/lib/theme/default.ts Outdated Show resolved Hide resolved
src/lib/theme/default.ts Outdated Show resolved Hide resolved
@rluders rluders changed the title Fix progressbar fix(component/progressbar): fix progressbar showing 0 label when disabled Apr 17, 2023
@rluders rluders changed the title fix(component/progressbar): fix progressbar showing 0 label when disabled fix(component/progressbar): fix progressbar showing label when progress == 0 Apr 17, 2023
SrivatsaRUpadhya and others added 4 commits April 17, 2023 22:09
* fix: group list styling

* fix: borders between list group items

---------

Co-authored-by: Mees van Dongen <[email protected]>
Co-authored-by: Ricardo Lüders <[email protected]>
… at progress value is 0

The conditional rendring using the '&&' would return 0 on condition being false which would get
displayed when progress value is 0. This was fixed using ternary operator instead. And also the
label would get hidden at low progress values which is now fixed.

fix themesberg#696
@rluders
Copy link
Collaborator

rluders commented Apr 17, 2023

I hope you don't mind @SrivatsaRUpadhya, I changed it a little bit. I want to spin a release this week. :)

@rluders rluders merged commit 1fa7542 into themesberg:main Apr 17, 2023
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.

The progress 0 is shown above a progress bar with labelProgress is false
2 participants