-
Notifications
You must be signed in to change notification settings - Fork 1
feat(hotkey): added option to trigger using hotkeys #103
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,219 @@ | ||||||
| import { type Data, type Value, dataSchema } from '@microflow/runtime/src/hotkey/hotkey.types'; | ||||||
| import { Position } from '@xyflow/react'; | ||||||
| import { Handle } from '../Handle'; | ||||||
| import { BaseNode, NodeContainer, useNodeControls, useNodeData, useNodeId } from './Node'; | ||||||
| import { useNodeValue } from '../../../stores/node-data'; | ||||||
| import { IconWithValue } from '../IconWithValue'; | ||||||
| import { useEffect, useState, useCallback, useRef, useMemo, Fragment } from 'react'; | ||||||
|
||||||
| import { useEffect, useState, useCallback, useRef, useMemo, Fragment } from 'react'; | |
| import { useEffect, useState } from 'react'; |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The variable open is referenced on line 119 but it's not defined in the component scope. This should be props.open to correctly check if the dialog is open. This will cause the effect to never run, meaning the keydown event listener will never be attached.
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing dependency in the useEffect dependency array. The effect depends on props.open to properly set up/tear down the event listener when the dialog opens/closes. Add props.open to the dependency array on line 135.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -55,12 +55,15 @@ In order to validate if the problem is with your microcontroller or with Microfl | |||||
|
|
||||||
| First, let's make sure your microcontroller is working properly by testing it with the Arduino IDE (a free program for working with Arduino boards). | ||||||
|
|
||||||
| 1. Install [the latest Arduino IDE](https://www.arduino.cc/en/software) (it's free) | ||||||
| 2. Open the Arduino IDE and connect your microcontroller to your computer | ||||||
| 3. Go to `Tools > Port` and select the port where your microcontroller is connected (you should see it listed) | ||||||
| 4. Go to `Tools > Board` and select the board you are using (like "Arduino Uno") | ||||||
| 5. Go to `File > Examples > Firmata > StandardFirmata` (this opens a ready-made program) | ||||||
| 6. Click the `Upload` button (arrow icon) to send the program to your microcontroller | ||||||
| 1. Close Microflow | ||||||
| 2. Download [the `StandardFirmata` for Microflow](https://github.com/xiduzo/microflow/tree/7eed72541c6d6b455cf8c84a71b737400a6d7e68/packages/flasher/StandardFirmata) | ||||||
| 3. Install [the latest Arduino IDE](https://www.arduino.cc/en/software) | ||||||
| 4. Open the Arduino IDE and connect your microcontroller to your computer | ||||||
| 5. Go to `Tools > Port` and select the port where your microcontroller is connected (you should see it listed) | ||||||
| 6. Go to `Tools > Board` and select the board you are using (like "Arduino Uno") | ||||||
| 7. Opens the downloaded `StandardFirmata`. | ||||||
|
||||||
| 7. Opens the downloaded `StandardFirmata`. | |
| 7. Open the downloaded `StandardFirmata`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a beta version of a package (
hotkeys-js@^4.0.0-beta.7) in production code can introduce instability and potential breaking changes. Consider using a stable release version instead, or document why the beta version is necessary and monitor for a stable release.