Skip to content

[PF-1994] Migrate Modal fix shades#5015

Merged
azebich merged 5 commits into
feature/picasso-modernization-tempfrom
pf-1994-fix-migrate-modal
Jun 19, 2026
Merged

[PF-1994] Migrate Modal fix shades#5015
azebich merged 5 commits into
feature/picasso-modernization-tempfrom
pf-1994-fix-migrate-modal

Conversation

@azebich

@azebich azebich commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

PF-1994

Description

ModalContent renders top/bottom gradient "shades" that hint at scrollable
overflow. Previously each shade was conditionally mounted ({top && …} /
{bottom && …}), so it popped in and out of the DOM as the user scrolled,
with no transition.

This changes both shades to be always rendered and toggled purely in CSS:
visibility is driven from the DOM via a data-active attribute, and the fade
is handled by opacity + transition-opacity duration-300.

Motivations:

  • Smooth fade instead of a hard pop — the shade now fades in/out over 300ms
    instead of appearing/disappearing instantly.
  • Aligns with the styling doctrine — state-driven styling should use
    data-[…]: variants (read state from the DOM) rather than branching the
    render tree (AGENTS.md › Styling).
  • Consistencyduration-300 matches the sibling overlay surface
    (Drawer uses transition-opacity duration-300), and both shades now share
    one class string, fixing a prior mismatch where only the bottom shade carried
    duration-300.

Scope:

  • No public API change — Props and classes?: { root, topShade, bottomShade }
    are untouched, so consumers need no migration.
  • Scroll detection (use-scrollable-shades) is intentionally unchanged; this PR
    only changes how the shades are displayed. (A CSS-only detection path —
    animation-timeline: scroll() / scroll-state() — isn't viable under the
    repo's browserslist, which still targets Safari 13+ and Firefox.)

How to test

  • Temploy
  • Open any Modal with content taller than its viewport (e.g. Modal → Dynamic
    Content story).
  • Scroll the content down: the top shade should fade in; scroll back up:
    it should fade out. Scroll to the very bottom: the bottom shade should
    fade out.
  • With content that fits (no overflow): neither shade should be visible.

Screenshots

Before After
Shade pops in/out instantly (no transition) Shade fades in/out over 300ms
Before-1.mp4
After-1.mp4

@azebich azebich requested review from dulishkovych and vedrani June 18, 2026 11:15
@azebich azebich self-assigned this Jun 18, 2026
@azebich azebich requested a review from a team as a code owner June 18, 2026 11:15
@changeset-bot

changeset-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4198b2c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 6 packages
Name Type
@toptal/picasso-modal Patch
@toptal/picasso-rich-text-editor Patch
@toptal/picasso Patch
@toptal/picasso-prompt-modal Patch
@toptal/picasso-forms Patch
@toptal/picasso-query-builder Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/5015/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/5015/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
@azebich azebich force-pushed the pf-1994-fix-migrate-modal branch from b2a45f9 to 4bede77 Compare June 18, 2026 13:29
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/5015/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/5015/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
Comment thread packages/base/Modal/src/ModalContent/ModalContent.tsx

@dulishkovych dulishkovych left a comment

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.

LGTM

@azebich azebich enabled auto-merge (squash) June 19, 2026 15:35
@azebich azebich merged commit c46ff96 into feature/picasso-modernization-temp Jun 19, 2026
12 checks passed
@azebich azebich deleted the pf-1994-fix-migrate-modal branch June 19, 2026 15:36
@github-actions

Copy link
Copy Markdown
Contributor

🗑️ Storybook preview cleaned up

The preview deployment has been automatically removed since this PR was closed.

github-actions Bot added a commit that referenced this pull request Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants