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

Web3 settings section #16290

Merged
merged 4 commits into from
Dec 15, 2022
Merged

Web3 settings section #16290

merged 4 commits into from
Dec 15, 2022

Conversation

supermassive
Copy link
Collaborator

@supermassive supermassive commented Dec 8, 2022

Resolves brave/brave-browser#14516

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 wiki
    • npm run lint, npm run presubmit wiki, 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:

  • Setting prefs in new locations should work.
  • This Add a policy option to disable Brave Wallet brave-browser#25383 should work(now just hides wallet card)
  • Navigations to Wallet networks should work
  • Navigations to Ipfs peers and Ipns keys should work
  • Navigations to settings/wallet or settings/wallet/networks from wallet ui should work. Now navigates directly to wallet section as before which seems ok.
brave_i0H11W9s7D.mp4

@supermassive supermassive requested a review from a team as a code owner December 8, 2022 10:14
@github-actions github-actions bot added the CI/storybook-url Deploy storybook and provide a unique URL for each build label Dec 8, 2022
@supermassive supermassive force-pushed the web3_settings_section branch 2 times, most recently from 54c7c0f to 04cc607 Compare December 8, 2022 10:24
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2022

⚠️ PR head is an unsigned commit
commit: 04cc6072b724bdfbfa99b146b83a704b02970787
reason: unsigned
Please follow the handbook to configure commit signing
cc: @supermassive

@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

@supermassive supermassive removed the request for review from petemill December 13, 2022 10:28
@petemill petemill self-requested a review December 14, 2022 19:39
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.

Nicely done. Please check for the icon removal before merge.

Comment on lines +278 to +305
let last = basicPageEl.insertAdjacentElement('afterbegin',
sectionGetStarted)
// Move Appearance item
const sectionAppearance = getSectionElement(actualTemplate.content, 'appearance')
sectionGetStarted.insertAdjacentElement('afterend', sectionAppearance)
const sectionAppearance = getSectionElement(actualTemplate.content,
'appearance')
last = last.insertAdjacentElement('afterend', sectionAppearance)
// Insert New Tab
sectionAppearance.insertAdjacentElement('afterend', sectionNewTab)
last = last.insertAdjacentElement('afterend', sectionNewTab)
// Insert shields
sectionNewTab.insertAdjacentElement('afterend', sectionShields)
// Insert Rewards and Social Blocking
if (isBraveRewardsSupported) {
sectionShields.insertAdjacentElement('afterend', sectionRewards)
sectionRewards.insertAdjacentElement('afterend', sectionSocialBlocking)
} else {
sectionShields.insertAdjacentElement('afterend', sectionSocialBlocking)
last = last.insertAdjacentElement('afterend', sectionShields)
// Insert Rewards
if (sectionRewards) {
last = last.insertAdjacentElement('afterend', sectionRewards)
}
// Insert Social Blocking
last = last.insertAdjacentElement('afterend', sectionSocialBlocking)
// Move privacy section to after social blocking
const sectionPrivacy = getSectionElement(actualTemplate.content, 'privacy')
sectionSocialBlocking.insertAdjacentElement('afterend', sectionPrivacy)
last = last.insertAdjacentElement('afterend', sectionPrivacy)
// Insert sync
sectionPrivacy.insertAdjacentElement('afterend', sectionSync)
last = last.insertAdjacentElement('afterend', sectionSync)
// Move search
const sectionSearch = getSectionElement(actualTemplate.content, 'search')
sectionSync.insertAdjacentElement('afterend', sectionSearch)
last = last.insertAdjacentElement('afterend', sectionSearch)
// Insert extensions
sectionSearch.insertAdjacentElement('afterend', sectionExtensions)
// Insert Wallet and IPFS
if (isBraveWalletAllowed) {
sectionExtensions.insertAdjacentElement('afterend', sectionWallet)
sectionWallet.insertAdjacentElement('afterend', sectionIPFS)
} else {
sectionExtensions.insertAdjacentElement('afterend', sectionIPFS)
last = last.insertAdjacentElement('afterend', sectionExtensions)
// Insert Wallet
if (sectionWallet) {
Copy link
Member

Choose a reason for hiding this comment

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

this is a nice improvement

const ipfsEl = createMenuElement(
loadTimeData.getString('braveIPFS'),
'/ipfs',
'brave_settings:ipfs',
Copy link
Member

Choose a reason for hiding this comment

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

I think this means we should remove the ipfs icon from brave_settings unless we show it anywhere else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@brave-builds
Copy link
Collaborator

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

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.

Moving Unstoppable Domains & ENS resolve settings into wallet settings
5 participants