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

Make check label cursor customizable #29633

Merged
merged 2 commits into from
Nov 7, 2019
Merged

Conversation

GaryPEGEOT
Copy link

@GaryPEGEOT GaryPEGEOT commented Nov 4, 2019

Use a cursor pointer on custom form labels to indicate that the element is "clickable"

@GaryPEGEOT GaryPEGEOT requested a review from a team as a code owner November 4, 2019 10:09
@MartijnCuppens
Copy link
Member

@patrickhlauke, is this a good idea?

@patrickhlauke
Copy link
Member

this is a constant debate. by default browsers don't show do it. this would be an opinionated change.
we already had lengthy back and forths about setting cursor:pointer for buttons, and in the end resorted to making a new variable for it. we could create a new variable, or rename/expand the current $enable-pointer-cursor-for-buttons to cover more "browsers don't normally do this, but it's clickable, so we're forcing a different cursor". but i personally wouldn't go for this, as some users may fear that clicking on the label when it shows a hand cursor may actually take them somewhere else/out of the form altogether (like it's a link or something)

@GaryPEGEOT
Copy link
Author

this is a constant debate. by default browsers don't show do it. this would be an opinionated change.
we already had lengthy back and forths about setting cursor:pointer for buttons, and in the end resorted to making a new variable for it. we could create a new variable, or rename/expand the current $enable-pointer-cursor-for-buttons to cover more "browsers don't normally do this, but it's clickable, so we're forcing a different cursor". but i personally wouldn't go for this, as some users may fear that clicking on the label when it shows a hand cursor may actually take them somewhere else/out of the form altogether (like it's a link or something)

On the other hand, right now some user don't know they can click on the switch / checkbox, so an option might be interesting to let people decide if they want it to be displayed as a cursor, WDYT ?

@patrickhlauke
Copy link
Member

there's a lot of things users don't know ... there's a fine line between helping users vs diverging too much from what browsers do by default on all other sites...

there's no right or wrong around this question (despite strong opinions one way or another like https://medium.com/simple-human/buttons-shouldnt-have-a-hand-cursor-b11e99ca374b) ... so having a variable strikes a certain balance at least

@GaryPEGEOT
Copy link
Author

@patrickhlauke what's the prefered way? Create a new variable or rename & expand the current one?

@MartijnCuppens
Copy link
Member

I wouldn't use a new $enable-* variable here but just add a $custom-control-cursor variable which is null by default.

@XhmikosR
Copy link
Member

XhmikosR commented Nov 4, 2019

This targets the wrong branch.

@GaryPEGEOT
Copy link
Author

This targets the wrong branch.

Ok, so which one should I use ? (It's my first "contribution")

@XhmikosR
Copy link
Member

XhmikosR commented Nov 4, 2019

The master branch is the default branch.

@GaryPEGEOT
Copy link
Author

The master branch is the default branch.

@XhmikosR neither the file nor the class exist on the master branch.

@XhmikosR
Copy link
Member

XhmikosR commented Nov 4, 2019

Maybe this is only v4 specific then.

@GaryPEGEOT
Copy link
Author

@XhmikosR the default value is null, as of the actual behavior, so I don't see how it is a BC.

@XhmikosR
Copy link
Member

XhmikosR commented Nov 4, 2019

Yeah, I already edited my comment.

@mdo
Copy link
Member

mdo commented Nov 7, 2019

Custom forms are no longer custom in v5, which is why these styles don't appear there. They're all consolidated into the default form controls so we have a single set of forms. I'm good with the null variable here.

@XhmikosR
Copy link
Member

XhmikosR commented Nov 7, 2019

@mdo: does this patch apply in master, though?

Copy link
Member

@MartijnCuppens MartijnCuppens left a comment

Choose a reason for hiding this comment

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

Let's do this

@XhmikosR XhmikosR changed the title Use cursor pointer for custom form labels Make check label cursor customizable Nov 7, 2019
@XhmikosR XhmikosR merged commit 6b7ca12 into twbs:v4-dev Nov 7, 2019
@GaryPEGEOT GaryPEGEOT deleted the patch-1 branch November 8, 2019 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants