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

Siwe 2.0 Sign panel and details dialog #20168

Merged
merged 14 commits into from
Sep 25, 2023
Merged

Siwe 2.0 Sign panel and details dialog #20168

merged 14 commits into from
Sep 25, 2023

Conversation

Pavneet-Sing
Copy link

@Pavneet-Sing Pavneet-Sing commented Sep 14, 2023

Resolves brave/brave-browser#32863

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • 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:

SIWE.webm

@Pavneet-Sing Pavneet-Sing added CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-ios Do not run CI builds for iOS CI/skip-windows-x86 CI/skip-windows-x64 Do not run CI builds for Windows x64 unused-CI/skip-linux-x64 Do not run CI builds for Linux x64 labels Sep 14, 2023
@Pavneet-Sing Pavneet-Sing self-assigned this Sep 14, 2023
@Pavneet-Sing Pavneet-Sing requested a review from a team as a code owner September 14, 2023 10:04
Comment on lines +286 to +288
jsonObject.put("scheme", origin.scheme);
jsonObject.put("host", origin.host);
jsonObject.put("port", origin.port);
Copy link
Author

Choose a reason for hiding this comment

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

Info: LMK if we should also localise these URL titles (scheme, host, port).

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 we are fine with how it is now, but I will let string reviewers to comment on it.

@SergeyZhukovsky
Copy link
Member

I would do more space between text on sign in message.
We can base the PR off master since the original PR is already merged.

@Pavneet-Sing
Copy link
Author

Pavneet-Sing commented Sep 15, 2023

I would do more space between text on sign in message.
We can base the PR off master since the original PR is already merged.

Will add some padding between the items.
This PR was based upon master (with origin PR changes) before creation, don't see any conflicts etc though LMK if there's anything missing.

Padding updated: 585cb2d

Copy link
Contributor

@AlexeyBarabash AlexeyBarabash left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

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

++

Copy link
Member

@kdenhartog kdenhartog left a comment

Choose a reason for hiding this comment

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

few comments for the code, still need to do some dynamic testing with this

Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

strings++

@kdenhartog
Copy link
Member

Screen.Recording.2023-09-20.at.11.12.36.AM.mov

The "see details" tab is currently not displaying all of the necessary details nor is it scrollable. Can we fix this and then no other security concerns.

@Pavneet-Sing
Copy link
Author

Pavneet-Sing commented Sep 20, 2023

Screen.Recording.2023-09-20.at.11.12.36.AM.mov
The "see details" tab is currently not displaying all of the necessary details nor is it scrollable. Can we fix this and then no other security concerns.

I just compared the above with desktop and I don't see any missing details, could you be more specific about what details are missing? though I think it is same as desktop so probably we are good here?

Seems like we missed the not before and requestId fields in the origin SIWE PR so thanks for noticing it. Updated this PR with the changes d2777a6

SIWE2.webm

BTW, the list is scroll-able but there are no more details to scroll. Dialog is able to show all the details in the current window so scroll is not required. (though you can observe the upwards movement in the details list but there are no more items to show hence no scrolling,)

@kdenhartog
Copy link
Member

Sounds good, I'll build the latest overnight on CI and check it in the morning

@Pavneet-Sing
Copy link
Author

Sounds good, I'll build the latest overnight on CI and check it in the morning

Did you get a chance to test this?

@kdenhartog
Copy link
Member

kdenhartog commented Sep 25, 2023

Sorry about the delay, started the build and never got back to testing until just now. I'm not seeing this fixed though.
Link to the build I ran. which is relying on the latest revision of d2777a6 (#20168). Are you seeing the same thing I'm seeing? I'm just realizing I didn't state what I saw missing last time 🤦🏻 . The particular attribute I'm thinking about here is the Resources property. This should still be viewable in both the consolidated and detailed view like the statement is.

Also, it would be ideal to make sure the origin property didn't wrap host value within the JSON. Right now the host is split in a way that makes it unclear if this is very long.

Screen.Recording.2023-09-25.at.7.06.31.PM.mp4

@Pavneet-Sing
Copy link
Author

Pavneet-Sing commented Sep 25, 2023

Sorry about the delay, started the build and never got back to testing until just now. I'm not seeing this fixed though. Link to the build I ran. which is relying on the latest revision of d2777a6 (#20168). Are you seeing the same thing I'm seeing? I'm just realizing I didn't state what I saw missing last time 🤦🏻 . The particular attribute I'm thinking about here is the Resources property. This should still be viewable in both the consolidated and detailed view like the statement is.

Also, it would be ideal to make sure the origin property didn't wrap host value within the JSON. Right now the host is split in a way that makes it unclear if this is very long.

Screen.Recording.2023-09-25.at.7.06.31.PM.mp4

Thanks for the quick response and details. Per comment and DM discussion, I have added the resources and host in the details dialog b9231db . PTAL.

SIWE.webm

Copy link
Member

@kdenhartog kdenhartog left a comment

Choose a reason for hiding this comment

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

We're going to push origin changes for now and address in brave/brave-browser#33227 instead. Rest LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-windows-x64 Do not run CI builds for Windows x64 feature/web3/wallet unused-CI/skip-linux-x64 Do not run CI builds for Linux x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update android SIWE flow per spec
5 participants