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 News 2.0 Settings UI #14268

Merged
merged 3 commits into from
Oct 15, 2022
Merged

Brave News 2.0 Settings UI #14268

merged 3 commits into from
Oct 15, 2022

Conversation

fallaciousreasoning
Copy link
Contributor

@fallaciousreasoning fallaciousreasoning commented Jul 21, 2022

This adds as much of the new settings UI from here as possible without the required backend changes.

Here's a video showcasing the new UI
Screencast from 05-10-22 15:29:36.webm

Resolves brave/brave-browser#25801

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:

On brave/brave-browser#25801

@github-actions github-actions bot added the CI/storybook-url Deploy storybook and provide a unique URL for each build label Jul 21, 2022
@petemill
Copy link
Member

petemill commented Jul 28, 2022

Potential list of what this feature needs before we can merge it (or at least release if behind a flag, but that may be more complicated than it's worth):

@fallaciousreasoning fallaciousreasoning force-pushed the news2ui branch 2 times, most recently from 3f83dc7 to 11fe16b Compare August 22, 2022 00:26
@fallaciousreasoning fallaciousreasoning force-pushed the news2ui branch 2 times, most recently from bc29cb3 to 5036714 Compare September 13, 2022 23:09
@fallaciousreasoning fallaciousreasoning force-pushed the news2ui branch 5 times, most recently from 83afe28 to 43f794a Compare October 4, 2022 22:31
@fallaciousreasoning fallaciousreasoning marked this pull request as ready for review October 4, 2022 22:31
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

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.

This is great, especially visually. I left some feedback, mostly organizational.
I had an issue when testing migration experience. Probably related to another PR and maybe we need to fix in a follow-up, but this is how I tested:

  • Started a profile (pointing at brave news staging) with the "news 2.0" flag set to default
  • Opted in to Brave News and could see content
  • Enabled the "news 2.0" flag
  • Restarted
    After that, Brave News had no feed content. I wasn't subscribed to the "Top Sources" channel. One I added that subscription manually, Brave News had content again.

const CloseButton = styled(Button)`
--inner-border-size: 0;
--outer-border-size: 0;
padding: 12px;
Copy link
Member

Choose a reason for hiding this comment

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

See my note on button customizations vs dedicated close button.

Following
</message>
<message name="IDS_BRAVE_NEWS_SOURCE_COUNT" desc="Label saying how many sources you currently have">
<ph name="FEED_COUNT">$1<ex>10</ex></ph> sources
Copy link
Member

Choose a reason for hiding this comment

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

If this starts to look strange (e.g. in English when there is only 1 source), there is a facility to do differing translation variants for 0, 1 or more counts.

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.

@petemill
Copy link
Member

petemill commented Oct 13, 2022

I pushed a rebase and squash, and fixed an issue with the storybook GN build target deps

@petemill petemill force-pushed the news2ui branch 3 times, most recently from cc02e2b to cdf09fc Compare October 14, 2022 21:38
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

1 similar comment
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@petemill petemill added this to the 1.46.x - Nightly milestone Oct 15, 2022
fallaciousreasoning and others added 3 commits October 15, 2022 11:09
…ions, search and a

separate list of subscribed sources and channels
This functionality is behind a flag

Storybook build depends on chrome://resources/js/plural_string_proxy.js

via comeponents/brave_new_tab_ui/components/default/braveToday/customize/SourcesList.tsx

News customize - lazy-load the modal dialog
…licks a button

Also
- Include publishers with matching site and feed url
- Match global publishers
- Adjust section titles
- Refactor to split Discover Home from Search Results
…rces urls

and stub plural_string_proxy.js.ts so it does not error
@petemill
Copy link
Member

I added the license header to all the files and pushed

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@petemill petemill merged commit d24fddd into master Oct 15, 2022
@petemill petemill deleted the news2ui branch October 15, 2022 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/storybook-url Deploy storybook and provide a unique URL for each build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Brave News Customize 2.0 UI
3 participants