mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Update sort and filter UI
Summary: The sort and filter UI now has a more unified UI, with similar capabilities that are accessible from different parts of Grist. It's now also possible to pin individual filters to the filter bar, which replaces the old toggle for showing all filters in the filter bar. Test Plan: Various tests (browser, migration, project). Reviewers: jarek, dsagal Reviewed By: jarek, dsagal Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D3669
This commit is contained in:
@@ -954,14 +954,16 @@ class TestUserActions(test_engine.EngineTestCase):
|
||||
self.apply_user_action(['BulkAddRecord', '_grist_Filters', [None], {
|
||||
"viewSectionRef": [1],
|
||||
"colRef": [1],
|
||||
"filter": [json.dumps({"included": ["b", "c"]})]
|
||||
"filter": [json.dumps({"included": ["b", "c"]})],
|
||||
"pinned": [True],
|
||||
}])
|
||||
|
||||
# Add the same filter for second column (to make sure it is not renamed)
|
||||
self.apply_user_action(['BulkAddRecord', '_grist_Filters', [None], {
|
||||
"viewSectionRef": [1],
|
||||
"colRef": [2],
|
||||
"filter": [json.dumps({"included": ["b", "c"]})]
|
||||
"filter": [json.dumps({"included": ["b", "c"]})],
|
||||
"pinned": [False],
|
||||
}])
|
||||
|
||||
# Rename choices
|
||||
@@ -971,9 +973,9 @@ class TestUserActions(test_engine.EngineTestCase):
|
||||
|
||||
# Test filters
|
||||
self.assertTableData('_grist_Filters', data=[
|
||||
["id", "colRef", "filter", "setAutoRemove", "viewSectionRef"],
|
||||
[1, 1, json.dumps({"included": ["z", "b"]}), None, 1],
|
||||
[2, 2, json.dumps({"included": ["b", "c"]}), None, 1]
|
||||
["id", "colRef", "filter", "setAutoRemove", "viewSectionRef", "pinned"],
|
||||
[1, 1, json.dumps({"included": ["z", "b"]}), None, 1, True],
|
||||
[2, 2, json.dumps({"included": ["b", "c"]}), None, 1, False]
|
||||
])
|
||||
|
||||
def test_add_or_update(self):
|
||||
|
||||
Reference in New Issue
Block a user