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

Update short cut pin state properly on Windows #23254

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Apr 24, 2024

Resolves brave/brave-browser#26301

Polling the pinned state after asking to Windows because it's actually pinned
when user allowed via os notification.
We'll check 10 times with 2s interval after asking to Windows.
If user doesn't react or disallowed within that time, we doesn't change the state.

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  1. Launch brave and load brave://settings/getStarted
  2. Click Pin button and click allow from os notification
  3. Check Setting is changed to pinned state

@simonhong simonhong self-assigned this Apr 24, 2024
fix brave/brave-browser#26301

Polling the pinned state after asking to Windows because it's actually pinned
when user allowed via os notification.
We'll check 10 times with 2s interval after asking to Windows.
If user doesn't react or disallowed within that time, we doesn't change the state.
@simonhong simonhong force-pushed the pin_state_update_windows branch from 8e583f0 to d42b69c Compare April 24, 2024 04:29
@simonhong simonhong marked this pull request as ready for review April 24, 2024 05:21
@simonhong simonhong requested a review from a team as a code owner April 24, 2024 05:21
@simonhong simonhong requested a review from sangwoo108 April 24, 2024 05:21
Copy link
Contributor

@sangwoo108 sangwoo108 left a comment

Choose a reason for hiding this comment

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

LGTM👍

Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

strings++

@simonhong simonhong merged commit 9819718 into master Apr 24, 2024
19 checks passed
@simonhong simonhong deleted the pin_state_update_windows branch April 24, 2024 22:37
@github-actions github-actions bot added this to the 1.67.x - Nightly milestone Apr 24, 2024
@MadhaviSeelam
Copy link

MadhaviSeelam commented Apr 30, 2024

Verification PASSED using

Brave | 1.67.53 Chromium: 124.0.6367.91 (Official Build) nightly (64-bit)
-- | --
Revision | 418087e12068ca8ff9a74f346b9aac5032cd10de
OS | Windows 11 Version 23H2 (Build 22631.3527)

Case 1: New Install - Clicked Yes on second notification (brave.exe)

  1. Installed 1.67.53
  2. Launch brave
  3. confirmed Would like to Pin... notification is shown
  4. opened brave://settings/getStarted in a new tab
  5. Clicked Pin button
  6. confirmed a second notification Would you like to pin Profile 1 - Brave to your taskbar? brave.exe... is shown
  7. clicked Yes from second notification
  8. confirmed setting is changed to pinned state and the text is changed to Brave is already pinned
2024-04-30_16h48_41.mp4

Case 2: New Install - Clicked Yes on First notification (setup.exe)

  1. Installed 1.67.53
  2. Launch brave
  3. confirmed Would like to Pin... notification is shown
  4. opened brave://settings/getStarted in a new tab
  5. Clicked Pin button
  6. confirmed a second notification Would you like to pin Brave Nightly to your taskbar?.. setup.exe is shown
  7. clicked Yes on first notification
  8. confirmed setting is changed to pinned state and the text is changed to Brave is already pinned
2024-04-30_16h54_37.mp4

Case 3: New Profile - Clicked Yes on second notification (brave.exe)

  1. Unpin existing profile on the taskbar
  2. new profile
  3. Launch brave
  4. confirmed Would like to Pin... notification is shown
  5. opened brave://settings/getStarted in a new tab
  6. Clicked Pin button
  7. confirmed a second notification Would you like to pin Profile 1 - Brave to your taskbar? chrmstp.exe... is shown
  8. clicked Yes on first notification
  9. confirmed setting is changed to pinned state and the text is changed to Brave is already pinned
2024-04-30_16h59_39.mp4

Case 4: New Profile - Clicked Yes on First notification (brave.exe)

  1. Unpin existing profile on the taskbar
  2. new profile
  3. Launch brave
  4. confirmed Would like to Pin... notification is shown
  5. opened brave://settings/getStarted in a new tab
  6. Clicked Pin button
  7. confirmed a first notification Would you like to pin Brave Nightly to your taskbar?.. chrmstp.exe is shown
  8. clicked Yes on first notification
  9. confirmed setting is changed to pinned state and the text is changed to Brave is already pinned
2024-04-30_17h02_57.mp4

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

Successfully merging this pull request may close these issues.

Should set as pinned state only when it's actually pinned
4 participants