ENG-1965: Rename Template-Block-props buffer block to Template#1202
Open
sid597 wants to merge 2 commits into
Open
ENG-1965: Rename Template-Block-props buffer block to Template#1202sid597 wants to merge 2 commits into
sid597 wants to merge 2 commits into
Conversation
Not plain "Template" because getSubTree({parentUid: node.type, key:
"Template"}) in NodeConfig.tsx and DiscourseNodeSuggestiveRules.tsx
text-matches children of the same parent the buffer is created under,
and auto-creates on miss - an exact "Template" buffer would collide
with the legacy template block lookup.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
The (editing) suffix guarded against getSubTree(key: "Template") matching the buffer, but getBasicTreeByParentUid returns children order-sorted and the legacy Template block is auto-created at order 0 before the buffer (order last) can exist, so the lookup always resolves to the legacy block. Plain Template is what the ticket asks for and reads correctly under the Template tab.
Collaborator
Author
|
Revised in 18a5509: an interim commit used "Template (editing)" to sidestep the getSubTree text-match collision, but the collision turns out to be closed by ordering (the legacy Template block is always first-ordered; see updated PR description), so the buffer now uses plain "Template" per the ticket. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames the ephemeral template buffer block users were seeing in the node settings Template tab (and on the raw node type page) from Template-Block-props to Template.
Safety note on the text-match lookups: getSubTree({parentUid: node.type, key: "Template"}) in NodeConfig.tsx / DiscourseNodeSuggestiveRules.tsx also matches this text, but getBasicTreeByParentUid returns children order-sorted and the legacy Template block is auto-created at order 0 before the buffer (order: last) can exist, so the lookup deterministically resolves to the legacy block. No read path matches the old Template-Block-props text, so no compatibility shim is needed.
Fixes ENG-1965