Skip to content

Fix Clay__GetParentElementId for new id scheme#521

Merged
nicbarker merged 1 commit intonicbarker:mainfrom
bullno1:local-id-fix
Mar 30, 2026
Merged

Fix Clay__GetParentElementId for new id scheme#521
nicbarker merged 1 commit intonicbarker:mainfrom
bullno1:local-id-fix

Conversation

@bullno1
Copy link
Copy Markdown
Contributor

@bullno1 bullno1 commented Sep 27, 2025

Because Clay__GetParentElementId is now evaluated before Clay__OpenElementWithId, the parent is now actually the current open element.
Going to the "grandparent" as it is now will result in an id clash

@bullno1
Copy link
Copy Markdown
Contributor Author

bullno1 commented Sep 27, 2025

The name of the function is a bit misleading though.
That could be changed

gradylink added a commit to ScratchEverywhere/ScratchEverywhere that referenced this pull request Jan 22, 2026
fixed by adding changes from nicbarker/clay#521 to the patch
@nicbarker
Copy link
Copy Markdown
Owner

To prepare for the transition branch, I'm going to merge this in now and rebase it. Although as you mentioned, this function is going to be renamed to Clay_GetOpenLayoutElementId() and moved to the public API, as it's useful for getting the ID of CLAY_AUTO_ID elements 🙂

@nicbarker nicbarker merged commit 3be87f1 into nicbarker:main Mar 30, 2026
3 checks passed
@bullno1 bullno1 deleted the local-id-fix branch March 30, 2026 02:23
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