Commit Graph

16 Commits

Author SHA1 Message Date
juan
a9e1c221a5 Fix: use interaction state instead of device capability for drag guard
isTouchDevice() blocked mouse/trackpad drag on touch-capable laptops
(e.g. Windows with touchscreen). Now checks if a touch interaction is
actually in progress instead.

Also adds touchcancel binding to clean up hold timer state when the
OS interrupts a touch (notifications, palm rejection, etc).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:07:12 -07:00
juan
1b06a2f46b Revert "Use nearest-edge distance for symmetrical drag reorder of tall sections"
This reverts commit 53c5f5759d.
2026-03-23 00:00:38 -07:00
juan
53c5f5759d Use nearest-edge distance for symmetrical drag reorder of tall sections
Center-point distance made it harder to drag sections down than up
because tall sections (charts, sankey) have their center far from
the edge. Now uses distance to nearest edge — section height no
longer affects how far you need to drag to trigger a swap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:52:15 -07:00
juan
f37378b2ff Revert edge-based insertion, restore center-point drag algorithm
Edge-based insertion was too restrictive for tall uncollapsed sections
since the gap between them is only ~24px. The center-point approach
works better for the common case. The key improvements (800ms hold
delay, native dragstart cancellation, text selection prevention,
Euclidean movement cancellation) remain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:44:48 -07:00
juan
b0ce345c30 Reduce hold delay to 800ms and prevent text selection during hold
1000ms was long enough to trigger browser text selection before drag
activated. Reduced to 800ms and added userSelect:none on the section
during the touch hold period, restored when touch ends.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:40:25 -07:00
juan
fbcc261c9c Fix: cancel native dragstart on touch devices to enforce hold delay
The sections have draggable="true" which triggers native HTML5 drag
on touch with zero delay, bypassing our 1000ms hold-to-drag logic
entirely. This was most noticeable with collapsed sections where a
brief touch-and-drag instantly reordered them. Now native dragstart
is cancelled on touch devices, forcing all touch reordering through
the hold delay path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:27:00 -07:00
juan
573745af78 Use edge-based insertion for symmetrical up/down drag reordering
Replace center-point distance algorithm with edge-crossing logic.
The swap threshold is now at the midpoint of the gap between adjacent
sections, so moving a section up or down requires equal distance
regardless of section height. Also handles 2-column grid layout by
filtering to same-column siblings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 13:08:15 -07:00
juan
5336ec159f Increase touch hold delay to 1000ms for more reliable scroll behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 20:22:53 -07:00
juan
31a5ac156b Increase hold delay to 750ms and use Euclidean distance for cancellation
Use total distance (diagonal-aware) instead of per-axis thresholds
to better detect scrolling gestures that travel diagonally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 16:20:48 -07:00
Juan José Mata
9bc166cb2a Increase to 750ms 2026-03-17 17:52:18 +01:00
juan
9dcb74c46b Update hold delay comment to reflect press-and-hold behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 16:04:23 -07:00
juan
970047d36c Fix dashboard mobile: require press-and-hold to reorder sections
On mobile, swiping through dashboard sections (investments, net worth,
balance sheets, etc.) accidentally triggers drag-to-reorder because
the hold delay is only 150ms with no movement cancellation.

- Increase hold delay from 150ms to 500ms
- Cancel drag activation if finger moves >10px before hold triggers,
  allowing normal scroll gestures to pass through unimpeded

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 15:46:39 -07:00
Alessio Cappa
23087c1e98 feat: Display dashboard as a 2-columns grid on big screens (#1000)
* feat: display 2 columns grid in dashboard for wide screens

* fix: update sortable controller to consider X/Y coordinates

* fix: lint issues + missing variable init
2026-02-16 13:45:49 +01:00
Number Eight
0c6d208ef2 feat: implement expandable view for cashflow sankey chart (#739)
* feat: implement expandable view for cashflow sankey chart

* refactor: migrate cashflow dialog sizing to tailwind utilities

* refactor: declarative draggable restore on cashflow dialog close

* refactor: localized title and use Tailwind utilities

* refactor: update dialog interaction especially on mobile

* refactor: add global expand text to localization

* fix: restore draggable immediately after dialog close

* Whitespace noise

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 09:52:15 +01:00
soky srm
1727b772ed Mobile drag and re-order fixes (#408)
* FIX mobile scroll and drag

* reorder fixes

* Add hold delay for mobile
2025-12-02 17:10:55 +01:00
soky srm
db8353e895 Initial implementation of collapsible sections and re-order feature (#355)
* Initial implementation

* Add support for reports section too

* UI Improvement

now it looks a lot nicer :)

* Remove duplicate section titles

* FIX malformed DIV

* Add accessibility and touch support

WCAG 2.1 Level AA Compliant
  - Keyboard operable (Success Criterion 2.1.1)
  - Focus visible (Success Criterion 2.4.7)
  - Name, Role, Value (Success Criterion 4.1.2)

 Screen Reader Support
  - Clear instructions in aria-label
  - Proper semantic roles
  - State changes announced via aria-grabbed

* Add proper UI for tab highlight

* Add keyboard support to collapse also

* FIX js errors

* Fix rabbit

* FIX we don't need the html

* FIX CSRF and error handling

* Simplify into one single DB migration

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-26 17:51:38 +01:00