Skip to content

Conversation

@nkc-137
Copy link

@nkc-137 nkc-137 commented Jan 6, 2026

Related to #17396

This PR standardises checkbox vs toggle switch UX on a subset of pages, following the guideline that instant apply settings should use toggle switches, while submit/save flows should use checkboxes.

Pages updated

  • Close account
  • Advanced search
  • Game import
  • Arena new tournament creation
  • Swiss tournament creation
  • Broadcast creation

Notes

  • This PR covers a subset of pages listed in the issue and keeps scope intentionally limited.
  • UI consistency only; no behavior change intended.
  • Changes are split into separate commits per page to make review and revert easy.

Testing

  • sbt test
    • [success] Total time: 10 s, completed Jan 6, 2026, 5:24:08 AM
  • Ran locally and visually verified each updated page. (Images attached below)

Screenshot 2026-01-06 at 5 26 08 AM Screenshot 2026-01-06 at 5 28 31 AM Screenshot 2026-01-06 at 5 28 57 AM Screenshot 2026-01-06 at 5 29 45 AM Screenshot 2026-01-06 at 5 30 32 AM Screenshot 2026-01-06 at 5 49 07 AM Screenshot 2026-01-06 at 5 49 32 AM

@nkc-137 nkc-137 force-pushed the ux-checkbox-toggle-standardisation branch from a2edc0c to b04f32e Compare January 6, 2026 12:11
@nkc-137 nkc-137 marked this pull request as ready for review January 6, 2026 12:52
@nkc-137 nkc-137 marked this pull request as draft January 6, 2026 12:53
Comment on lines 87 to 111
private def nativeCheckboxField(
field: Field,
labelContent: Frag,
help: Option[Frag],
half: Boolean,
value: String = "true"
) =
div(
cls := List(
"form-check form-group" -> true,
"form-half" -> half
)
)(
div(
span(cls := "form-check-input")(
form3.nativeCheckbox(
form3.id(field),
field.name,
checked = field.value.has("true"),
value = value
)
),
label(`for` := form3.id(field))(labelContent)
),
help.map(small(cls := "form-help")(_))
Copy link
Member

Choose a reason for hiding this comment

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

you probably want to extract this as form3 helper to be able to use it for gameUI.scala for example

Copy link
Author

Choose a reason for hiding this comment

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

Got it! That makes sense, that would reduce code duplication. I will do that in the upcoming revision.

@nkc-137 nkc-137 marked this pull request as ready for review January 9, 2026 06:04
help = frag("Include this round when calculating players' rating changes").some
"Rated round",
help = frag("Include this round when calculating players' rating changes").some,
half = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

half = true on purpose here?

label(`for` := form3.id(field))(labelContent)
),
help.map(small(cls := "form-help")(_))
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

hasn't that moved to Form3.scala?

raw(
"Prevent reopening the account later. If you check this box, even administrators will be unable to reopen your account at your request."
)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

couldn't this use nativeCheckboxField

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