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

feat: Button Toggle: Add ability for consumers to handle toggling pressed state #5154

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

margaree
Copy link
Contributor

Jira ticket

Still needs docs and test(s) but just wanted to make sure I was going down the right path from this comment before I went too far.

Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-5154/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

@@ -54,6 +54,26 @@ <h2>Toggle Button (disabled)</h2>
</template>
</d2l-demo-snippet>

<h2>Toggle Button (with promise delay)</h2>
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like we could remove reference to "promise" here since there's no promise involved. Could even set it up with d2l-dialog-confirm, but the setTimeout is simple and effective. 😏

Copy link
Member

@dlockhart dlockhart left a comment

Choose a reason for hiding this comment

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

Nice!

@margaree margaree marked this pull request as ready for review November 14, 2024 18:43
@margaree margaree requested a review from a team as a code owner November 14, 2024 18:43
@margaree margaree changed the title feat: Button Toggle: Add ability to wait for a promise to resolve before toggling feat: Button Toggle: Add ability for consumers to handle toggling pressed state Nov 14, 2024
@margaree margaree merged commit 9d8a9c3 into main Nov 14, 2024
6 checks passed
@margaree margaree deleted the button-toggle-wait-for-promise branch November 14, 2024 18:44
Copy link

🎉 This PR is included in version 3.68.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 3.68.0 🎉

The release is available on:

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.

3 participants