Skip to content

fix(devtools): resolve non-props attributes warning for NuxtDevtoolsInspectPanel#930

Open
doyuli wants to merge 1 commit intonuxt:mainfrom
doyuli:fix/non-props-attributes
Open

fix(devtools): resolve non-props attributes warning for NuxtDevtoolsInspectPanel#930
doyuli wants to merge 1 commit intonuxt:mainfrom
doyuli:fix/non-props-attributes

Conversation

@doyuli
Copy link
Contributor

@doyuli doyuli commented Feb 14, 2026

🔗 Linked issue

resolves #929

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR fixes the "Extraneous non-props attributes" warning in the NuxtDevtoolsInspectPanel component.

The warning was caused by the component having multiple root nodes, which prevented Vue from automatically deciding where to apply attributes.

Instead of restructuring the DOM, which could lead to CSS clipping or z-index issues for the toast notification, I implemented manual attribute binding.
20260213230216_2_202

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 14, 2026

📝 Walkthrough

Walkthrough

The change modifies NuxtDevtoolsInspectPanel.vue to explicitly disable automatic attribute inheritance with defineOptions({ inheritAttrs: false }) and manually forwards unconsumed attributes to the root element using v-bind="$attrs". This prevents Vue warnings when attributes are passed to the component without being explicitly consumed by props.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing the non-props attributes warning for a specific component using conventional commit format.
Description check ✅ Passed The PR description is directly related to the changeset, explaining the Vue warning issue, the root cause (multiple root nodes), and the solution implemented (manual attribute binding).
Linked Issues check ✅ Passed The PR successfully addresses issue #929 by implementing manual attribute binding (defineOptions and v-bind) to resolve the extraneous non-props attributes warning without restructuring the DOM.
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving the linked issue; the modifications only add attribute forwarding logic without introducing unrelated functionality changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

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.

Vue-Warning for "Extraneous non-properties..."

1 participant