-
Notifications
You must be signed in to change notification settings - Fork 29
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
Breaking: Convert indicator to jsx, add outer container (fixes 230) #231
Conversation
As the completion calculation can be overridden and will change the concept of complete for the plp status e.g. for assessment pass requirements etc.
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.
👀
Instead it now updates a css variable on the outer and then uses that variable in the stylesheet to update the width. It means that it's easier for any other template / styling to repurpose the css variable, say if you wanted to do a column chart instead of a bar chart. Rather than the view targeting the bar element directly, css cascades the value through the descendants and it can be picked up by any descendant rule. adapt-contrib-pageLevelProgress/js/PageLevelProgressIndicatorView.js Lines 41 to 48 in 0f37cef
adapt-contrib-pageLevelProgress/less/pageLevelProgressIndicator.less Lines 23 to 29 in 0f37cef
It can be done like this, or I can use the value in the template and set the style width value on the element. |
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.
Looking good, one change and one query.
Co-authored-by: joe-allen-89 <[email protected]>
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.
👍 All working as expected.
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.
👀
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.
Works as expected thanks 👍
🎉 This PR is included in version 8.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
fixes #230
New
.pagelevelprogress__indicator-outer
as a style neutral container--adapt-pagelevelprogress-percentage
on each container to allow use in other stylingBreaking