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>
This commit is contained in:
soky srm
2025-11-26 17:51:38 +01:00
committed by GitHub
parent 6e6fce1737
commit db8353e895
21 changed files with 1179 additions and 83 deletions

View File

@@ -66,6 +66,18 @@ export default class extends Controller {
}
_draw() {
// Guard against invalid dimensions (e.g., when container is collapsed or not yet rendered)
const minWidth = 50;
const minHeight = 50;
if (
this._d3ContainerWidth < minWidth ||
this._d3ContainerHeight < minHeight
) {
// Skip rendering if dimensions are invalid
return;
}
if (this._normalDataPoints.length < 2) {
this._drawEmpty();
} else {