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(NcButton): Add pressed state for stateful buttons #4344

Merged
merged 3 commits into from Jul 19, 2023

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jul 18, 2023

☑️ Resolves

This simply adds a pressed state and enforces primary on pressed, and any other type (except primary) otherwise.
Not we should probably remove the button variant of the checkboxradioswitch for not grouped elements to prevent different styled components with the same function.

🖼️ Screenshots

vokoscreenNG-2023-07-18_12-28-37.mp4

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@susnux susnux added 3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities feature: button labels Jul 18, 2023
@susnux susnux force-pushed the fix/ncbutton-pressed-style branch from 56eed6a to 1e1eac9 Compare July 18, 2023 18:20
@susnux susnux requested a review from ShGKme July 18, 2023 18:20
@susnux susnux force-pushed the fix/ncbutton-pressed-style branch from 1e1eac9 to b4b50a0 Compare July 18, 2023 19:11
src/components/NcButton/NcButton.vue Outdated Show resolved Hide resolved
src/components/NcButton/NcButton.vue Outdated Show resolved Hide resolved
src/components/NcButton/NcButton.vue Outdated Show resolved Hide resolved
@susnux susnux force-pushed the fix/ncbutton-pressed-style branch 3 times, most recently from f4d0376 to c91ef84 Compare July 18, 2023 21:03
@susnux susnux requested a review from ShGKme July 18, 2023 21:04
Copy link
Contributor

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

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

Nice work, thank you :)

Copy link
Contributor

@JuliaKirschenheuter JuliaKirschenheuter left a comment

Choose a reason for hiding this comment

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

haven't tested but looks good

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

Tested, works fine, looks good by code

@ShGKme
Copy link
Contributor

ShGKme commented Jul 19, 2023

Cypress tests seems to be related

Copy link
Contributor

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

Nice, looks good! :)

@susnux
Copy link
Contributor Author

susnux commented Jul 19, 2023

Cypress tests seems to be related

Yes as this is a visual change, the snapshots need to be updated, but the other tests pass :)

@susnux susnux force-pushed the fix/ncbutton-pressed-style branch 2 times, most recently from dc27727 to 7aac835 Compare July 19, 2023 16:52
@susnux
Copy link
Contributor Author

susnux commented Jul 19, 2023

Oh yes, I love that cypress on my system renders the snapshots differently than on CI (antialiasing)...

But now the tests are still flaky. As the cursor within the input "flashes" and that is causing the snapshots to differ (compare runner 1 and runner 2)

image

…cAppSidebar` star button

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/ncbutton-pressed-style branch from 7aac835 to f70d0bf Compare July 19, 2023 17:33
… for snapshot

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities feature: button
Projects
None yet
5 participants