René's URL Explorer Experiment


Title: feat: bind element ID to a component variable by ysamcode · Pull Request #564 · ycode/ycode · GitHub

Open Graph Title: feat: bind element ID to a component variable by ysamcode · Pull Request #564 · ycode/ycode

X Title: feat: bind element ID to a component variable by ysamcode · Pull Request #564 · ycode/ycode

Description: Summary Allow a layer's HTML id attribute to be driven by a component variable, so a shared component (e.g. a CTA button) can carry a different element ID on every page it is used. Unblocks per-page analytics and ad tracking on reused components. Closes #373 Changes Add an id component variable type ({ id: string }) linked to layers via settings.idVariableId, alongside the existing text/image/link/visibility types Turn the ID field in the Settings tab into a variable-aware control: link to an existing variable, create one seeded from the current ID, or manage variables; show the linked badge while bound Add the id type to the component variables dialog (create + default value) and to per-instance overrides, including nested-component pass-through linking Resolve the linked ID during SSR (applyComponentOverrides) and live in the editor canvas, falling back to the static ID when unlinked or out of scope Clean up settings.idVariableId links and instance overrides when the variable is deleted Expose the new type through the MCP component tools (create_component, link_variable, set_component_instance with element_id) and agent instructions Sanitize every ID entry point with sanitizeHtmlId Test plan Edit a component, select a button, open Settings — the ID label shows the variable dropdown; "Create variable" links it and opens the dialog with the current ID as default Set a default ID in the dialog; verify the canvas element renders that id while editing the component Place two instances on a page, override the ID on each — inspect the DOM (editor and published/preview) and confirm each instance has its own id Clear an instance override — it reverts to the variable default Unlink the variable from the layer — the static ID input returns with its previous value Delete the ID variable — layers fall back to their static ID and instance overrides are removed Type spaces/special characters in the setting, dialog default, and override inputs — they are sanitized to a valid HTML id Nested component: link a child's ID override to a parent ID variable and confirm the outer instance controls it Via MCP: create a component with an id variable, link_variable it to a layer, and set_component_instance with element_id — published HTML reflects the override

Open Graph Description: Summary Allow a layer's HTML id attribute to be driven by a component variable, so a shared component (e.g. a CTA button) can carry a different element ID on every page it is used. Unblocks per...

X Description: Summary Allow a layer's HTML id attribute to be driven by a component variable, so a shared component (e.g. a CTA button) can carry a different element ID on every page it is used. Unblocks...

