(core) Show summary tables on Raw Data page

Summary:
Summary tables now have their own raw viewsection, and are shown
under Raw Data Tables on the Raw Data page.

Test Plan: Browser and Python tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3495
This commit is contained in:
George Gevoian
2022-07-06 00:41:09 -07:00
parent 8bab8c18fa
commit a051830aeb
31 changed files with 452 additions and 308 deletions

View File

@@ -73,8 +73,13 @@ class MetaTableExtras(object):
if rec.summarySourceTable else None)
def setAutoRemove(rec, table):
"""Marks the table for removal if it's a summary table with no more view sections."""
table.docmodel.setAutoRemove(rec, rec.summarySourceTable and not rec.viewSections)
"""
Marks the table for removal if it's a summary table with no more (non-raw) view sections.
"""
is_summary_table = rec.summarySourceTable
view_sections_table = table.docmodel.get_table('_grist_Views_section')
has_view_sections = view_sections_table.lookupOne(isRaw=False, tableRef=rec.id)
table.docmodel.setAutoRemove(rec, is_summary_table and not has_view_sections)
class _grist_Tables_column(object):