ietf-tools / www

A customized CMS for the IETF website
BSD 3-Clause "New" or "Revised" License
22 stars 45 forks source link

feat: Allow empty cells in typed tables #403

Closed mgax closed 2 months ago

mgax commented 3 months ago

Fix https://github.com/ietf-tools/www/issues/282.

⚠️ Migrations will conflict with https://github.com/ietf-tools/www/pull/388. Whichever gets merged first, the migrations in the other branch should just be deleted and re-created, they are just a side-effect of the Streamfield schema being changed.

By setting the content blocks as required=False, empty values are allowed. They are displayed as blank cells, even the "Numeric" (FloatBlock) which would, by default, render as None.

In the page editor:

Screenshot 2024-04-03 at 16 21 07

Rendered on the page:

Screenshot 2024-04-03 at 16 16 14
codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.15%. Comparing base (4ad3143) to head (df8de30). Report is 7 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #403 +/- ## ========================================== + Coverage 82.72% 83.15% +0.42% ========================================== Files 124 130 +6 Lines 2599 2665 +66 ========================================== + Hits 2150 2216 +66 Misses 449 449 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.