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 Today: dismiss intro card if it has been viewed for 4 seconds #7111

Merged
merged 3 commits into from
Dec 1, 2020

Conversation

petemill
Copy link
Member

@petemill petemill commented Nov 10, 2020

Stores a profile pref when the Intro Card (and it's Tab) have been in view for 4 seconds. Does not immediately get removed from page, it just won't show up on the next page load.

Resolves brave/brave-browser#12960

Submitter Checklist:

Test Plan:

On issue

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@petemill petemill requested review from bsclifton and ryanml November 10, 2020 21:55
@petemill petemill self-assigned this Nov 10, 2020
)
// don't render if user prefers an empty page
if (props.newTabData.showEmptyPage && !props.newTabData.isIncognito) {
return <div />
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: any reason not to just return null here?

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure, I just moved this code from a class to a function (for no particular reason in the end as I didn't use). I think the div is for the blank page? But there's no styling. And in fact this pref is not real. So this code will never fire! We should probably remove that at some point then...

@petemill petemill requested a review from ryanml November 11, 2020 22:28
@petemill
Copy link
Member Author

Seems like CI is ok, ping @bsclifton @ryanml

@bsclifton
Copy link
Member

@petemill just needs rebase - but I can check out after that 😄

@petemill petemill force-pushed the brave-today-publisher branch from a68b6c8 to 61d58d6 Compare November 30, 2020 19:41
@petemill petemill force-pushed the brave-today-publisher branch from 61d58d6 to 098e065 Compare November 30, 2020 19:51
@petemill
Copy link
Member Author

rebased

Copy link
Contributor

@ryanml ryanml left a comment

Choose a reason for hiding this comment

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

changes lgtm

@petemill
Copy link
Member Author

petemill commented Dec 1, 2020

Linux had unrelated test failure RewardsPromotionBrowserTest.ClaimViaPanel

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.

Brave Today intro card should dismiss
3 participants