From 0d082c9cfc4b3a1bdb1c24585d6731234d12ae03 Mon Sep 17 00:00:00 2001 From: George Gevoian Date: Sat, 20 May 2023 21:00:31 -0400 Subject: [PATCH] (core) Wrap buttons in filter bar Summary: Filter bar buttons used to overflow, which required horizontal scrolling. Buttons now wrap instead. Test Plan: Tested manually. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3901 --- app/client/ui/FilterBar.ts | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/app/client/ui/FilterBar.ts b/app/client/ui/FilterBar.ts index 56a00c14..fa334c81 100644 --- a/app/client/ui/FilterBar.ts +++ b/app/client/ui/FilterBar.ts @@ -38,9 +38,9 @@ function makeFilterField(filterInfo: FilterInfo, popupControls: WeakMap use(filter.isSaved) && use(pinned.isSaved)), attachColumnFilterMenu(filterInfo, { @@ -114,7 +114,7 @@ function makePlusButton(viewSectionRec: ViewSectionRec, popupControls: WeakMap & { @@ -171,10 +176,10 @@ const cssBtn = styled('div', ` border-color: ${theme.filterBarButtonSavedHoverBg}; } `); -const primaryButton = (...args: IDomArgs) => ( +const cssFilterBarItemButton = (...args: IDomArgs) => ( dom('div', cssButton.cls(''), cssButton.cls('-primary'), cssBtn.cls(''), ...args) ); -const cssPlusButton = styled(primaryButton, ` +const cssPlusButton = styled(cssFilterBarItemButton, ` padding: 3px 3px `);