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

chore(progressbar): allow to specify progressbar text type #3394

Merged

Conversation

peterblazejewicz
Copy link
Contributor

This is a change request PR:

As advised on the Bootstrap documentation page when using some
background variants that is advisable to change the text color
accordingly, for example for readability purposes. The textType input
property allows to achieve this, adding support for binding text types
to text-* utility class on the progress bar.
Common scenario: progress bar with 'warning' type renders a white text on
the yellow background (assuming default BS). This change allows users to opt to
'dark' text type to improve the readability.

ref:
https://getbootstrap.com/docs/4.3/utilities/colors/#background-color

image

As advised on the Bootstrap documentation page when using some
background variants that is advisable to change the text color
accordingly, for example for readability purposes. The `textType` input
property allows to achieve this, adding support for binding text types
to `text-*` utility class on the progress bar.
Common scenario: progress bar with 'warning' type renders a white text on
the yellow background (assuming default BS). This change allows users to opt to
'dark' text type to improve the readability.

ref:
https://getbootstrap.com/docs/4.3/utilities/colors/#background-color
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@d0654c1). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3394   +/-   ##
=========================================
  Coverage          ?   90.92%           
=========================================
  Files             ?       95           
  Lines             ?     2754           
  Branches          ?      511           
=========================================
  Hits              ?     2504           
  Misses            ?      190           
  Partials          ?       60
Flag Coverage Δ
#e2e 55.15% <50%> (?)
#unit 87.97% <100%> (?)
Impacted Files Coverage Δ
src/progressbar/progressbar-config.ts 100% <ø> (ø)
src/progressbar/progressbar.ts 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0654c1...7e869ad. Read the comment docs.

Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

Good idea, @peterblazejewicz !

LGTM, thanks!
Marking to merge in 5.2.0

(should be feat(progressbar), but don't worry will change this when merging)

@maxokorokov maxokorokov merged commit 1057dbd into ng-bootstrap:master Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants