fix: In custom component builder page, we shouldn't show "last event" / "last run" section of nodes#3509
Closed
cursor[bot] wants to merge 1 commit intomainfrom
Closed
fix: In custom component builder page, we shouldn't show "last event" / "last run" section of nodes#3509cursor[bot] wants to merge 1 commit intomainfrom
cursor[bot] wants to merge 1 commit intomainfrom
Conversation
In the custom component builder page, there are no events or executions, so the 'last event' / 'last run' sections on nodes should not be shown. - Changed getBlockType to always return 'component' type in the builder, which ensures all nodes (including merge) use ComponentBase with the correct includeEmptyState: false override - Removed hardcoded eventSections from storybook mock data to accurately represent the builder UI Closes #632
|
👋 Commands for maintainers:
|
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.
Summary
In the custom component builder page, there are no events or executions, so the "last event" / "last run" sections on nodes should not be shown.
Changes
web_src/src/pages/custom-component/index.tsx: SimplifiedgetBlockTypeto always return"component"type in the builder. Previously, merge components mapped to the"merge"block type, which usedMergeComponentwith its own empty state rendering that couldn't be suppressed. By using"component"type for all nodes, they all render throughComponentBasewhereincludeEmptyState: falseis explicitly set andeventSectionsis alreadyundefined(sincelastExecutionsis always empty in the builder).web_src/src/ui/CustomComponentBuilderPage/storybooks/mockBlueprint.tsx: Removed hardcodedeventSectionsfrom storybook mock data so the storybook accurately represents how builder nodes appear without event/execution data.How it works
The builder's
createBlockDatafunction already correctly:lastExecutions: []to mappers, which returneventSections: undefinedincludeEmptyState: falseto prevent the empty state from showingThe only issue was merge nodes using a separate
MergeComponentrenderer that bypassed this override. This PR fixes that by rendering all builder nodes consistently throughComponentBase.Closes #632