I like the idea of allowing the user to toggle a toggle switch without clicking and edit button first to reduce the number of "modes." But what to do when some fields will need to transform to become editable fields? I'd like to avoid putting an edit button on every row.
I believe in this case switches should not be operable except in the edit state.
This is because the [Edit] button in this case regards the full form below it. So from logical point of view, it turns the state of the form to editable, and switches are a part of this form.
Should edit buttons be at the level of each of the fields instead, it would be okay for the switches to be active.
However, you could split the form in two subsets:
- Quick toggles - operable all the time,
- Details (or whatever you call it) - with the [Edit] button.
A really quick mockup:
You can do the following: place a toggle and a text field next to the option in question.
- if the toggle is set to "off", the text field remains inactive (disabled or hidden).
- if the toggle is set to "on", the user has the possibility to enter the text.
Should you have this input parsed by F# guys, they can use
FieldName option type which automatically indicates whether the toggle was set to off (
None) or on and text was entered (