pict-section-form 1.1.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/README.md +1 -1
  2. package/docs/Configuration.md +1 -0
  3. package/docs/Layouts.md +60 -0
  4. package/docs/_version.json +3 -3
  5. package/docs/examples/README.md +1 -1
  6. package/docs/examples/change_tracking/change_tracking.js +322 -20
  7. package/docs/examples/diagram_form/diagram_form_example.min.js +2 -2
  8. package/docs/examples/dynamic_analysis/dynamic_analysis_application.js +301 -20
  9. package/docs/examples/gradebook/README.md +43 -1
  10. package/docs/examples/gradebook/gradebook_application.min.js +2 -2
  11. package/docs/examples/ndt_field_test/ndt_field_test.js +322 -20
  12. package/docs/examples/richtext_form/richtext_form_example.min.js +2 -3
  13. package/docs/examples/scope_mathematics/scope_mathematics.js +322 -20
  14. package/docs/examples/simple_table/README.md +1 -0
  15. package/docs/examples/simple_table/simple_tabular_application.min.js +2 -2
  16. package/docs/examples/superhero_studio/superhero_studio_example.min.js +2 -3
  17. package/docs/index.html +2 -2
  18. package/docs/retold-catalog.json +1 -1
  19. package/docs/retold-keyword-index.json +10252 -9612
  20. package/example_applications/complex_table/Complex-Tabular-Application.js +5 -0
  21. package/example_applications/gradebook/Gradebook-Application.js +19 -4
  22. package/example_applications/gradebook/package.json +2 -2
  23. package/example_applications/simple_table/README-SimpleTable.md +9 -0
  24. package/example_applications/simple_table/Simple-Tabular-Application.js +6 -1
  25. package/package.json +1 -1
  26. package/source/providers/layouts/Pict-Layout-Tabular.js +639 -1
  27. package/test/PictSectionForm-Tabular-Features_tests.js +293 -0
@@ -24,6 +24,7 @@ with the exact configuration the app uses.
24
24
  | Non-destructive columns | Removing an assignment hides its column but keeps the entered grades |
25
25
  | Selectable rows & columns | Grade Book - check a row and/or column to highlight it |
26
26
  | Column sorting | Students and Assignments - click a header to sort |
27
+ | Column chooser | Assignments and Grade Book - the **Columns** menu hides/shows columns; choices persist in the form data |
27
28
  | Tabular styling solvers | Performance - each student row is tinted by their average |
28
29
  | Tab navigation | `TabSectionSelector` switches between the five tabs |
29
30
  | Seeded example data | `GradebookData.json` loaded as `DefaultAppData` |
@@ -302,6 +303,46 @@ background. See [Solvers](../../Solvers.md) for the full reference.
302
303
 
303
304
  ---
304
305
 
306
+ ## Feature 8 - Column chooser
307
+
308
+ The Assignments and Grade Book tabs opt into the column chooser:
309
+
310
+ ```js
311
+ {
312
+ "Hash": "GradebookGrid",
313
+ "Layout": "Tabular",
314
+ "RecordSetAddress": "Grades",
315
+ "RecordManifest": "GradeRowEditor",
316
+ "ColumnChooser": true
317
+ }
318
+ ```
319
+
320
+ `ColumnChooser: true` (strictly opt-in - tables without it are untouched) puts
321
+ a right-aligned **Columns** button above the table. It opens a menu of
322
+ checkboxes, one per column; uncheck to hide, check to show. While columns are
323
+ hidden the button reads `Columns (n hidden)`.
324
+
325
+ The hidden set is stored **in the form data** - an array of column hashes at
326
+ `<GroupHash>_HiddenColumns` (here `GradebookGrid_HiddenColumns`) - so it
327
+ round-trips with a save exactly like the selection state does: reload the
328
+ saved data and the same columns come back hidden. Hiding is non-destructive;
329
+ a hidden assignment's grades survive untouched and reappear when the column
330
+ is shown again.
331
+
332
+ Two details worth noticing in this app:
333
+
334
+ - **Defaults without data pollution.** On the Assignments tab the `Weight`
335
+ descriptor sets `PictForm.TabularDefaultHidden: true`, so the column starts
336
+ hidden - but nothing is written to the form data until the user actually
337
+ changes visibility. (A group-level `DefaultHiddenColumns: [...]` array does
338
+ the same per group, and the menu's **Reset to defaults** button returns to
339
+ this state.)
340
+ - **Everything stays aligned.** On the Grade Book tab the hidden columns are
341
+ *dynamic* (one per assignment): the "Assignments" banner's `ColumnSpan` and
342
+ the auto topic super-headers shrink to span only the visible columns.
343
+
344
+ ---
345
+
305
346
  ## Seeded example data
306
347
 
307
348
  Like the other example applications, the gradebook ships its data inline.
@@ -332,7 +373,8 @@ npm run build
332
373
  2. **Intersections are first-class.** `DynamicColumns` turns "students × assignments"
333
374
  into a real editable grid without hand-written columns.
334
375
  3. **Non-destructive always.** Hiding a column never discards the data behind it.
335
- 4. **State that persists.** Row/column selection rides along in the form data.
376
+ 4. **State that persists.** Row/column selection and the column chooser's
377
+ hidden set ride along in the form data.
336
378
  5. **One pattern, many grids.** The same `DynamicColumns` generator shape drives
337
379
  the Grade Book, the Performance breakdown, and the Commentary grid.
338
380