question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ambigous toggle buttons in Email Settings

See original GitHub issue

Issue Description

Inorder to disable or enable notification emails, the user is expected to toggle the options in the Email Settings page. However the toggle buttons are ambigous and does not clearly convey whether the On or Off implies that the emails are currently enabled or disabled. The fact that the unsubscribe links from emails errors out when not logged in does not help matters much either.

Attached Screenshot 1

Suggested Solution

Buttons with text like Enabled/Disabled with suggestive colors might be the more user friendly way to go.

Attached Screenshot 2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:23 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
ZacharyKearnscommented, Aug 23, 2017

@vs1682 Changing them to a smaller size did not stop them from breaking unfortunately.

@BerkeleyTrue Here are screenshots for the final version as well as the css that was added to the main.less file and one of the ToggleButtonGroup’s. The new code passed all the tests.

Just want to note that there seems to be a major issue with the layout of the settings page.

Because the content is not wrapped in a traditional bootstrap container the negative margins on the rows are causing the elements to be 30px wider than the width of the viewport which is causing horizontal scrolling.

.email-settings {
  @media (max-width: 768px) {
    text-align: center;
  }
}

.toggle-btn-group {
  float: right;
  @media (max-width: 768px) {
    float: none;
    .btn-toggle {
      margin-top: 15px;
      margin-bottom: 25px;
    }
  }
}
<ToggleButtonGroup
  className='toggle-btn-group'
  name='montly-email'
  onChange={ toggleMonthlyEmail }
  type='radio'
  >
  <ToggleButton
    bsSize='lg'
    bsStyle='primary'
    className={
      classnames(
        'positive-20',
        { active: sendMonthlyEmail },
        'btn-toggle'
      )
    }
    type='radio'
    value={ 1 }
    >
    On
  </ToggleButton>
  <ToggleButton
    bsSize='lg'
    bsStyle='primary'
    className={
      classnames(
        'positive-20',
        { active: !sendMonthlyEmail },
        'btn-toggle'
      )
    }
    type='radio'
    value={ 2 }
    >
    Off
  </ToggleButton>
</ToggleButtonGroup>

This view is for tablets and desktops

screen shot 2017-08-23 at 6 52 03 pm

This view is for smartphones

screen shot 2017-08-23 at 6 53 17 pm

If there are any problems please let me know before I issue a pull request.

This is my first contribution so be gentle haha.

2reactions
ZacharyKearnscommented, Aug 22, 2017

I have started working on this. Here a screenshot of what I have so far. buttons

They do break at certain screen widths

buttons-break

Still working on making them functional

Read more comments on GitHub >

github_iconTop Results From Across the Web

Toggle-Switch Guidelines - Nielsen Norman Group
Toggles help users update preferences, settings, and other types of information. When using toggles, provide direct labels, use standard visual ...
Read more >
Why Toggle Buttons Are Confusing - UX Movement
Not all buttons perform actions. Sometimes they're used to change states on an app. These are known as toggle buttons.
Read more >
Should a toggle button show its current state or the state to ...
If the button says ON when the state is off, it is unclear what the setting is. If it is OFF when the...
Read more >
Toggle switch design: the full run through - Justinmind
Toggle button switches are a classic UI component - but what makes a good toggle switch? Read on to rediscover toggle switch design!...
Read more >
The best tools to create effective toggle buttons
Toggle buttons aren't, because using multiple toggle buttons increases cognitive load, with additional frustration as users need to wait for the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found