Skip to content

[CCUBE-2221][ZZ] feat: migrate ESignature to Modal v2 - #1428

Open
ziggyzet wants to merge 7 commits into
masterfrom
ZZ/CCUBE-2221
Open

[CCUBE-2221][ZZ] feat: migrate ESignature to Modal v2#1428
ziggyzet wants to merge 7 commits into
masterfrom
ZZ/CCUBE-2221

Conversation

@ziggyzet

Copy link
Copy Markdown
Contributor

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing apis or functionality to change)
  • Documentation (change to documentation, comments or API descriptions)
  • Tests (improvements to unit tests or E2E tests)
  • Other (technical improvements, refactoring, or changes that don't fall into the above categories)

Description of changes

  • Link to ticket
  • Migrating Esignature to use modal v2. There are some screenshot updates after these changes.

Checklist

  • Changes follow the project guidelines in CONTRIBUTING.md and CONVENTIONS.md
  • Looks good on mobile and tablet
  • Updated documentation
  • Added/updated unit tests
  • Added/updated E2E tests

@ziggyzet
ziggyzet requested a review from qroll August 18, 2026 09:34
@ziggyzet ziggyzet self-assigned this Aug 18, 2026
@qroll
qroll requested a review from ghazwan-gt August 19, 2026 03:23
ghazwan-gt
ghazwan-gt previously approved these changes Aug 19, 2026
Comment thread src/e-signature/e-signature.styles.ts
Comment thread src/e-signature/e-signature.styles.ts Outdated
Comment thread src/e-signature/e-signature.styles.ts Outdated
Comment thread src/e-signature/e-signature.styles.ts Outdated
ghazwan-gt
ghazwan-gt previously approved these changes Aug 19, 2026
Comment on lines +102 to +105
await act(async () => {
jest.advanceTimersByTime(500);
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wondering why the assertion on signature modal was removed, and we need to manually handle the timers here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the assertion was to check whether or not it's visible, but we're mount/unmounting for modal v2
modal v2 has a transition animation with 300ms, so that's just to skip the animation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is it not needed for the other tests?

Comment thread src/e-signature/e-signature.styles.ts Outdated
Comment thread src/e-signature/e-signature.styles.ts Outdated
column-gap: 0;
}

&& > button {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we reduce the specificity of the footer button styles?

Comment thread src/e-signature/e-signature.styles.ts Outdated
Comment thread src/e-signature/e-signature.styles.ts Outdated
margin: auto;
padding: ${Spacing["layout-xxl"]} ${Spacing["layout-sm"]};
${MediaQuery.MaxWidth.sm} {
&[data-mobile-landscape][data-mobile-landscape] {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is the data-attribute specified twice?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

to increase the specificity because we're overriding what's inside the modal card

Comment thread src/e-signature/e-signature.styles.ts Outdated
@qroll qroll added type: chore For technical improvements or refactoring. a11y Accessibility type: enhancement New feature or request and removed type: chore For technical improvements or refactoring. labels Aug 24, 2026
@ziggyzet
ziggyzet force-pushed the ZZ/CCUBE-2221 branch 2 times, most recently from 31d0194 to dae2cc2 Compare August 27, 2026 06:46
@ziggyzet
ziggyzet changed the base branch from master to ZZ/CCUBE-2221-fullscreen August 27, 2026 06:49
max-height: none;
margin: 0 auto;
padding: ${Spacing["spacing-16"]};
box-shadow: ${Shadow["lg-strong"]};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what does the box shadow do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Modal.Box had this styling before but ModalV2.Card has xs-strong. Just making sure the styling is similar as the old one as much as possbile

export const scrollableModal = css`
/* increase specificity as the styles are overwritten */
export const modalCard = css`
&& {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we still need the increased specificity?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes still needed here to override the ModalV2.Card styles

box-shadow: ${Shadow["lg-strong"]};
}

& > [data-has-close-button] {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there another way we can style the content without using this data-has-close-button selector? as that's an internal implementation for the modal. it also feels like this could be something that ModalV2 is supposed to handle properly with the fullscreen prop

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will find a workaround then

width: 100%;
margin: auto;
padding: ${Spacing["layout-xxl"]} ${Spacing["layout-sm"]};
export const modalHeader = css`

Copy link
Copy Markdown
Contributor

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.Header we no longer need to specify so many custom styles. what are the changes here and why are they needed?

Copy link
Copy Markdown
Contributor Author

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 ModalV2 is way different to what we were using when it's still Modal

Comment on lines +151 to +152
export const modalContent = css`
&& {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ideally we should avoid using the && selector

@ziggyzet ziggyzet Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

can find work arounds for this then. will comment back if no solution is found

Comment on lines +159 to +160
${MediaQuery.MaxWidth.sm} {
&[data-mobile-landscape] {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm why are these selectors nested?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

to increase specificity as well

Base automatically changed from ZZ/CCUBE-2221-fullscreen to master September 1, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y Accessibility type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants