Page MenuHome

Visible column search for the spreadsheet
Confirmed, NormalPublicTO DO

Description

For creating row filters, the workflow would be much faster if we could select from a list of currently visible columns in the "Column Name" text box. This would act like attribute search, but only show columns from the current data set.

An implementation would probably create a dynamic read-only "visible columns" RNA collection property, and change the text box into a search box for that collection.

Event Timeline

Hans Goudey (HooglyBoogly) changed the task status from Needs Triage to Confirmed.Jun 18 2021, 10:56 PM
Hans Goudey (HooglyBoogly) created this task.

Johnny asked for some hints of where to start. I'm not sure exactly how I would do this (it's a bit less straightforward than I expected), but I have an idea:

  1. Define a new collection property for the spreadsheet in rna_space.c-- a collection of SpreadSheetColumnIDs.
  2. The collection should be a "runtime" collection, i.e. not stored in SpaceSpreadsheet in DNA.
    • RNA_def_property_collection_funcs will be important here, with a custom iterator implementation using CollectionPropertyIterator.
    • Searching for that RNA function gives quite a few examples of custom iterators.
  3. uiItemPointerR should be used in place of the current filter "name" property in the UI.

It's the iterator for visible columns that's making me unsure at the moment. The spreadsheet code is in a half-way state currently, where SpreadSheetColumn is meant to be persistent but isn't really
Do you have a thought about that part @Jacques Lucke (JacquesLucke)?