(core) split sort and filter menu into its own button

Summary:
  - New sort and filter button has several states
     - Empty / unsaved / saved
     - offers small save/revert button when unsaved

  - Fix little issue with hanging tooltip when the refElem is disposed.
    - The problem was that if you hover the save (or revert) button
      and then click the button, it causes the button to disappear,
      but the tooltip was staying.

Test Plan: Updated all tests to match the new UI.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: dsagal, paulfitz

Differential Revision: https://phab.getgrist.com/D2795
This commit is contained in:
Cyprien P
2021-04-30 19:28:52 +02:00
parent 8f008d8de2
commit 5baae7437a
6 changed files with 141 additions and 113 deletions

View File

@@ -13,6 +13,7 @@
font-size: var(--grist-small-font-size);
font-weight: 500;
text-transform: uppercase;
white-space: nowrap;
}
.viewsection_titletext {

View File

@@ -200,7 +200,7 @@ export class ViewLayout extends DisposableWithEvents implements IDomComponent {
),
dom.maybe<BaseView|null>(vs.viewInstance, (viewInstance: BaseView) => viewInstance.buildTitleControls()),
dom('span.viewsection_buttons',
viewSectionMenu(this.docModel, vs, this.viewModel, this.gristDoc.isReadonly, this.gristDoc.app.useNewUI)
dom.create(viewSectionMenu, this.docModel, vs, this.viewModel, this.gristDoc.isReadonly)
)
)),
dom.maybe(vs.activeFilterBar, () => dom.create(filterBar, vs)),