Function action block improvements#1384
Merged
Merged
Conversation
Changes: - Update defaultLua to use "YourFunction = function()" syntax instead of "function YourFunction()" - Fix blockIcon from "If" to "Function" - Add parameter support in single field UI (e.g., "myFunc(a, b)") - Update parsing logic to extract/reconstruct function name and parameters - Supports table member functions (e.g., "self.onClick = function(event)") Benefits: - Enables creating table member functions for OOP patterns - Cleaner syntax for function declarations - Single field interface for name and parameters 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changes: - Replace Monaco-based LineEditor with MeltCombo for lighter input - Fix cursor jumping issue with isUserInput flag and async handling - Use value prop instead of bind:value with manual updates - Add tick() and setTimeout to prevent reactive interference - Add suggestions: foo(bar), midirx_cb, sysexrx_cb - Add validation with NotEmpty validator Benefits: - No cursor jumping when typing (especially on space) - Consistent with other action blocks (uses MeltCombo) - Lighter weight than Monaco editor for simple text input - Proper autocomplete suggestions for common function patterns 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changes: - Extend LocalDefinitions.getFrom() to extract function parameters - Parse function blocks: "name = function(param1, param2)" - Export parameters as suggestions for other action blocks - Label as "parameter - paramName" in autocomplete Benefits: - Function parameters now available as variables in subsequent blocks - Works automatically with all blocks using LocalDefinitions (MIDI, Timer, etc.) - Enables better scoping and parameter passing patterns - Consistent with local variable system 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit 2c3dca6): https://grid-editor-web--pr1384-suku-function-39072m01.web.app (expires Sun, 15 Feb 2026 14:23:14 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 2b65ba6ef19c55d367eaffd04e46bcde25305d6f |
|
Visit the preview URL for this PR (updated for commit 2c3dca6): https://grid-playwright-result--pr1384-suku-function-6a1806g9.web.app (expires Mon, 19 Jan 2026 14:31:13 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0f764ceb264072188bf1a5dee10613d8f10b4ca2 |
Update locator from Monaco's .view-line to generic input selector to work with MeltCombo component. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add 7 new function suggestions: midi_auto_ch, midi_auto_cmd, midi_auto_p1, midi_auto_p2, color_curve, color_auto_layer, color_auto_value - Update midirx_cb parameter order to (self, header, event) - Provide helpful info text for each function to guide users 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
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.

!!! Required Firmware !!!
intechstudio/grid-fw#302
Function Block Refactoring
Summary
Refactored function blocks to use assignment-style declarations and improved the UI with better input handling
and autocomplete suggestions.
Key Changes
1. Assignment-Style Function Syntax
function YourFunction()toYourFunction = function()self.method = function()myFunc(a, b) = function(a, b)2. Improved Input Component
foo(bar), MIDI RX callbacks3. Function Parameters as Local Definitions
Benefits
Files Changed
src/renderer/config-blocks/Function_Start.sveltesrc/renderer/config-blocks/headers/FunctionStartFace.sveltesrc/renderer/runtime/runtime.store.ts