Skip to content
This repository has been archived by the owner. It is now read-only.

Refactor context menu #11528

Merged
merged 2 commits into from Nov 21, 2017

Conversation

@luixxiul
Copy link
Contributor

commented Oct 14, 2017

Closes #11354

Auditors: @cezaraugusto

Test Plan:

  1. npm run test -- --grep='ContextMenu'
  2. npm run test -- --grep='bookmarksToolbar'
  3. npm run test -- --grep='tab tests'

For QA team:

  • Make sure context menu items in the URL bar work
  • Make sure context menu items on content work with no selected text.
  • Make sure context menu items on content work with selected text.
  • Make sure context menu items on content work inside an editable control on about:styles (input, textarea, or contenteditable).

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Test Plan:

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header
@codecov-io

This comment has been minimized.

Copy link

commented Oct 14, 2017

Codecov Report

Merging #11528 into master will increase coverage by 0.02%.
The diff coverage is 90.47%.

@@            Coverage Diff             @@
##           master   #11528      +/-   ##
==========================================
+ Coverage   53.38%    53.4%   +0.02%     
==========================================
  Files         274      274              
  Lines       26020    26034      +14     
  Branches     4170     4172       +2     
==========================================
+ Hits        13891    13904      +13     
- Misses      12129    12130       +1
Flag Coverage Δ
#unittest 53.4% <90.47%> (+0.02%) ⬆️
Impacted Files Coverage Δ
app/renderer/components/styles/theme.js 100% <ø> (ø) ⬆️
app/renderer/components/styles/global.js 100% <ø> (ø) ⬆️
...r/components/common/contextMenu/contextMenuItem.js 53.79% <90.47%> (+3.79%) ⬆️
@@ -55,7 +55,7 @@ describe('bookmarksToolbar', function () {
.waitForVisible('[data-test-id="bookmarkToolbarButton"][title=demo1]')
.click(bookmarksToolbar)
.click('[data-test-id="bookmarkToolbarButton"][title=demo1]')
.waitForVisible('.contextMenuItemText[data-l10n-id=emptyFolderItem]')
.waitForVisible('[data-test-id="contextMenuItemText"][data-l10n-id=emptyFolderItem]')

This comment has been minimized.

Copy link
@NejcZdovc

NejcZdovc Oct 14, 2017

Member

Can we maybe use variables here as well?

Like: .waitForVisible(``${contextMenuItemText}[data-l10n-id=emptyFolderItem]``)

This comment has been minimized.

Copy link
@luixxiul

luixxiul Oct 17, 2017

Author Contributor

Locally I've replaced al CSS and l10n selectors (#8735) and that will be addressed with / after it

This comment has been minimized.

Copy link
@NejcZdovc

NejcZdovc Oct 17, 2017

Member

not sure that I follow. What I was suggesting is that we use variable, so that if data-test-id is changed we can only change variable and everything will work

This comment has been minimized.

Copy link
@luixxiul

luixxiul Oct 17, 2017

Author Contributor

what I'm saying is that we will replace the variables all together.

This comment has been minimized.

Copy link
@luixxiul

luixxiul Oct 17, 2017

Author Contributor

I opened an issue for that task: #11574

This comment has been minimized.

Copy link
@NejcZdovc

NejcZdovc Oct 17, 2017

Member

ok sounds good

@luixxiul luixxiul added this to the 0.22.x (Nightly Channel) milestone Oct 16, 2017

@luixxiul luixxiul requested a review from petemill Oct 17, 2017

@bbondy bbondy modified the milestones: 0.22.x (Nightly Channel), Backlog Oct 25, 2017

@luixxiul luixxiul removed the request for review from petemill Nov 14, 2017

luixxiul added some commits Oct 7, 2017

Convert contextMenu
Closes #11354

- Remove contextMenu.less

TODO: change accelerator to #fff on hover

Auditors:

Test Plan:
1. npm run test -- --grep='ContextMenu'
2. npm run test -- --grep='bookmarksToolbar'
3. npm run test -- --grep='tab tests'
Export color properties to theme.js
Adresses #11354

Auditors:

Test Plan:
@cezaraugusto
Copy link
Member

left a comment

++++++++++++++

@cezaraugusto cezaraugusto merged commit 8675459 into brave:master Nov 21, 2017

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
codecov/patch 90.47% of diff hit (target 53.38%)
Details
codecov/project 53.4% (+0.02%) compared to 93d7a77
Details

@luixxiul luixxiul deleted the luixxiul:refactor-contextMenu branch Nov 21, 2017

@luixxiul luixxiul modified the milestones: Triage Backlog, 0.22.x (Nightly Channel) Nov 21, 2017

@bbondy bbondy modified the milestones: 0.22.x (Developer Channel), 0.23.x (Nightly Channel) Feb 25, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.