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

Brave Talk code cleanup (renaming) and putting behind flag for Griffin #9605

Merged
merged 5 commits into from
Aug 3, 2021

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Aug 2, 2021

Fixes brave/brave-browser#17138
Fixes brave/brave-browser#17210

This pull request has two goals:

  • Rename all occurrences of Brave Together or Together in the code as Brave Talk
  • Put the Brave Talk functionality behind a feature flag

We could then roll this feature out using Griffin on a per-channel basis

Extra care was taken with renaming. I had originally done as a large series of commits and then squashed similar types together (renaming files, updating strings, updating extension API, updating the JavaScript references). Between each commit, I compiled and tested to make sure things work

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
  • 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:

@bsclifton bsclifton self-assigned this Aug 2, 2021
@bsclifton bsclifton changed the title WIP: Brave Talk code cleanup (renaming) and putting behind flag for Griffin Brave Talk code cleanup (renaming) and putting behind flag for Griffin Aug 2, 2021
@bsclifton bsclifton marked this pull request as ready for review August 2, 2021 06:03
@bsclifton bsclifton requested a review from a team as a code owner August 2, 2021 06:03
@bsclifton bsclifton force-pushed the bsc-uplift-brave-talk branch from a6e7c98 to ee5db1c Compare August 2, 2021 06:08
- JavaScript/TypeScript files together => braveTalk
- Rename extension API
- Rename components/brave_together => components/brave_talk
- Rename file `togetherIcon` => `braveTalkIcon`
- Rename file `brave-together-icon.tsx` => `brave-talk-svg.tsx`
We can instead put this behind a brave://flags entry
@bsclifton bsclifton force-pushed the bsc-uplift-brave-talk branch from ee5db1c to b2f2633 Compare August 2, 2021 06:09
Copy link
Member

@simonhong simonhong left a comment

Choose a reason for hiding this comment

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

++ nice cleanup!

@bsclifton
Copy link
Member Author

Found brave/brave-browser#17301 when testing - this is also happening on Nightly (ex: wasn't introduced by this PR)

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.

Renames all look great! Can we rebase most of the commits which are either renaming or addressing review feedback?

Comment on lines +80 to +81
braveTalkPromptDismissed: boolean
braveTalkSupported: boolean
Copy link
Member

Choose a reason for hiding this comment

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

This will bring the prompt back for users on Nightly channel who dismissed it, but that's totally ok by me!

@bsclifton
Copy link
Member Author

Rebase and squashing would be perfect! Maybe once @goodov gives this a re-review, I'll be able to squash it up 😄

@bsclifton bsclifton added the CI/skip Do not run CI builds (except noplatform) label Aug 3, 2021
Originally done as separate commits (one at a time) and compiled/tested after each.

Fixes brave/brave-browser#17138

- Update component namespace (from `brave_together` to `brave_talk`)
- Update extension API (from `braveTogether` to `braveTalk`)
- Update strings (from `together`/`TOGETHER` to `braveTalk`/`BRAVE_TALK`)
- Rename `showTogether` => `showBraveTalk`
- Rename `togetherSupported` => `braveTalkSupported`
- Rename constant `kNewTabPageShowTogether` => `kNewTabPageShowBraveTalk`
  (Does not affect actual profile setting)
- Rename Widget (from `TogetherWidget` to `BraveTalkWidget`)
- Rename `togetherPromptDismissed` => `braveTalkPromptDismissed`
- Rename `supportsTogether` => `supportsBraveTalk`
- Rename `saveShowTogether` => `saveShowBraveTalk`
- Rename `toggleShowTogether` => `toggleShowBraveTalk`
- Rename `TogetherTooltip` => `BraveTalkTooltip`
- Rename `TogetherIcon` => `BraveTalkIcon`
- Rename `renderTogetherWidget` => `renderBraveTalkWidget`
- Rename `dismissTogetherPrompt` => `dismissBraveTalkPrompt`
- Rename `onDismissTogetherPrompt` => `onDismissBraveTalkPrompt`
- Rename `togetherBanner` => `braveTalkBanner`
- Rename `TogetherItem` => `BraveTalkItem`
- Rename `BraveTogetherIcon` as `BraveTalkSvg`
- Rename "widget stack" name from `together` to `braveTalk`
Will allow us to roll the feature out on other channels using Griffin

Fixes brave/brave-browser#17210
Remove unused code (Brave Talk widget region restriction)
@bsclifton bsclifton force-pushed the bsc-uplift-brave-talk branch from d87ac4c to d6df0ea Compare August 3, 2021 15:50
@bsclifton bsclifton merged commit f0ae40b into master Aug 3, 2021
@bsclifton bsclifton deleted the bsc-uplift-brave-talk branch August 3, 2021 15:51
@bsclifton bsclifton added this to the 1.29.x - Nightly milestone Aug 3, 2021
bsclifton added a commit that referenced this pull request Aug 3, 2021
Brave Talk code cleanup (renaming) and putting behind flag for Griffin
@stephendonner
Copy link
Contributor

stephendonner commented Aug 4, 2021

Verified PASSED using

Brave 1.29.50 Chromium: 92.0.4515.131 (Official Build) nightly (x86_64)
Revision 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS macOS Version 11.5.1 (Build 20G80)

Steps:

  1. new profile
  2. launched Brave using --variations-server-url=https://variations.bravesoftware.com/seed
  3. restarted
  4. opened a new-tab page
  5. saw the Brave Talk promo "tooltip" on the bottom-right corner
  6. clicked Edit Cards and confirmed Brave Talk appeared
  7. clicked + Add to add Brave Talk
  8. confirmed widget displayed
  9. confirmed all relevant text is Brave Talk
  10. clicked on blurple Start video call button and confirmed I went to https://talk.brave.com/widget
  11. confirmed Try it out in promo tooltip links to https://talk.brave.com/widget
example example
Screen Shot 2021-08-04 at 12 05 06 PM Screen Shot 2021-08-04 at 12 11 10 PM

@stephendonner
Copy link
Contributor

Also verified on production using the same build

Brave 1.29.50 Chromium: 92.0.4515.131 (Official Build) nightly (x86_64)
Revision 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS macOS Version 11.5.1 (Build 20G80)
example example
Screen Shot 2021-08-04 at 12 55 59 PM Screen Shot 2021-08-04 at 1 13 23 PM

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.

Uplift Brave Talk to Beta/Release Clean up/rename Brave Together code references to Brave Talk
5 participants