Skip to content

Feature/disable api key bootstrap switch#1657

Merged
jykae merged 7 commits intodevelopfrom
feature/disable-api-key-bootstrap-switch
Sep 29, 2016
Merged

Feature/disable api key bootstrap switch#1657
jykae merged 7 commits intodevelopfrom
feature/disable-api-key-bootstrap-switch

Conversation

@brylie
Copy link
Copy Markdown
Contributor

@brylie brylie commented Sep 29, 2016

Closes #1653
Closes #1656
Closes #1658

Changes

  • Add Bootstrap Switch toggle to API key check field
  • Change API key check field label to be more semantic
  • Add i18n support to ProxyBackends schema and related sub-schemas
    • apiUmbrella
      • settings
  • Remove API Wizard schema i18n strings

Template.proxyBackend.onRendered(() => {
// Make Disable API Key field easier to use
// Fixes browser rendering issue
$("[name='apiUmbrella.settings.disable_api_key']").bootstrapSwitch();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that simple check / uncheck works much better here. bootstrapSwitch may work as a single element, but not as a part of a form.

Copy link
Copy Markdown
Contributor Author

@brylie brylie Sep 29, 2016

Choose a reason for hiding this comment

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

The checkbox is not working, for some reason, in Firefox 50.

The Bootstrap Switch allows the form to submit, and gives explicit text to let the user know about the field state:

screenshot from 2016-09-29 12-52-44

screenshot from 2016-09-29 12-53-39

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can also refine the display of Bootstrap Switch as an enhancement.

Copy link
Copy Markdown
Contributor Author

@brylie brylie Sep 29, 2016

Choose a reason for hiding this comment

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

I made the button smaller.
screenshot from 2016-09-29 13-01-18
screenshot from 2016-09-29 13-01-29

Copy link
Copy Markdown
Contributor Author

@brylie brylie Sep 29, 2016

Choose a reason for hiding this comment

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

We disagree as to whether the button 'works' in the form, both literally and aesthetically.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That looks good.

@brylie
Copy link
Copy Markdown
Contributor Author

brylie commented Sep 29, 2016

After initial feedback, the button is now smaller. The on and off order was changed to improve readability:

screenshot from 2016-09-29 13-03-52
screenshot from 2016-09-29 13-04-02

This takes up a bit less space in the form, and matches the default state (off) in the ProxyBackend schema.

@brylie
Copy link
Copy Markdown
Contributor Author

brylie commented Sep 29, 2016

Ping @bajiat @Nazarah

@brylie
Copy link
Copy Markdown
Contributor Author

brylie commented Sep 29, 2016

There are a lot of Bootstrap Switch configuration options that we can use to enhance this task at a later point.

@jykae jykae self-assigned this Sep 29, 2016
@jykae
Copy link
Copy Markdown
Contributor

jykae commented Sep 29, 2016

@brylie Reviewing

@brylie
Copy link
Copy Markdown
Contributor Author

brylie commented Sep 29, 2016

Kiitos @jykae

@jykae
Copy link
Copy Markdown
Contributor

jykae commented Sep 29, 2016

@brylie tested on both Chrome & Firefox, works well. Merging.

@jykae jykae merged commit 9aaaefd into develop Sep 29, 2016
@jykae jykae deleted the feature/disable-api-key-bootstrap-switch branch September 29, 2016 13:04
@jykae jykae removed the in progress label Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants