mirror of
https://github.com/we-promise/sure.git
synced 2026-04-10 15:54:48 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user