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

Polish the checkbox, update switch documentation #8588

Merged
merged 5 commits into from
Aug 8, 2018

Commits on Aug 8, 2018

  1. Polish the checkbox, update switch documentation

    The switch has a long history. Before I go into details, here's what this PR does:
    
    - It replaces Pending Review, Stick to Front Page, Allow Comments, and Allow Pingbacks from using Switches to using Checkboxes.
    - It tweaks the design of the checkbox to have a significantly more visible checked state, and a new more visual focus state.
    - It tweaks the documentation for when to use a switch instead of a checkbox.
    
    The Switch is born from mobile, which is increasingly the device of choice for people and long term might become the only choice. It's bigger and more tappable, and implies by its nature that it's a boolean choice. It also has qualities that the checkbox does not embody:
    
    - Like its wall lightswitch counterpart, it’s something you flip and the effect is instant. There used to be darkness, now there’s light.
    - It has only a single purpose, and that purpose is boolean. For example you wouldn’t use switches to select multiple categories.
    
    However Allow Comments and the three other aforementioned toggles that use switches in master, do not have an instant effect, they require you to hit "Save" before the toggle option is stored. Given the above reasoning, a checkbox is a better choice in those situations.
    
    The toggle is still a good choice in situations where immediate visual feedback is given, like when a dropcap is applied, or when you toggle image croppping for gallery items. In those situations, the pairing of the boolean nature and the larger touch target makes the switch feel more substantial.
    
    With this PR I'm trying to take into account all the past discussions on the topic, and I know there have been many. Lay your thoughts on me.
    Joen Asmussen authored and jasmussen committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    546c744 View commit details
    Browse the repository at this point in the history
  2. docs: Tidy up FormToggle docs

    tofumatt authored and jasmussen committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    de5f8b9 View commit details
    Browse the repository at this point in the history
  3. Removed unused variables and withInstanceId.

    Thanks for the feedback, @paulwilde.
    jasmussen committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    589eeec View commit details
    Browse the repository at this point in the history
  4. Try a fix for the legitimate failing e2e test.

    Not sure if this is kosher, as the ID will change if additional checkboxes are added.
    jasmussen committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    8a0e23d View commit details
    Browse the repository at this point in the history
  5. Fix e2e test really.

    jasmussen committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    957fb24 View commit details
    Browse the repository at this point in the history