feat: add select menu component entry for flow editor #291
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
This PR adds a new
entry_component_selectnode type to the flow editor, similar to the existingentry_component_button. This allows users to create flows that are triggered when a user selects an option from a Discord select menu.Changes
Frontend (
kite-web/)FlowNodeEntryComponentSelect.tsxcomponent (mirrors button component)nodeEntryComponentSelectDataSchemato dataSchema.tsentry_component_selectin nodes.ts with "list" iconFlowContextTypeto includecomponent_selectBackend (
kite-service/)FlowNodeTypeEntryComponentSelectconstant to data.goCompileComponentSelect()function to compile.goIsComponentSelectEntry()helper methodIsEntry()to include the new select component typeHandleEventto handleStringSelectInteractioneventsTesting
Notes
The implementation follows the same pattern as the button component. The select menu flow is triggered via the
flow_source_idwhich corresponds to the select menu'scustom_id.