Opengraph URL: https://github.com/ycode/ycode/pull/564

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0bfadf2f-e6ea-a798-afb1-d42a2d197a6e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9B18:C843D:4BDD10:62F992:6AFE650E
html-safe-nonce11907d894faf2c0fc96225ebaf70baaa40a1533daf36fa7cd0289633e7bca58d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjE4OkM4NDNEOjRCREQxMDo2MkY5OTI6NkFGRTY1MEUiLCJ2aXNpdG9yX2lkIjoiNzIwNjYzNjExMTQ5MjE3OTIxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace5cc29b0b0d5f918d830e8e9e3515e4028b6d4a024fd3e3e046295db286d54f8
hovercard-subject-tagpull_request:4558674883
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/ycode/ycode/pull/564/files
twitter:imagehttps://avatars.githubusercontent.com/u/7631193?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7631193?s=400&v=4
og:image:altSummary Allow a layer's HTML id attribute to be driven by a component variable, so a shared component (e.g. a CTA button) can carry a different element ID on every page it is used. Unblocks per...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/ycode/ycode git https://github.com/ycode/ycode.git
octolytics-dimension-user_id65892203
octolytics-dimension-user_loginycode
octolytics-dimension-repository_id1165452593
octolytics-dimension-repository_nwoycode/ycode
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1165452593
octolytics-dimension-repository_network_root_nwoycode/ycode
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ycode/ycode/pull/564/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fpull%2F564%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fpull%2F564%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=ycode%2Fycode
Reloadhttps://github.com/ycode/ycode/pull/564/files
Reloadhttps://github.com/ycode/ycode/pull/564/files
Reloadhttps://github.com/ycode/ycode/pull/564/files
ycodehttps://github.com/ycode
ycodehttps://github.com/ycode/ycode
Codehttps://github.com/ycode/ycode
Issues7 (7)https://github.com/ycode/ycode/issues
Pull requests1 (1)https://github.com/ycode/ycode/pulls
Discussionshttps://github.com/ycode/ycode/discussions
Actionshttps://github.com/ycode/ycode/actions
Projectshttps://github.com/ycode/ycode/projects
Security and quality1 (1)https://github.com/ycode/ycode/security
Insightshttps://github.com/ycode/ycode/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fycode%2Fycode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fycode%2Fycode%2Fissues%2Fnew%2Fchoose
ysamcodehttps://github.com/ysamcode
develophttps://github.com/ycode/ycode/tree/develop
feat/component-id-variablehttps://github.com/ycode/ycode/tree/feat/component-id-variable
Conversation 0 https://github.com/ycode/ycode/pull/564
Commits 1 https://github.com/ycode/ycode/pull/564/commits
Checks 0 https://github.com/ycode/ycode/pull/564/checks
Files changed https://github.com/ycode/ycode/pull/564/files
Please reload this pagehttps://github.com/ycode/ycode/pull/564/files
feat: bind element ID to a component variable https://github.com/ycode/ycode/pull/564/files#top
Show all changes 1 commit https://github.com/ycode/ycode/pull/564/files
8e69091 feat: allow binding element ID to a component variable ysamcode Sep 17, 2026 https://github.com/ycode/ycode/pull/564/commits/8e69091f068e8e25b13a86c76db52f237e1f9a18
Clear filters https://github.com/ycode/ycode/pull/564/files
Please reload this pagehttps://github.com/ycode/ycode/pull/564/files
Please reload this pagehttps://github.com/ycode/ycode/pull/564/files
ComponentInstanceSidebar.tsx https://github.com/ycode/ycode/pull/564/files#diff-bbcc6f634eb56be82c2d1395afce37287384e84bf4dbad3a7bf4cff7c9e3d8c4
ComponentVariableLabel.tsx https://github.com/ycode/ycode/pull/564/files#diff-01d503df99d368cd121d2bd740b14ed086d784f8748dcb5406b154a8475dcd2e
ComponentVariableOverrides.tsx https://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
ComponentVariablesDialog.tsx https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
IdSetting.tsx https://github.com/ycode/ycode/pull/564/files#diff-8baebeb803ca5d537c0e659647676b6d8939d54685aa5625af0640f0bc9c2f50
RightSidebar.tsx https://github.com/ycode/ycode/pull/564/files#diff-e4a68afaf50710d9576b733145a896b3a352e3df07badc60eef645788bb408d2
LayerRenderer.tsx https://github.com/ycode/ycode/pull/564/files#diff-3533cf1930345e3393481c3bdade5396e611e5a4ae915db5b4dd59b9f1fbbe0a
compact-result.ts https://github.com/ycode/ycode/pull/564/files#diff-f6398b08644e2618d29d4a9963288317a54b41812ff765674d6b999f53c8114c
instructions.ts https://github.com/ycode/ycode/pull/564/files#diff-35ae6d1dc5282caf4b20abc977a5fa2bb5c1063fb5fef1cf81821c0274750825
components.ts https://github.com/ycode/ycode/pull/564/files#diff-7717da539a795ba2bd00f7b68739b6febca36e5fbe253c38d679de24b28a29ad
resolve-components.ts https://github.com/ycode/ycode/pull/564/files#diff-39732d61ff624fa65fc91fcb6c39466228610cacf8f327b5c3ef3418b7c28ffe
variable-utils.ts https://github.com/ycode/ycode/pull/564/files#diff-d542a540beb224657917414c4279e36655b75748f434f51fab4bb84118e5a8c8
useComponentsStore.ts https://github.com/ycode/ycode/pull/564/files#diff-b8ae5d36fc79fe8afab5ca0f58693c44e09e1af71c4d1848969504a54bec24dd
index.ts https://github.com/ycode/ycode/pull/564/files#diff-b5c5b3d03297cce43ffb834917bfdc3d10fc8aefa37979c5af23c2205d1bc88c
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
app/(builder)/ycode/components/ComponentInstanceSidebar.tsxhttps://github.com/ycode/ycode/pull/564/files#diff-bbcc6f634eb56be82c2d1395afce37287384e84bf4dbad3a7bf4cff7c9e3d8c4
View file https://github.com/ycode/ycode/blob/8e69091f068e8e25b13a86c76db52f237e1f9a18/app/(builder)/ycode/components/ComponentInstanceSidebar.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/564/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/564/files#diff-bbcc6f634eb56be82c2d1395afce37287384e84bf4dbad3a7bf4cff7c9e3d8c4
https://github.com/ycode/ycode/pull/564/files#diff-bbcc6f634eb56be82c2d1395afce37287384e84bf4dbad3a7bf4cff7c9e3d8c4
https://github.com/ycode/ycode/pull/564/files#diff-bbcc6f634eb56be82c2d1395afce37287384e84bf4dbad3a7bf4cff7c9e3d8c4
https://github.com/ycode/ycode/pull/564/files#diff-bbcc6f634eb56be82c2d1395afce37287384e84bf4dbad3a7bf4cff7c9e3d8c4
https://github.com/ycode/ycode/pull/564/files#diff-bbcc6f634eb56be82c2d1395afce37287384e84bf4dbad3a7bf4cff7c9e3d8c4
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
app/(builder)/ycode/components/ComponentVariableLabel.tsxhttps://github.com/ycode/ycode/pull/564/files#diff-01d503df99d368cd121d2bd740b14ed086d784f8748dcb5406b154a8475dcd2e
View file https://github.com/ycode/ycode/blob/8e69091f068e8e25b13a86c76db52f237e1f9a18/app/(builder)/ycode/components/ComponentVariableLabel.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/564/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/564/files#diff-01d503df99d368cd121d2bd740b14ed086d784f8748dcb5406b154a8475dcd2e
https://github.com/ycode/ycode/pull/564/files#diff-01d503df99d368cd121d2bd740b14ed086d784f8748dcb5406b154a8475dcd2e
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
app/(builder)/ycode/components/ComponentVariableOverrides.tsxhttps://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
View file https://github.com/ycode/ycode/blob/8e69091f068e8e25b13a86c76db52f237e1f9a18/app/(builder)/ycode/components/ComponentVariableOverrides.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/564/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
https://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
https://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
https://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
https://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
https://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
https://github.com/ycode/ycode/pull/564/files#diff-a98c8f87f56bb1158164b559b3626c5d60c22792ce54df25e80def8feb40be6d
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
app/(builder)/ycode/components/ComponentVariablesDialog.tsxhttps://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
View file https://github.com/ycode/ycode/blob/8e69091f068e8e25b13a86c76db52f237e1f9a18/app/(builder)/ycode/components/ComponentVariablesDialog.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/564/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/pull/564/files#diff-bd4433c17c9b997669252ce7cefb8b2cd306e26febc3f9ccb3da9f38e455a555
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
app/(builder)/ycode/components/IdSetting.tsxhttps://github.com/ycode/ycode/pull/564/files#diff-8baebeb803ca5d537c0e659647676b6d8939d54685aa5625af0640f0bc9c2f50
View file https://github.com/ycode/ycode/blob/8e69091f068e8e25b13a86c76db52f237e1f9a18/app/(builder)/ycode/components/IdSetting.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/564/{{ revealButtonHref }}
Please reload this pagehttps://github.com/ycode/ycode/pull/564/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.