Skip to content

feat(Popup, Select)!: set default common floating offset#2660

Open
Valent1325 wants to merge 2 commits into
mainfrom
feat/popup-floating-offset
Open

feat(Popup, Select)!: set default common floating offset#2660
Valent1325 wants to merge 2 commits into
mainfrom
feat/popup-floating-offset

Conversation

@Valent1325
Copy link
Copy Markdown
Contributor

@Valent1325 Valent1325 commented Apr 29, 2026

Summary by Sourcery

Set a shared floating offset constant and use it as the default spacing for popup and select popups.

New Features:

  • Introduce a FLOATING_OFFSET constant to standardize default spacing for floating UI elements.

Enhancements:

  • Use the shared FLOATING_OFFSET as the default offset for Popup components and as the main-axis offset for Select popup middleware to keep spacing consistent across components.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 29, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Introduce a shared FLOATING_OFFSET constant and use it as the default offset for Popup and as the main-axis offset in SelectPopup floating middlewares to keep popup spacing consistent across components.

File-Level Changes

Change Details Files
Use a shared floating offset constant as the default offset for Popup positioning.
  • Replace the hardcoded default offset value with a named constant for the Popup component
  • Continue to pass the offset prop through as before, preserving override behavior
src/components/Popup/Popup.tsx
Add a FLOATING_OFFSET constant alongside other popup layout constants.
  • Define a FLOATING_OFFSET constant with value 4 to centralize configuration of popup spacing
  • Keep existing constants (placements, arrow size, overflow padding, transition duration) unchanged
src/components/Popup/constants.ts
Align SelectPopup middleware offset with the shared floating offset constant.
  • Update the floating offset middleware to use the shared FLOATING_OFFSET for the main axis offset while retaining BORDER_WIDTH for the cross axis
  • Preserve existing flip and shift middleware behavior
src/components/Select/components/SelectPopup/middlewares.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gravity-ui
Copy link
Copy Markdown
Contributor

gravity-ui Bot commented Apr 29, 2026

Preview is ready.

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.

Something went wrong 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.

I returned correct snapshot

@korvin89 korvin89 changed the title feat(Popup, Select): set default common floating offset feat(Popup, Select)!: set default common floating offset Apr 29, 2026
@korvin89 korvin89 added this to the V8 milestone Apr 29, 2026
Copy link
Copy Markdown
Contributor

@korvin89 korvin89 left a comment

Choose a reason for hiding this comment

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

This is a breaking change, let's fix the screenshot and wait for V8

@gravity-ui
Copy link
Copy Markdown
Contributor

gravity-ui Bot commented Apr 29, 2026

🎭 Component Tests Report is ready.

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