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

New: Separate .is-locked and .is-disabled btn state classes #202

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

kirsty-hames
Copy link
Contributor

@kirsty-hames kirsty-hames commented Jan 23, 2024

Relates to Core issue to allow for locked and inactive disabled buttons to be visually different.

Depending on the button context, the appropriate .is-locked or .is-disabled classes should be used.

.is-locked - applies to buttons that are temporarily disabled due to step locked content.

.is-disabled - applies to buttons with functionality not available. Styles are inherited from Vanilla less/core/drawerItem.less.

#### Dependencies
.is-locked styles require Vanilla PR, add drawer item locked state.

Update: Dependency removed in 6dbfcad.
After discussion, instead of separating state classes, .is-locked has been added in addition to .is-disabled. This removes the dependency from Vanilla PR, add drawer item locked state as earlier versions of Vanilla will still inherit .is-disabled styles.

Testing PR example

In your course, navigate to Adapt Assessment. Open PLP drawer and inspect. Trickled items, .pagelevelprogress__item-btn should have the classes .is-disabled .is-locked.

In the same course, set a component to "_isVisible": false,. Navigate to this component, open PLP drawer and inspect. The hidden component, .pagelevelprogress__item-btn should have the class .is-disabled.

@kirsty-hames kirsty-hames self-assigned this Jan 23, 2024
@kirsty-hames kirsty-hames changed the title separate .is-locked and .is-disabled btn state classes New: Separate .is-locked and .is-disabled btn state classes Jan 23, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

👀

@kirsty-hames
Copy link
Contributor Author

kirsty-hames commented Jan 24, 2024

After discussion, instead of separating state classes, locking state to be added to disabled buttons. This removes the dependency from Vanilla PR, add drawer item locked state. PR to be updated to reflect.

Copy link
Contributor

Choose a reason for hiding this comment

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

👀

Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@guywillis guywillis left a comment

Choose a reason for hiding this comment

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

👍

@kirsty-hames kirsty-hames merged commit 8590ab2 into master Jan 29, 2024
@kirsty-hames kirsty-hames deleted the separating-locked-from-inactive-disabled-buttons branch January 29, 2024 12:07
github-actions bot pushed a commit that referenced this pull request Jan 29, 2024
# [7.3.0](v7.2.3...v7.3.0) (2024-01-29)

### New

* Add locking state class to disabled buttons (#202) ([8590ab2](8590ab2)), closes [#202](#202)
Copy link

🎉 This PR is included in version 7.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

4 participants