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: remove prop type warning and use only CSS for threshold dot #1380
fix: remove prop type warning and use only CSS for threshold dot #1380
Conversation
✅ Deploy Preview for paragon-openedx ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -6,17 +6,17 @@ import Popover from './index'; | |||
describe('<Popover />', () => { | |||
describe('correct rendering', () => { | |||
it('renders with correct class for variant success', () => { | |||
const wrapper = mount(<Popover variant="success" />); | |||
const wrapper = mount(<Popover id="popover-id" variant="success" />); |
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.
Missing required id
props
@@ -116,8 +120,6 @@ ProgressBarAnnotated.propTypes = { | |||
variant: PropTypes.oneOf(VARIANTS), | |||
/** Specifies an additional `className` to add to the base element. */ | |||
className: PropTypes.string, | |||
/** Hide's the label visually. */ | |||
visuallyHidden: PropTypes.bool, |
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.
This prop doesn't do anything for the annotated progress bar, and is currently causing a prop type warning.
placeInfoAtZero(progressInfoRef, isProgressHintAfter, ANNOTATION_CLASS); | ||
placeInfoAtZero(thresholdInfoRef, isThresholdHintAfter, ANNOTATION_CLASS); | ||
}, [isProgressHintAfter, isThresholdHintAfter]); | ||
|
||
useEffect(() => { | ||
positionAnnotations(); | ||
const observer = new ResizeObserver(() => { |
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.
This helps keep the annotation info positioned more accurately when the progress bar itself changes widths (e.g., when the Paragon documentation site theme changes).
@@ -80,12 +90,6 @@ const ProgressBarAnnotated = ({ | |||
srOnly | |||
/> | |||
)} | |||
{!!threshold && ( |
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.
Used CSS only for this threshold dot instead of a DOM element.
Codecov Report
@@ Coverage Diff @@
## master #1380 +/- ##
==========================================
- Coverage 91.02% 90.87% -0.16%
==========================================
Files 196 198 +2
Lines 3243 3266 +23
Branches 732 735 +3
==========================================
+ Hits 2952 2968 +16
- Misses 278 284 +6
- Partials 13 14 +1
Continue to review full report at Codecov.
|
## [19.25.2](v19.25.1...v19.25.2) (2022-06-14) ### Bug Fixes * remove prop type warning and use only CSS for threshold dot in ProgressBar ([#1380](#1380)) ([81cae2e](81cae2e))
🎉 This PR is included in version 19.25.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Deploy Preview
Include a direct link to your changes in this PR's deploy preview here (e.g., a specific component page).
Merge Checklist
example
app?wittjeff
andadamstankiewicz
as reviewers on this PR.Post-merge Checklist