-
Notifications
You must be signed in to change notification settings - Fork 870
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
Added accelerator for toggle sidebar #17373
Conversation
ee49d7e
to
f52eb3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with one comment
f52eb3f
to
afb1978
Compare
browser/ui/browser_commands.cc
Outdated
@@ -277,6 +277,11 @@ void ToggleSidebarPosition(Browser* browser) { | |||
!prefs->GetBoolean(prefs::kSidePanelHorizontalAlignment)); | |||
} | |||
|
|||
void ToggleSidebar(Browser* browser) { | |||
auto* brave_browser_window = BraveBrowserWindow::From(browser->window()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please note how other hotkeys check browser
value (not all, but still).
seems like MacOS is picky about this, please make sure we don't crash like we did here: #16916
you should either add if (browser)
or DCHECK(browser);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the advice! Updated - https://github.com/brave/brave-core/compare/afb1978a4f991ebadca657ea6267eacb6b0eed3f..36dd7422b865bfe3025844b98b3115e576ea5b46
fix brave/brave-browser#27994 Ctrl+B(Cmd+B on macOS) toggles sidebar.
afb1978
to
36dd742
Compare
fix brave/brave-browser#27994
Ctrl+B(Cmd+B on macOS) toggles sidebar.
Resolves
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
SidebarBrowserTest.BasicTest
BraveBrowserCommandControllerTest.BraveCommandsEnableTest
AcceleratorTableTest.CheckBraveAccelerators
ctrl+b
(orcmd+b
on macOS)