Skip to content

feat(Popover): update spacing and use elevation tokens#3133

Open
ravikumar-rajagopalan wants to merge 10 commits intosparkfrom
feat/update-popover
Open

feat(Popover): update spacing and use elevation tokens#3133
ravikumar-rajagopalan wants to merge 10 commits intosparkfrom
feat/update-popover

Conversation

@ravikumar-rajagopalan
Copy link
Collaborator

@ravikumar-rajagopalan ravikumar-rajagopalan commented Feb 3, 2026

Summary

  • Updated Popover component with latest Figma design specifications
  • Refactored to use elevation tokens instead of hardcoded values
  • Created reusable popup box shadow utility for design system consistency

Changes

Spacing Updates

  • Increased wrapper padding from spacing.4 (12px) to spacing.5 (16px)
  • Increased main gap from spacing.4 to spacing.5 (16px) between sections
  • Added new content wrapper with spacing.2 (4px) gap between header and body content
  • Fixed import order linter issue in PopoverContent.tsx

Elevation Token Usage

  • Refactored popoverTokens.ts to use elevation.midRaised token
  • Removed hardcoded color value hsla(200, 10%, 18%, 0.06)
  • Now properly uses design system elevation tokens for consistent shadow appearance

New Utility

  • Created makePopupBoxShadow utility in ~utils
  • Follows same pattern as makeSpace, makeSize, etc.
  • Provides reusable ShadowLayer type and conversion function
  • Can be used by other popup components (Tooltip, Dropdown, BottomSheet, etc.)

Design Tokens Used

  • Padding: spacing.5 (16px) - wrapper padding
  • Section gap: spacing.5 (16px) - between content and footer
  • Header-body gap: spacing.2 (4px) - between header and body
  • Elevation: elevation.midRaised - drop shadow for elevation
  • Aligns with design system standards from Figma

Testing

  • ✅ All unit tests passing (Popover: 11/11, Tour: 5/5)
  • ✅ Snapshots updated (Popover and SpotlightPopoverTour)
  • ✅ Linting issues fixed
  • ✅ No linter errors
  • ✅ Visual verification in Storybook completed

Files Changed

Modified

  • popoverTokens.ts - Refactored to use elevation tokens
  • PopoverContent.tsx - Updated spacing values
  • Popover.web.tsx - Updated spacing values
  • PopoverCloseButton.tsx - Updated positioning
  • getPopoverContentWrapperStyles.ts - Uses updated shadow function
  • utils/index.ts - Exports new utility

Added

  • utils/makePopupBoxShadow/ - New common utility for popup shadows

Related

Figma: https://www.figma.com/design/jubmQL9Z8V7881ayUD95ps/Blade-DSL?node-id=115756-259388

Made with Cursor

Updated PopoverContent component to align with latest Figma design specifications:
- Increased wrapper padding from spacing.4 (12px) to spacing.5 (16px)
- Increased main gap from spacing.4 to spacing.5 (16px)
- Added new content wrapper with spacing.2 (4px) gap between header and body
- Fixed import order linter issue

This provides better visual hierarchy and spacing consistency across the component.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

⚠️ No Changeset found

Latest commit: a81dc69

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 no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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
Contributor

github-actions bot commented Feb 3, 2026

✅ PR title follows Conventional Commits specification.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 3, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 913e7f1:

Sandbox Source
razorpay/blade: basic Configuration

ravikumar-rajagopalan and others added 7 commits February 4, 2026 14:21
Merged latest changes from spark branch. Resolved snapshot conflicts by accepting spark version - snapshots will be regenerated with new Popover styling changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Changed background and border colors in Popover components to align with new design specifications.
- Updated box shadow implementation using a new utility function from popoverTokens for improved visual consistency.
- Adjusted PopoverCloseButton and PopoverHeader to use medium size for better alignment with design.
- Introduced popoverTokens.ts to manage shadow layers and enhance maintainability.

This refactor enhances the visual hierarchy and adheres to the latest design guidelines.
- Renamed shadow layer utility function for clarity and improved maintainability.
- Updated box shadow implementation in getPopoverBoxShadow to utilize the new utility function.
- Adjusted comments in popoverTokens for better understanding of shadow layer configurations.

This refactor improves code readability and aligns with the latest design specifications.
- Adjusted background and border colors in Popover components for better visual consistency.
- Increased padding and gap values to enhance layout and alignment with design specifications.
- Updated button and text elements to improve accessibility and interaction feedback.
- Enhanced box shadow effects for a more refined appearance.

These changes ensure the Popover component adheres to the latest design guidelines and improves user experience.
Reverts unintended formatting change to .cursor/commands/update-blade-component.md

Co-authored-by: Cursor <cursoragent@cursor.com>
…pdate-popover

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	packages/blade/src/components/Popover/__tests__/__snapshots__/Popover.web.test.tsx.snap
#	packages/blade/src/components/SpotlightPopoverTour/__tests__/__snapshots__/Tour.web.test.tsx.snap
- Introduced `makePopupBoxShadow` utility for improved box-shadow handling in Popover components.
- Updated `getPopoverBoxShadow` to utilize the new utility, enhancing shadow layer management.
- Adjusted Popover styles, including padding, gap, and background color for better alignment with design specifications.
- Regenerated snapshots to reflect the updated styles and structure.

These changes enhance the visual consistency and maintainability of the Popover component.
@ravikumar-rajagopalan ravikumar-rajagopalan changed the title feat(Popover): update spacing to match Figma design feat(Popover): update spacing and use elevation tokens Feb 5, 2026
@ravikumar-rajagopalan ravikumar-rajagopalan marked this pull request as ready for review February 5, 2026 12:39
ravikumar-rajagopalan and others added 2 commits February 6, 2026 12:13
Restored snapshot files to match the base spark branch

Co-authored-by: Cursor <cursoragent@cursor.com>
…styling

- Removed the strokeColor prop from both Popover and TourPopover components to streamline styling.
- This change aligns with the recent updates to the visual design specifications, enhancing the overall appearance of the components.
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.

1 participant