gristlabs_grist-core/app/client/ui
Alex Hall 29dd33a45c (core) Add other direction of linking by reflist
Summary:
Allows selecting by a reflist in another table. This generalises cursor-linking with a ref column, but now it's filter linking.

Added another case to LinkingState where the source column is a reflist to the target table, filtering by the id column.

Updated convertQueryFromRefs and related functions to handle this since the id column has no column ref. In this case the string 'id' is used instead of a number.

LinkingState also checks if the source value is a reflist and uses that as the list of filter values instead of a single-element list of the cell value.

Indirect linking also works, where the source and target columns both are both references to the same table. This was the plan for a source reflist and target ref column.
I was surprised to see it also works perfectly when both columns are reflists, and it filters rows where there's an intersection!

Adding rows to the target section using the selected source record for default values is iffy. When filtering by row ID, there's no column for defaults, so the new row disappears.
For a source reflist and target ref, the first value of the reflist is the default, which is okayish. When both are reflists, the full source reflist is the default for the target column.
This seems like a bit much but just using the first value seems a bit arbitrary when there's room for all of them?

While doing all this I noticed an unrelated bug which I fixed as I was refactoring. Previously cursor linking based on a reference column did not update the cursor in the link target
when the value of the selected reference cell changed. Now cursor linking uses a floating row model like most other cases to observe the value correctly.

Test Plan: Extended SelectByRefList test and fixture, added previously failing test to RightPanelSelectBy.

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D3004
2021-08-30 17:39:15 +02:00
..
AccountWidget.ts (core) Site Switcher and Other Sites 2021-08-18 11:24:41 -07:00
AddNewButton.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ApiKey.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
App.css (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
App.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
AppHeader.ts (core) Site Switcher and Other Sites 2021-08-18 11:24:41 -07:00
AppUI.ts (core) Site Switcher and Other Sites 2021-08-18 11:24:41 -07:00
BillingForm.ts (core) add a way to change subdomain in billing pages 2021-08-19 21:22:41 -04:00
BillingPage.ts (core) add a way to change subdomain in billing pages 2021-08-19 21:22:41 -04:00
BillingPageCss.ts (core) add a way to change subdomain in billing pages 2021-08-19 21:22:41 -04:00
BillingPlanManagers.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
BottomBar.ts (core) Making side bars a bit more usable for narrow screen 2021-01-19 15:22:01 +01:00
buttons.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
CodeHighlight.ts (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00
ColumnFilterMenu.ts (core) Polish and enable Reference List widget 2021-08-12 11:51:21 -07:00
CustomThemes.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
DocHistory.ts (core) Fix JS error when switching from DocHistory to ActionLog too quickly. 2020-12-11 14:33:29 -05:00
DocMenu.ts (core) Site Switcher and Other Sites 2021-08-18 11:24:41 -07:00
DocMenuCss.ts (core) Site Switcher and Other Sites 2021-08-18 11:24:41 -07:00
DocTour.ts (core) Allow adding a single link at the bottom of a document tour card 2021-07-30 00:49:53 +02:00
Document.css (core) move client code to core 2020-10-02 13:24:21 -04:00
DocumentSettings.ts (core) Simple localization support and currency selector. 2021-08-26 13:36:49 -07:00
errorPages.ts (core) Site Switcher and Other Sites 2021-08-18 11:24:41 -07:00
ExampleCard.ts (core) Polish UI/UX of onboarding popups 2021-07-30 15:44:18 +02:00
ExampleInfo.ts (core) Redesign examples and templates UI 2021-07-28 12:29:03 -07:00
FieldConfig.ts (core) Implement UI for trigger formulas. 2021-06-29 10:24:16 -04:00
FieldMenus.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
FileDialog.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
FilterBar.ts (core) Hide filter bar for inactive widget in mobile mode 2021-08-23 10:33:44 +02:00
forms.ts (core) In Welcome questionnaire, add 'School' option, ask to enter company or school 2020-11-02 14:05:31 -05:00
GridOptions.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
GridViewMenus.ts (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
HomeImports.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
HomeIntro.ts (core) Redesign examples and templates UI 2021-07-28 12:29:03 -07:00
HomeLeftPane.ts (core) Disabling plugin import sources menu options when import is disabled 2021-08-09 16:54:12 +02:00
LeftPanelCommon.ts (core) Enable auto triggering of Welcome Tour, and various improvements. 2021-07-30 14:17:54 -04:00
MakeCopyMenu.ts (core) Fix warning bug in Save Copy dialog 2021-08-27 12:02:59 -07:00
MenuToggle.ts (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
modals.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
mouseDrag.ts (core) Add our very own implementation of tokenfield (aka pillbox, tag list) 2021-05-03 17:16:24 -04:00
MultiSelector.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
NotifyUI.ts (core) suspend a team site after an AppSumo refund 2021-07-15 09:14:12 -04:00
OnBoardingPopups.ts (core) Enable auto triggering of Welcome Tour, and various improvements. 2021-07-30 14:17:54 -04:00
PagePanels.ts (core) Brings welcome tour and hide behind a flag 2021-07-19 16:30:53 +02:00
Pages.ts (core) Filter out pages for hidden views from the page list. 2021-08-27 13:51:57 -04:00
PageWidgetPicker.ts (core) When changing a table for a page widget, unset widget-linking to avoid invalid values. 2021-08-25 12:53:46 -04:00
PinnedDocs.ts (core) Fix staging test and tweak template line height 2021-07-29 08:16:19 -07:00
ProfileDialog.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
resizeHandle.ts Initial config with a few files that build on client and server side. 2020-05-20 00:50:46 -04:00
RightPanel.ts (core) Enable auto triggering of Welcome Tour, and various improvements. 2021-07-30 14:17:54 -04:00
RowContextMenu.ts (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
selectBy.ts (core) Add other direction of linking by reflist 2021-08-30 17:39:15 +02:00
sendToDrive.ts (core) Fixing origin check during Google Authentication 2021-07-23 00:43:27 +02:00
shadowScroll.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ShareMenu.ts (core) Export to Excel and Send to drive 2021-07-21 16:36:00 +02:00
TemplateDocs.ts (core) Redesign examples and templates UI 2021-07-28 12:29:03 -07:00
Tools.ts (core) Redesign examples and templates UI 2021-07-28 12:29:03 -07:00
tooltips.ts (core) Draft cells 2021-05-25 21:14:49 +02:00
TopBar.ts (core) Hide workspace in breadcrumbs if doc is unsaved 2021-08-05 15:57:03 -07:00
TopBarCss.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
transientInput.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
transitions.ts (core) Show a welcome card when a user opens an example for the first time. 2020-09-09 23:08:50 -04:00
TreeViewComponent.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
TreeViewComponentCss.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
TriggerFormulas.ts (core) Implement UI for trigger formulas. 2021-06-29 10:24:16 -04:00
UserImage.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
UserManager.ts (core) Disallow the combination of Public Edit access and granular ACLs. 2021-03-26 09:59:41 -04:00
ViewLayoutMenu.ts (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
viewport.ts (core) Make mobile the default mode. 2021-02-25 11:31:43 -05:00
ViewSectionMenu.ts (core) remove the sort&filter save button on readonly mode 2021-05-07 18:08:05 +02:00
VisibleFieldsConfig.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
WelcomePage.ts (core) Site Switcher and Other Sites 2021-08-18 11:24:41 -07:00
welcomeTour.ts (core) Enable auto triggering of Welcome Tour, and various improvements. 2021-07-30 14:17:54 -04:00
widgetTypes.ts (core) move client code to core 2020-10-02 13:24:21 -04:00