Skip to content

Conversation

@hypnosis
Copy link

Summary

Fixed multiple issues with property saving and synchronization in the Make.md plugin:

  1. Option and color scheme saving - Options and color schemes now save correctly
  2. Color application - Individual option colors are properly applied and preserved
  3. UI/UX improvements - Color picker closes automatically after selection
  4. Property synchronization - Checkbox and other properties now sync between top and bottom sections

Issues Fixed

  • Options in table property dropdown not saving
  • Color changes not being applied to options
  • Color picker not closing after selection
  • Checkbox properties not syncing between inline properties and Properties section

Changes

1. Atomic saving of options and color schemes (PropertyValue.tsx)

  • Modified saveOptionsHandler to perform atomic update of both options and colorScheme
  • Prevents data loss when saving multiple related properties

2. Color priority fix (OptionCell.tsx)

  • Individual option colors now take priority over color scheme
  • Preserves user-set colors while still applying scheme colors to new options

3. Auto-close color picker (EditOptionsModal.tsx)

  • Added hide callback to showColorPickerMenu
  • Color picker now closes automatically after color selection

4. Property synchronization (PropertiesView.tsx)

  • Added listener for pathStateUpdated event
  • Properties now refresh immediately when saved
  • Fixed checkbox sync between inline properties and Properties section

5. Build improvements

  • Updated TypeScript target to es2020 for consistency with esbuild
  • Fixed typo in package.json dev script
  • Added data.json to .gitignore

Testing

  • ✅ Options save correctly in table property dropdown
  • ✅ Colors apply and persist on options
  • ✅ Color picker closes after selection
  • ✅ Checkboxes sync between property sections
  • ✅ Build process works correctly

Compatibility

  • No breaking changes
  • Maintains backward compatibility with existing data
  • TypeScript target updated to es2020 (aligns with esbuild config)

Danila Susak added 2 commits January 14, 2026 20:48
Fixes issue where editing options in table properties would not save correctly.

Changes:
- Fix PropertyValue.tsx: Save options and colorScheme atomically to prevent data loss
- Fix EditOptionsModal.tsx: Auto-close color picker menu after color selection
- Fix OptionCell.tsx: Prioritize individual option colors over color scheme
- Fix package.json: Correct typo in dev script (nnode -> node)
- Update tsconfig.json: Change target from es6 to es2020 to support regex dotall flag
- Update .gitignore: Add data.json to ignore user settings

The main issue was that calling saveParsedValue twice would overwrite the first save
with stale data. Now both fields are saved in a single atomic operation.
Fixed issue where checkbox properties in the top section (inline properties)
were not updating when changed in the bottom Properties section.

Root cause: PropertiesView component was only listening to 'contextStateUpdated'
events, which are not triggered when individual file properties are saved via
saveProperties(). When a checkbox is toggled, it saves via saveProperties()
which triggers 'pathStateUpdated' event instead.

Solution: Added listener for 'pathStateUpdated' event to refresh property
values when the current path's properties change. This ensures both property
sections stay in sync.

Changes:
- Added pathChanged() handler to listen for pathStateUpdated events
- Added pathState to useEffect dependencies for proper cleanup
- Properties now refresh immediately when any property is saved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant