Skip to content

fix(google-maps): bind $attrs to overlay view - #672

Merged
harlan-zw merged 2 commits into
mainfrom
fix/overlay-view-bind-attrs
Mar 24, 2026
Merged

fix(google-maps): bind $attrs to overlay view#672
harlan-zw merged 2 commits into
mainfrom
fix/overlay-view-bind-attrs

Conversation

@DamianGlowala

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

@vercel

vercelBot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
scripts-playgroundReadyReadyPreview, CommentMar 24, 2026 9:51am

@pkg-pr-new

pkg-pr-newBot commented Mar 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/scripts@672

commit: 67add62

@coderabbitai

coderabbitaiBot commented Mar 24, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 67012196-5a71-4c97-9b9d-b7c7b1d10491

📥 Commits

Reviewing files that changed from the base of the PR and between 1aab5f3 and 67add62.

📒 Files selected for processing (1)
  • src/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue
✅ Files skipped from review due to trivial changes (1)
  • src/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue

📝 Walkthrough

Walkthrough

The component disables automatic attribute inheritance (inheritAttrs: false) and explicitly forwards all non-prop attributes (v-bind="$attrs") onto the overlay content container (div ref="overlay-content"). Previously that element only received :data-state="dataState", so additional attributes from parent components were not applied. Overlay creation, draw/positioning behavior, state handling, and the exposed API remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check nameStatusExplanationResolution
Description check❓ InconclusiveThe description is empty except for the contribution template, providing no actual context or rationale for the changes made.Add a meaningful description explaining why $attrs binding is needed, what problem this solves, and any relevant testing information.
✅ Passed checks (2 passed)
Check nameStatusExplanation
Title check✅ PassedThe title accurately describes the main change: binding $attrs to the overlay view in the Google Maps component.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/overlay-view-bind-attrs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue`:
- Line 307: The component is accidentally letting attributes fall through to the
root element while also manually forwarding them with v-bind="$attrs" on the
inner div (ref "overlay-content"), causing duplicated id/aria/class attributes;
fix this by disabling automatic attribute inheritance on the component (add
inheritAttrs: false to the component's export default options in
ScriptGoogleMapsOverlayView.vue) so that attributes only bind to the inner
element where v-bind="$attrs" is used and do not also appear on the hidden root
wrapper.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2b85ed37-942b-433c-b9d1-03d00462f123

📥 Commits

Reviewing files that changed from the base of the PR and between 2bf7708 and 1aab5f3.

📒 Files selected for processing (1)
  • src/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue

@harlan-zw
harlan-zw merged commit e6ecfff into mainMar 24, 2026
10 checks passed
@harlan-zw
harlan-zw deleted the fix/overlay-view-bind-attrs branch March 24, 2026 09:54
@harlan-zwharlan-zw mentioned this pull request Apr 15, 2026
Sign up for freeto 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

@DamianGlowala@harlan-zw