Skip to content

fix(shared): add new selectedcontent html element #13762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Calvin-LL
Copy link
Contributor

@Calvin-LL Calvin-LL commented Aug 15, 2025

add new selectedcontent html element to the list of html elements

selectedcontent: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/selectedcontent

Summary by CodeRabbit

  • New Features
    • Added support for the “selectedcontent” HTML tag across parsing and rendering, ensuring it’s recognized as a valid element in the app.
    • Improves compatibility with content that includes “selectedcontent,” reducing issues with validation or sanitation.
    • No configuration or code changes required for existing users; behavior remains unchanged for other tags.

Copy link

coderabbitai bot commented Aug 15, 2025

Walkthrough

Added "selectedcontent" to the HTML_TAGS list in domTagConfig and reordered a trailing segment (moving summary/template after menu) with minor formatting adjustments. No changes to exported/public API signatures or behavior of isHTMLTag/isSVGTag/isMathMLTag/isVoidTag beyond recognizing the new tag.

Changes

Cohort / File(s) Summary
DOM tag config update
packages/shared/src/domTagConfig.ts
Added "selectedcontent" to HTML_TAGS; reordered trailing tags (summary/template after menu); adjusted line breaks; no API signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I twitch my whiskers at tags anew,
A nibble of code, a shiny chew.
“selectedcontent” hops into line,
Menu, summary, template—fine.
With tidy lists and gentle pace,
This rabbit stamps a happy trace. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c875019 and 5543cab.

📒 Files selected for processing (1)
  • packages/shared/src/domTagConfig.ts (1 hunks)
🔇 Additional comments (2)
packages/shared/src/domTagConfig.ts (2)

15-15: Reordering "summary,template" after "menu" is benign.

This has no behavioral impact on makeMap(). LGTM.


14-14: Incorrect — "selectedcontent" is a standard HTML element; do not revert

Short summary: The WHATWG HTML Living Standard defines the selectedcontent element and MDN documents it. Browser support is currently limited (primarily Chromium-based engines), so adding it to HTML_TAGS is appropriate to avoid misclassifying as a component — but note the limited support in a comment.

Locations to check:

  • packages/shared/src/domTagConfig.ts (line with the tag list — currently contains "selectedcontent")

Suggested minimal change: keep the addition and add an inline reference/comment about spec & compatibility.

Suggested diff:

-  'option,output,progress,select,selectedcontent,textarea,details,dialog,' +
+  // "selectedcontent" is defined in the WHATWG HTML Living Standard (see: https://html.spec.whatwg.org/multipage/form-elements.html#the-selectedcontent-element)
+  // MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/selectedcontent — support currently limited to Chromium-based browsers
+  'option,output,progress,select,selectedcontent,textarea,details,dialog,' +

Rationale: The original comment's reclamation to revert is incorrect; keep the element in the list but document the spec and interoperability caveat so future reviewers understand the choice.

Likely an incorrect or invalid review comment.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB 38.4 kB 34.6 kB
vue.global.prod.js 159 kB (+16 B) 58.6 kB (+7 B) 52.2 kB (-30 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.6 kB 18.2 kB 16.7 kB
createApp 54.6 kB 21.2 kB 19.4 kB
createSSRApp 58.8 kB 23 kB 20.9 kB
defineCustomElement 59.6 kB 22.8 kB 20.8 kB
overall 68.7 kB 26.4 kB 24.1 kB

Copy link

pkg-pr-new bot commented Aug 15, 2025

Open in StackBlitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@13762

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@13762

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@13762

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@13762

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@13762

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@13762

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@13762

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@13762

@vue/shared

npm i https://pkg.pr.new/@vue/shared@13762

vue

npm i https://pkg.pr.new/vue@13762

@vue/compat

npm i https://pkg.pr.new/@vue/compat@13762

commit: 5543cab

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.

1 participant