Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow empty cells in typed tables #403

Merged

Conversation

mgax
Copy link
Contributor

@mgax mgax commented Apr 3, 2024

Fix #282.

⚠️ Migrations will conflict with #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

@mgax mgax force-pushed the feat/typed-table-empty-cells branch from a357268 to 17059bb Compare April 3, 2024 13:36
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kesara kesara changed the base branch from main to feat/modern-footer April 23, 2024 20:59
Copy link
Contributor

@microamp microamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I'm not experienced in generating migration scripts in Django/Wagtail, setting required=False for these fields does make sense to me.

@kesara kesara merged commit ede7302 into ietf-tools:feat/modern-footer Apr 24, 2024
5 checks passed
@kesara kesara mentioned this pull request May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow empty cells in typed tables
4 participants