-
Notifications
You must be signed in to change notification settings - Fork 23
[CCUBE-2221][ZZ] feat: migrate ESignature to Modal v2 #1428
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
Open
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8244555
[CCUBE-2221][ZZ] feat: adding card fullscreen props and adjust styles
ziggyzet e4bf866
[CCUBE-2221][ZZ] story: adding fullscreen story to modal v2 card
ziggyzet e7ac387
[CCUBE-2221][ZZ] feat: migrate e-signature to use modal v2 instead
ziggyzet cd2ef9b
[CCUBE-2221][ZZ] test: adjust unit test post migration
ziggyzet bacf370
[CCUBE-2221][ZZ] test: update screenshot
ziggyzet f34874a
[CCUBE-2221][ZZ] style: remove unneccessary attribute addition
ziggyzet 668e294
[CCUBE-2221][ZZ] style: remove action button styling
ziggyzet 992cbbf
[CCUBE-2221][ZZ] feat: remove customization for footer
ziggyzet 3774a84
[CCUBE-2221][ZZ] feat: update card usage for e-signature and remove c…
ziggyzet 2b9154e
[CCUBE-2221][ZZ] feat: update modal v2 specificity and add property c…
ziggyzet a0e9920
[CCUBE-2221][ZZ] story + test: remove redundant story component and a…
ziggyzet c087d82
[CCUBE-2221][ZZ] feat: implement changes from modal v2 to e-signature
ziggyzet 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
This file contains hidden or 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
Binary file modified
BIN
+452 Bytes
(110%)
...s/e-signature/__screenshots__/chromium/ESignature-Modal-mobile---modal-open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+667 Bytes
(110%)
...ure/__screenshots__/chromium/ESignature-Modal-mobile-landscape---modal-open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 |
|---|---|---|
| @@ -1,11 +1,7 @@ | ||
| import { css } from "@linaria/core"; | ||
|
|
||
| import * as modalStyles from "../modal/modal.styles"; | ||
| import { Border, Colour, Font, MediaQuery, Radius, Spacing } from "../theme"; | ||
|
|
||
| // ============================================================================= | ||
| // STYLING | ||
| // ============================================================================= | ||
| import { headerTokens, slotSpacerTokens } from "../modal-v2/slots/slot-styles"; | ||
| import { Border, Colour, MediaQuery, Radius, Shadow, Spacing } from "../theme"; | ||
|
|
||
| // ----------------------------------------------------------------------------- | ||
| // MAIN FIELD | ||
|
|
@@ -71,56 +67,69 @@ export const instructions = css` | |
| // SIGNATURE MODAL | ||
| // ----------------------------------------------------------------------------- | ||
|
|
||
| export const scrollableModal = css` | ||
| /* increase specificity as the styles are overwritten */ | ||
| && { | ||
| height: 100%; | ||
| overflow-y: auto; | ||
| } | ||
| `; | ||
|
|
||
| export const growContainer = css` | ||
| width: 100%; | ||
| margin: auto; | ||
| padding: ${Spacing["layout-xxl"]} ${Spacing["layout-sm"]}; | ||
|
|
||
| ${MediaQuery.MaxWidth.sm}, &[data-mobile-landscape="true"] { | ||
| padding: 0; | ||
| width: 100%; | ||
| height: 100%; | ||
| } | ||
| `; | ||
|
|
||
| export const modalBox = css` | ||
| export const modalCard = css` | ||
| width: 100%; | ||
| height: 29rem; | ||
| max-width: 672px; | ||
| max-height: none; | ||
| margin: 0 auto; | ||
| padding: ${Spacing["spacing-16"]}; | ||
| box-shadow: ${Shadow["lg-strong"]}; | ||
|
|
||
| ${MediaQuery.MaxWidth.sm}, &[data-mobile-landscape="true"] { | ||
| display: flex; | ||
| flex-direction: column; | ||
| max-width: none; | ||
| height: 100%; | ||
| border-radius: 0; | ||
| padding: 0; | ||
| ${slotSpacerTokens.contentLastChildMarginBottom}: 0; | ||
| `; | ||
|
|
||
| export const modalHeader = css` | ||
| ${headerTokens.padding}: 0 0 ${Spacing["spacing-16"]}; | ||
| position: relative; | ||
|
|
||
| & > button { | ||
| position: absolute; | ||
| top: 0; | ||
| right: 0; | ||
| } | ||
|
|
||
| ${modalStyles.tokens.closeButton.topInset}: ${Spacing["spacing-8"]}; | ||
| ${modalStyles.tokens.closeButton.rightInset}: ${Spacing["spacing-20"]}; | ||
| & > div[aria-hidden] { | ||
| display: none; | ||
| } | ||
|
|
||
| ${MediaQuery.MaxWidth.sm} { | ||
| &[data-mobile-landscape] { | ||
|
Comment on lines
+96
to
+97
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are the selectors supposed to be nested? this means the screen width is sm AND the screen height is sm in the previous selectors, they were comma separated which should have a OR logic |
||
| ${headerTokens.padding}: ${Spacing["spacing-12"]} | ||
| ${Spacing["spacing-20"]}; | ||
| } | ||
|
|
||
| &[data-mobile-landscape] > button { | ||
| top: ${Spacing["spacing-8"]}; | ||
| right: ${Spacing["spacing-20"]}; | ||
| } | ||
| } | ||
|
|
||
| &[data-mobile-landscape="true"] { | ||
| ${headerTokens.padding}: ${Spacing["spacing-12"]} | ||
| ${Spacing["spacing-20"]}; | ||
| } | ||
|
|
||
| &[data-mobile-landscape="true"] > button { | ||
| top: ${Spacing["spacing-8"]}; | ||
| right: ${Spacing["spacing-20"]}; | ||
| } | ||
| `; | ||
|
|
||
| export const modalTitle = css` | ||
| ${Font["body-baseline-semibold"]} | ||
| color: ${Colour["text"]}; | ||
| margin-bottom: ${Spacing["spacing-16"]}; | ||
| text-align: center; | ||
| export const modalContent = css` | ||
| margin: 0; | ||
| display: flex; | ||
| flex-direction: column; | ||
| min-height: 0; | ||
|
|
||
| ${MediaQuery.MaxWidth.sm}, &[data-mobile-landscape="true"] { | ||
| ${Font["body-md-semibold"]} | ||
| margin: ${Spacing["spacing-12"]} 0; | ||
| ${MediaQuery.MaxWidth.sm} { | ||
| &[data-mobile-landscape] { | ||
|
qroll marked this conversation as resolved.
|
||
| flex: 1; | ||
| } | ||
| } | ||
|
|
||
| &[data-mobile-landscape="true"] { | ||
| flex: 1; | ||
| } | ||
| `; | ||
|
|
||
|
|
@@ -130,12 +139,16 @@ export const eSignatureContainer = css` | |
| border-radius: ${Radius["lg"]}; | ||
| overflow: hidden; | ||
|
|
||
| ${MediaQuery.MaxWidth.sm}, &[data-mobile-landscape="true"] { | ||
| border-radius: 0; | ||
| flex: 1; | ||
| ${MediaQuery.MaxWidth.sm} { | ||
| &[data-mobile-landscape] { | ||
| border-radius: 0; | ||
| flex: 1; | ||
| } | ||
| } | ||
|
|
||
| &[data-mobile-landscape="true"] { | ||
| height: auto; | ||
| flex: 1; | ||
| background: ${Colour["bg-strong"]}; | ||
| } | ||
| `; | ||
|
|
@@ -184,28 +197,26 @@ export const modalButtons = css` | |
| justify-content: space-between; | ||
| margin-top: ${Spacing["spacing-16"]}; | ||
|
|
||
| ${MediaQuery.MaxWidth.sm} { | ||
| flex-direction: column-reverse; | ||
| margin: ${Spacing["spacing-16"]} ${Spacing["spacing-24"]} | ||
| ${Spacing["spacing-48"]}; | ||
| gap: ${Spacing["spacing-16"]}; | ||
| & > button { | ||
| width: 8.5rem; | ||
| } | ||
|
|
||
| &[data-mobile-landscape="true"] { | ||
| flex-direction: row; | ||
| margin: ${Spacing["spacing-16"]} ${Spacing["spacing-20"]}; | ||
| } | ||
| `; | ||
|
|
||
| export const modalActionButton = css` | ||
| width: 8.5rem; | ||
|
|
||
| ${MediaQuery.MaxWidth.sm} { | ||
| width: 100%; | ||
| &[data-mobile-landscape] { | ||
| flex-direction: column-reverse; | ||
| margin: ${Spacing["spacing-16"]} ${Spacing["spacing-24"]} | ||
| ${Spacing["spacing-48"]}; | ||
| gap: ${Spacing["spacing-16"]}; | ||
| } | ||
|
|
||
| &[data-mobile-landscape] > button { | ||
| width: 100%; | ||
| } | ||
| } | ||
|
|
||
| &[data-mobile-landscape="true"] { | ||
| height: 2.5rem; | ||
| flex-direction: row; | ||
| margin: ${Spacing["spacing-16"]} ${Spacing["spacing-20"]}; | ||
| } | ||
| `; | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
ideally with the new
ModalV2.Headerwe no longer need to specify so many custom styles. what are the changes here and why are they needed?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.
this was because the header fonts and spacing somehow after changing to using
ModalV2is way different to what we were using when it's stillModal