-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Add API support for table settings to store record summary template #1391
Conversation
…tings' into mathesar-944-record-selector-settings
…d-selector-settings
…d-selector-settings
Codecov Report
@@ Coverage Diff @@
## master #1391 +/- ##
==========================================
+ Coverage 92.61% 92.68% +0.07%
==========================================
Files 130 132 +2
Lines 5521 5590 +69
==========================================
+ Hits 5113 5181 +68
- Misses 408 409 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…tings' into mathesar-944-record-selector-settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only reviewed the tests. And, I only had a few minor notes. Thanks for the good looking tests!
@silentninja can we close this PR now that we've decided to go a different direction? |
@seancolsen Don't we need it to show the preview data, we should change the PR to use a preview template instead of the preview columns. |
@silentninja and I chatted about this today and agreed to keep this PR, but we gave it a better title. |
Remove `columns` field from table preview settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think it looks good, subject to @dmos62 's request w.r.t. the fixtures.
I'm curious: What would the interpretation of "is not"
from the description examples be?
Don't have additional input. I'm not up-to-date with the problem being solved by this PR, so I'll forego review. |
@mathemancer 278 and 279 are column id, if column {278} is a text column referring to a product and column {279} is a text column referring to availability status of that product, the template would be rendered as "Cheese is not in stock" |
# Conflicts: # mathesar/signals.py
Fixed the test cases as per the review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good.
Related to #944. This PR adds support for using a templated string which can contain referent column ids for summarising a foreign key column. The column ids would then be replaced with equivalent value of the foreign key referent record.
This PR uses the first column value of the referent table as a default summary template.
API schema:
GET
/api/db/v0/tables/<id>/settings/
GET
/api/db/v0/tables/<id>/settings/<id>/
PATCH
/api/v0/tables/<id>/settings/<id>/
Checklist
Update index.md
).master
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin