Skip to content

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

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

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

Conversation

@DamianGlowala
Copy link
Member

🔗 Linked issue

📚 Description

@vercel
Copy link
Contributor

vercel bot commented Mar 24, 2026

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

Project Deployment Actions Updated (UTC)
scripts-playground Ready Ready Preview, Comment Mar 24, 2026 9:51am

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 24, 2026

Open in StackBlitz

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

commit: 67add62

@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

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 name Status Explanation Resolution
Description check ❓ Inconclusive The 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 name Status Explanation
Title check ✅ Passed The title accurately describes the main change: binding $attrs to the overlay view in the Google Maps component.
Docstring Coverage ✅ Passed No 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.

Copy link

@coderabbitai coderabbitai bot left a comment

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 main Mar 24, 2026
10 checks passed
@harlan-zw harlan-zw deleted the fix/overlay-view-bind-attrs branch March 24, 2026 09:54
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