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

Reassign Copy keyboard shortcut to 'copy clean link' #15968

Closed
wants to merge 1 commit into from

Conversation

spylogsster
Copy link
Contributor

@spylogsster spylogsster commented Nov 16, 2022

Resolves brave/brave-browser#26761

Added few functions to TextfieldController because we cannot reach the omibox model directly from ui layer

Copy Clean Link is default for urls:
image

Copy is default for text:
image

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • 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, npm run lint, 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. Open https://brave.com/?utm_campaign=1234.
  2. Click in the URL bar and select the URL.
  3. Use the keyboard shortcut to copy (e.g. Ctrl+c on Windows).
  4. Paste in a text editor
  5. Check that only https://brave.com/ was copied. The utm_campaign parameter was removed.

@spylogsster spylogsster self-assigned this Nov 16, 2022
@spylogsster spylogsster force-pushed the brave-26761 branch 3 times, most recently from 49ad7ab to 9808c3d Compare November 16, 2022 14:06
@spylogsster spylogsster marked this pull request as ready for review November 16, 2022 14:06
@spylogsster spylogsster requested review from a team as code owners November 16, 2022 14:06
@spylogsster spylogsster changed the title wip: Reassign Copy keyboard shortcut to 'copy clean link' Reassign Copy keyboard shortcut to 'copy clean link' Nov 16, 2022
/* Copyright (c) 2022 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
Copy link
Member

Choose a reason for hiding this comment

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

FYI, we've added a check in CI that looks for an HTTPS URL here and so you'll probably need to change that to https://mozilla.org/MPL/2.0/ before merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

@bridiver bridiver left a comment

Choose a reason for hiding this comment

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

We should not have to make all of these changes just for the shortcut. I need to dig in a little and for now just want to make sure no one else approves

@spylogsster spylogsster force-pushed the brave-26761 branch 2 times, most recently from c4f0673 to 513c6d8 Compare November 21, 2022 07:39
@spylogsster spylogsster force-pushed the brave-26761 branch 3 times, most recently from 03f2310 to c90d78a Compare November 24, 2022 16:23
@github-actions
Copy link
Contributor

⚠️ PR head is an unsigned commit
commit: c90d78a
reason: unsigned
Please follow the handbook to configure commit signing
cc: @spylogsster

@spylogsster spylogsster force-pushed the brave-26761 branch 3 times, most recently from b5417e5 to 54f20cf Compare December 5, 2022 12:35
@spylogsster spylogsster marked this pull request as draft December 6, 2022 10:09
@spylogsster spylogsster force-pushed the brave-26761 branch 4 times, most recently from d6d86af to 2074022 Compare December 6, 2022 16:25
@spylogsster spylogsster marked this pull request as ready for review December 6, 2022 16:33
@spylogsster spylogsster force-pushed the brave-26825 branch 19 times, most recently from 20fa85b to f54c3c4 Compare January 18, 2023 17:23
Base automatically changed from brave-26825 to master January 19, 2023 06:40
@spylogsster spylogsster force-pushed the brave-26761 branch 5 times, most recently from 4b5e82e to 24df1e1 Compare January 19, 2023 13:45
@spylogsster
Copy link
Contributor Author

spylogsster commented Jan 20, 2023

@spylogsster spylogsster deleted the brave-26761 branch May 16, 2023 15:42
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.

Assign Copy keyboard shortcut to "copy clean link"
3 participants