-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
feat(3765): Add modal to include metric id before redirecting to support page #30415
Merged
+537
−78
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6bdddbf
feat(3765): Add modal to include metric id before redirecting to supp…
DDDDDanica f0b04fe
Handle empty ids in support link; pass in handler as params
DDDDDanica eda4e90
Removed unnecessary changes
DDDDDanica 31b2ba4
Fix lint issues
DDDDDanica cfea884
Fix lint in info-tab.test.tsx
DDDDDanica 1355c2a
Fix lint
DDDDDanica 460da69
fix lint
DDDDDanica File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
...pp/modals/visit-support-data-consent-modal/__snapshots__/visit-support-data.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`VisitSupportDataConsentModal renders the modal correctly when open 1`] = ` | ||
<div | ||
class="mm-modal visit-support-data-consent-modal" | ||
data-testid="visit-support-data-consent-modal" | ||
> | ||
<div | ||
aria-hidden="true" | ||
class="mm-box mm-modal-overlay mm-box--width-full mm-box--height-full mm-box--background-color-overlay-default" | ||
/> | ||
<div | ||
data-focus-guard="true" | ||
style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" | ||
tabindex="0" | ||
/> | ||
<div | ||
data-focus-lock-disabled="false" | ||
> | ||
<div | ||
class="mm-box mm-modal-content mm-box--padding-top-4 mm-box--sm:padding-top-8 mm-box--md:padding-top-12 mm-box--padding-right-4 mm-box--padding-bottom-4 mm-box--sm:padding-bottom-8 mm-box--md:padding-bottom-12 mm-box--padding-left-4 mm-box--display-flex mm-box--justify-content-center mm-box--align-items-flex-start mm-box--width-screen mm-box--height-screen" | ||
> | ||
<section | ||
aria-modal="true" | ||
class="mm-box mm-modal-content__dialog mm-modal-content__dialog--size-sm mm-box--padding-top-4 mm-box--padding-bottom-4 mm-box--display-flex mm-box--flex-direction-column mm-box--width-full mm-box--background-color-background-default mm-box--rounded-lg" | ||
role="dialog" | ||
> | ||
<header | ||
class="mm-box mm-header-base mm-modal-header mm-box--padding-right-4 mm-box--padding-bottom-4 mm-box--padding-left-4 mm-box--display-flex mm-box--justify-content-space-between" | ||
> | ||
<div | ||
class="mm-box mm-box--width-full" | ||
> | ||
<h4 | ||
class="mm-box mm-text mm-text--heading-sm mm-text--text-align-center mm-box--color-text-default" | ||
> | ||
Share device details with support | ||
</h4> | ||
</div> | ||
</header> | ||
<div | ||
class="mm-box mm-modal-body visit-support-data-consent-modal__body mm-box--padding-right-4 mm-box--padding-left-4" | ||
> | ||
<p | ||
class="mm-box mm-text mm-text--body-md mm-box--color-text-default" | ||
> | ||
Do you want to share your MetaMask Identifier and app version with our Support Center? This can help us better solve your problem, but is optional. | ||
</p> | ||
</div> | ||
<div | ||
class="mm-box mm-modal-footer mm-box--padding-top-4 mm-box--padding-right-4 mm-box--padding-left-4" | ||
> | ||
<div | ||
class="mm-box mm-box--display-flex mm-box--gap-4" | ||
> | ||
<button | ||
class="mm-box mm-text mm-button-base mm-button-base--size-lg mm-button-secondary mm-text--body-md-medium mm-box--padding-0 mm-box--padding-right-4 mm-box--padding-left-4 mm-box--display-inline-flex mm-box--justify-content-center mm-box--align-items-center mm-box--width-1/2 mm-box--color-primary-default mm-box--background-color-transparent mm-box--rounded-pill mm-box--border-color-primary-default box--border-style-solid box--border-width-1" | ||
data-testid="visit-support-data-consent-modal-reject-button" | ||
> | ||
Don’t share | ||
</button> | ||
<button | ||
class="mm-box mm-text mm-button-base mm-button-base--size-lg mm-button-primary mm-text--body-md-medium mm-box--padding-0 mm-box--padding-right-4 mm-box--padding-left-4 mm-box--display-inline-flex mm-box--justify-content-center mm-box--align-items-center mm-box--width-1/2 mm-box--color-primary-inverse mm-box--background-color-primary-default mm-box--rounded-pill" | ||
data-testid="visit-support-data-consent-modal-accept-button" | ||
data-theme="light" | ||
> | ||
Confirm | ||
</button> | ||
</div> | ||
<div | ||
class="mm-box mm-container mm-container--max-width-sm mm-box--margin-right-auto mm-box--margin-left-auto mm-box--display-flex mm-box--gap-4 mm-box--flex-wrap-wrap mm-box--align-items-center" | ||
/> | ||
</div> | ||
</section> | ||
</div> | ||
</div> | ||
<div | ||
data-focus-guard="true" | ||
style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" | ||
tabindex="0" | ||
/> | ||
</div> | ||
`; |
10 changes: 10 additions & 0 deletions
10
ui/components/app/modals/visit-support-data-consent-modal/index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@use 'design-system'; | ||
|
||
.visit-support-data-consent-modal { | ||
&__body { | ||
&__preference-checkbox { | ||
margin-top: 16px; | ||
margin-bottom: 16px; | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
ui/components/app/modals/visit-support-data-consent-modal/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './visit-support-data-consent-modal'; |
15 changes: 15 additions & 0 deletions
15
.../app/modals/visit-support-data-consent-modal/visit-support-data-consent-modal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import VisitSupportDataConsentModal from '.'; | ||
|
||
export default { | ||
title: 'Components/App/Modals/VisitSupportDataConsentModal', | ||
}; | ||
|
||
export const DefaultStory = () => ( | ||
<VisitSupportDataConsentModal | ||
isOpen | ||
onClose={() => {}} | ||
/> | ||
); | ||
|
||
DefaultStory.storyName = 'Default'; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.