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

Make NTP setting menu keyboard accessible #2814

Merged
merged 2 commits into from
Jul 22, 2019
Merged

Make NTP setting menu keyboard accessible #2814

merged 2 commits into from
Jul 22, 2019

Conversation

imptrx
Copy link
Contributor

@imptrx imptrx commented Jun 26, 2019

fixes brave/brave-browser#5041
fixes brave/brave-browser#5199
Brave-ui PR: brave/brave-ui#506
Quick View:
keyboard-settings

Submitter Checklist:

Test Plan 1:

  • Go to new tabs page
  • Press tab
  • There should be an outline when you reach the settings icon at the bottom left of the page
  • Pressing space or enter will open the setting menu
  • Pressing tab will allow you to select the settings (i.e. show background image)
  • Pressing space or enter or 'escape' will allow you to close the menu
  • Clicking the settings icon while menu is open will also close the menu

Test Plan 2:

  • Open new tabs page
  • Open customization menu at the bottom right corner
  • Open another NTP and assert customization menu is closed
  • Close browser with customization menu open; NTP on a fresh browser instance should be closed

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@imptrx imptrx added the bug label Jun 26, 2019
@imptrx imptrx added this to the 0.69.x - Nightly milestone Jun 26, 2019
@imptrx imptrx self-assigned this Jun 26, 2019
@imptrx imptrx force-pushed the ntp-accessibility branch 2 times, most recently from d7300fe to aeda067 Compare June 26, 2019 22:20
@imptrx imptrx changed the title Make NTP setting menu keyboard accessible WIP Make NTP setting menu keyboard accessible Jul 10, 2019
@cezaraugusto
Copy link
Contributor

@imptrx still wip?

@imptrx
Copy link
Contributor Author

imptrx commented Jul 10, 2019

@imptrx still wip?

yep - currently waiting on the status of a recently filed issue: brave/brave-browser#5199 to be confirmed since they touch upon the same logic

@imptrx imptrx changed the title WIP Make NTP setting menu keyboard accessible Make NTP setting menu keyboard accessible Jul 10, 2019
Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

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

comments left

@imptrx imptrx force-pushed the ntp-accessibility branch 2 times, most recently from de1d113 to c6d835f Compare July 16, 2019 19:44
@imptrx imptrx changed the title Make NTP setting menu keyboard accessible WIP Make NTP setting menu keyboard accessible Jul 18, 2019
@imptrx imptrx changed the title WIP Make NTP setting menu keyboard accessible Make NTP setting menu keyboard accessible Jul 19, 2019
Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

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

code looks good, feature works, and mentioned issues are confirmed to be fixed by these changes. left two questions and a request.

cezaraugusto
cezaraugusto previously approved these changes Jul 19, 2019
Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

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

++

petemill
petemill previously approved these changes Jul 19, 2019
Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

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

Thanks for addressing, this is now nice and clean.

A good practice would be to make the commits that we end up putting in master work towards keeping the code and code-history understandable. Two things would improve that:

  1. Make sure each commit message is descriptive about a feature
    • always referencing New Tab Page in this case
  2. Squash commits
    • Code that we don't need and never wanted to merge usually just adds noise to the story of the file
    • Something like "Address feedback" isn't a meaningful commit message to see why a change was made. If there's no meaningful reason to have it as a commit, then it should be folded in to the feature that is being modified.

In general a PR should have as few commits as possible. If there are multiple commits then they would probably be for very separate features that happen to be in the same PR, which should be a rare thing (prefer multiple PRs).

If you need help learning some good techniques for how to rebase and squash, I'd be happy to share some tips.

In this case maybe there would be a few commits in an ideal world, after looking at your end result:

  • New Tab Page: settings tabindex matches visual order
  • New Tab Page: settings menu is keyboard accessible
  • New Tab Page: settings open / close state is not persisted
  • Storybook: Add normalizer for parity with browser webui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants