Skip to content

Conversation

@marcuscastelo
Copy link
Owner

This pull request fixes a bug where the ItemEditModal inside ItemGroupEditModal required a double click to open, instead of opening on a single click as expected.

What was changed:

  • Refactored the item click handler in ItemGroupEditModalBody.tsx to use Solid's batch function, ensuring that both editSelection and itemEditModalVisible are updated together.
  • This prevents stale state and guarantees the modal opens immediately on the first click.
  • All code and comments remain in English, following project conventions.
  • All tests and checks pass.

Motivation:

  • Improves user experience by making item editing more intuitive and responsive.
  • Resolves a low-complexity UI bug affecting workflow efficiency.

Implementation details:

  • No breaking changes.
  • No changes to API or data structures.
  • No documentation changes.

closes #741

…odal

- Use Solid's batch to synchronize editSelection and modal visibility state
- Fixes bug where double click was required to open ItemEditModal
- All code and comments in English, all tests passing
Copilot AI review requested due to automatic review settings June 12, 2025 21:05
@marcuscastelo marcuscastelo self-assigned this Jun 12, 2025
@vercel
Copy link

vercel bot commented Jun 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marucs-diet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2025 9:05pm

@github-actions github-actions bot added bug Report a problem or malfunction complexity-low Low implementation complexity ui UI/UX related issue or improvement labels Jun 12, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes a UI bug where the ItemEditModal would only open on a double click by batching state updates in the ItemGroupEditModalBody.

  • Refactored the item click handler to use Solid's batch() function to update both editSelection and itemEditModalVisible together.
  • Ensures immediate modal opening on a single click.

@marcuscastelo marcuscastelo merged commit f98ff35 into rc/v0.12.0 Jun 12, 2025
8 checks passed
@marcuscastelo marcuscastelo deleted the marcuscastelo/issue741 branch June 12, 2025 21:06
@marcuscastelo marcuscastelo mentioned this pull request Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Report a problem or malfunction complexity-low Low implementation complexity ui UI/UX related issue or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ItemEditModal inside ItemGroupEditModal requires double click to open (should be single click)

2 participants