Skip to content

Comments

ui: Use standard styled checkboxes in the board editor#19388

Open
nkc-137 wants to merge 6 commits intolichess-org:masterfrom
nkc-137:ux-toggle-standardisation-follow-up
Open

ui: Use standard styled checkboxes in the board editor#19388
nkc-137 wants to merge 6 commits intolichess-org:masterfrom
nkc-137:ux-toggle-standardisation-follow-up

Conversation

@nkc-137
Copy link
Contributor

@nkc-137 nkc-137 commented Feb 11, 2026

Summary

Use the standard styled checkboxes we recently designed in the board editor. This is a PR for the issue: #17396

###Testing

  • Tested in local instance, below are the screenshots
Screenshot 2026-02-11 at 5 32 04 AM

@superuser-does
Copy link
Collaborator

I think this page is more form-like as a whole in its conception so I believe checkboxes are more appropriate for the Editor than toggles are. Will tick off as far as #17396 is concerned.

h('div.castling', [
h('strong', i18n.site.castling),
h('div', [
castleCheckBox(ctrl, 'K', i18n.site.whiteCastlingKingside, !!ctrl.options.inlineCastling),
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like you dropped that. OK, it wasn't really necessary. But then please delete the now fully unused inlineCastling option

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed inlineCastling option from all the places in the recent commits. Thanks for pointing me in the right direction.

@ornicar
Copy link
Collaborator

ornicar commented Feb 12, 2026

https://github.com/search?q=repo%3Alichess-org%2Flila%20inlineCastling&type=code

.form-check__label::after {
width: calc(12px * var(--form-check-scale));
height: calc(6px * var(--form-check-scale));
border-width: calc(2.5px * var(--form-check-scale));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see 5 new hardcoded values that will break later when form-check is updated.

Can't you just scale the whole thing without making any new assumptions about it? transform: scale?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, agreed. I think I can make this better by scaling the whole element using transform: scale(...) so it doesn't break in the future due ot form-check updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants