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: 'is-locked' btn class added #209

Merged

Conversation

kirsty-hames
Copy link
Contributor

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

Add .is-locked state class

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.

There are no specific Trickle button styles currently. Colours inherit from Vanilla .btn-text and .btn-icon classes instead which already include .is-locked so no further styling required.

.btn-text and .btn-icon locked states inherit from the disabled state by default so there will be no visual changes. By introducing .is-locked class, this gives the flexibility of setting locked styling that can differ from the standard disabled styling.

Remove hbs 'is-disabled' btn class

The toggling of .is-disabled btn class is handled via toggleEnabled in TrickleButtonView.js. The hbs .is-disabled btn class had no impact on this so I've removed as this might cause confusion as to where the classes are applied.

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 kirsty-hames changed the title New: Toggle 'is-locked' btn class and remove hbs 'is-disabled' btn class New: 'is-locked' btn class added Jan 25, 2024
@zubairslamdien zubairslamdien self-requested a review January 30, 2024 13:14
Copy link

@zubairslamdien zubairslamdien left a comment

Choose a reason for hiding this comment

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

👍

@joe-allen-89 joe-allen-89 merged commit fe5baa1 into master Feb 5, 2024
1 check passed
@joe-allen-89 joe-allen-89 deleted the separating-locked-from-inactive-disabled-buttons branch February 5, 2024 09:59
github-actions bot pushed a commit that referenced this pull request Feb 5, 2024
# [7.1.0](v7.0.2...v7.1.0) (2024-02-05)

### New

* toggle 'is-locked' btn class and remove hbs 'is-disabled' btn class (#209) ([fe5baa1](fe5baa1)), closes [#209](#209) [/github.com/adaptlearning/adapt-contrib-trickle/blob/82a1c23f24f6508d6ed8c0a65e23ddb11ae9d8ad/js/TrickleButtonView.js#L122](https://github.com//github.com/adaptlearning/adapt-contrib-trickle/blob/82a1c23f24f6508d6ed8c0a65e23ddb11ae9d8ad/js/TrickleButtonView.js/issues/L122)
Copy link

github-actions bot commented Feb 5, 2024

🎉 This PR is included in version 7.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

kirsty-hames added a commit to adaptlearning/adapt-contrib-vanilla that referenced this pull request Mar 12, 2024
following PR merge, 'is-locked' btn class added - adaptlearning/adapt-contrib-trickle#209
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.

5 participants