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

New Tab Page: Prompt for Brave Together #7532

Merged
merged 3 commits into from
Jan 7, 2021
Merged

Conversation

petemill
Copy link
Member

@petemill petemill commented Jan 7, 2021

  • Button in footer always shows
  • Prompt (anchored to button) shows like a tooltip until the user manually closes via button.
  • (Also adds dir="rtl" as attribute in instead of stylesheet so that it's targetable as a css selector. This is done in most chromium webui now.)

Resolves brave/brave-browser#12776

image

image

Button Transitions

button-transitions

Submitter Checklist:

  • There is a ticket for my issue.
  • Used Github auto-closing keywords in the commit message.
  • 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).
  • Requested a security/privacy review as needed.

Reviewer Checklist:

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


import styled from 'brave-ui/theme'

const Button = styled('button')`
Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently this is a new design system-able button style that we can make more shared when the design team iterates a bit more

@@ -186,6 +187,14 @@ export const newTabReducer: Reducer<NewTab.State | undefined> = (state: NewTab.S
break
}

case Actions.dismissTogetherPrompt.getType(): {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like you are preferring not to add an exported constant to new_tab_types. Do you want to eventually remove the need for that file completely?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes just trying to remove 1 layer of boilerplate. I've been using redux-act for Brave Today on the NTP via today_actions.ts and reducers/today, so just continuing that here for anything new.

left: 0;
right: 0;
background: linear-gradient(305.95deg, #BF14A2 0%, #F73A1C 98.59%);
clip-path: polygon(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Neat!

Button in footer always shows
Prompt (anchored to button) shows like a tooltip until the user manually closes via button.
@petemill
Copy link
Member Author

petemill commented Jan 7, 2021

Rebased in order to try to fix CI sync errors. Also added a change to storybook in order to provide an option for right-to-left so that we can easily preview what the browser does on the NTP for certain languages. d880de2

@petemill petemill merged commit 2c354a0 into master Jan 7, 2021
@petemill petemill deleted the ntp-together-button branch January 7, 2021 23:51
@petemill petemill added this to the 1.20.x - Nightly milestone Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add link to Brave Together on New Tab Page
3 participants