Update checkbox to toggle for keep latest artifacts
The following discussion from !119068 (merged) should be addressed:
-
@pgascouvaillancourt started a discussion: (+1 comment) This LGTM
💯 I do have a concern about the UX of the
Keep artifacts from most recent successful jobs
option though:The design system says that a checkbox should not be used when:
- only one option in a set can be selected
- you are wanting to have a change immediately applied when an option is selected
Both those guidelines are being violated here as it's a single option, and the value is stored to the DB whenever the checkbox is toggled. We should probably consider using a
GlToggle
component instead.This MR did not introduce this checkbox though, so this concern is definitely out of scope, but I'd like to make sure we are tracking this somewhere. @gdoyle do you know if there's already an issue for this?
Proposal
Update the checkbox to a toggle: replace the GlFormCheckbox
component with a GlToggle
, see this nearby toggle for reference