Add files lower than view filter
We want to introduce a new view filter type that allows users to filter a file field to only match cells that have a number of files uploaded less than a certain integer value. So, for example:
- There is a Baserow table with a file field and two rows
- In the first row it's file cell has three uploaded files and the second row it's file cell has one uploaded file
- You then create a filter on that file field with your new type
files lower than
with a value of2
- Then the end result is that the first row is filtered out as but the second row is kept and not filtered.
Note that every filter has two implementations, one in the backend and one in the web-frontend. The web-frontend checks in real time if the row still matches the filters. You can see how that works by for example creating a filter for a text field and then change a row value of that text field. It should indicate in real time if the row doesn't match the filters anymore. Like the example below.
Pointers
- The File field type stores a JSON list of uploaded files in a JSON column per field per user created Baserow table
- The filter must be compatible with the file field type only.
- The real time check of if an editted row still matches the current filters should work for this new filter.
- The real time check should work if you follow these steps
- Create a filter of your new type
- Create a row which matches the filter
- Change the row so it no longer matches the filter and observe the orange warning pops up
- Clicking away from the changed row makes it disappear
- The API docs (https://api.baserow.io/api/redoc/) should show this new view filter type as an option with explanation.
- The automatically generated docs (https://baserow.io/api-docs) should show this new view filter type as an option with example.
- We value:
- Unit tests for the backend and for the web-frontend.
- High quality and clear documentation in our code.
Information
- More information about how the setup your development environment can be found here https://baserow.io/docs/development%2Fdevelopment-environment
- More information about how view filters work can be found here https://baserow.io/docs/plugins%2Fview-filter-type
Edited by Nigel Gott