refactor(core-components): forward popover props from FieldDocPopover#30165
Open
ShaileshParmar11 wants to merge 2 commits into
Open
refactor(core-components): forward popover props from FieldDocPopover#30165ShaileshParmar11 wants to merge 2 commits into
ShaileshParmar11 wants to merge 2 commits into
Conversation
Contributor
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
ShaileshParmar11
force-pushed
the
refactor/field-doc-popover-spread
branch
from
July 17, 2026 07:23
95fe557 to
ba92bd9
Compare
Extend FieldDocPopoverProps from the underlying PopoverProps and spread the rest onto Popover, so future popover props no longer need threading one by one. className is accepted as a string and merged onto the card's own styling via cx (twMerge), so callers can extend it without replacing it. offset/maxHeight stay destructured with their defaults: consumers (e.g. HookForm) forward them unconditionally, so an undefined value would otherwise land in the spread and clobber the default. triggerRef is applied after the spread so the internal anchor can't be overridden. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ShaileshParmar11
force-pushed
the
refactor/field-doc-popover-spread
branch
from
July 17, 2026 07:29
ba92bd9 to
c4016d2
Compare
siddhant1
approved these changes
Jul 17, 2026
ShaileshParmar11
enabled auto-merge (squash)
July 17, 2026 08:10
Contributor
🟡 Playwright Results — all passed (33 flaky)✅ 4538 passed · ❌ 0 failed · 🟡 33 flaky · ⏭️ 95 skipped
🟡 33 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedRefactors FieldDocPopover to forward underlying popover props via spread and properly merges className. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Follow-up to #30143 (review comment) — @siddhant1 asked that
FieldDocPopoverspread its props onto the underlyingPopoverrather than threading them one by one, and thatclassNamebe extracted and merged rather than dropped.FieldDocPopoverPropsnow extends the underlyingPopoverProps, and the rest is spread onto<Popover>, so future popover props don't need threading individually.classNameis accepted and merged onto the card's own styling viacx(twMerge), matching the existing pattern intable.tsx— and handling react-aria's render-prop form (string | (renderProps) => string).Omitted:isOpen/isNonModal(its open behaviour) andtriggerRef(the field it anchors to).triggerRefis applied after the spread so the internal anchor can't be overridden.Why
offset/maxHeightstay outside the spreadThey're destructured with their defaults rather than riding the spread.
HookFormforwards them unconditionally (maxHeight={fieldDocMaxHeight}), so when a consumer doesn't set them the key still exists with valueundefined— and a spread with an existing key wins:That would silently drop the height cap and let the hint card grow to the full page height again (the bug #30143 fixed). A default parameter resolves
undefinedback to the default, so it's immune to how callers forward it.Behaviour is unchanged:
maxHeight={undefined}(HookForm today)480— default keptmaxHeight={300}300— override respected480/offset16Testing
Prettier, ESLint and
tsc --noEmitall clean. No behavioural change intended — pure refactor.🤖 Generated with Claude Code
Greptile Summary
This PR forwards supported popover options through
FieldDocPopover. The main changes are:FieldDocPopoverPropsfrom React Aria'sPopoverProps.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "Merge branch 'main' into refactor/field-..." | Re-trigger Greptile
Context used (3)