Add number is even view filter
We want to introduce a new view filter type that allows users to filter a number field to only match cells that have an even whole integer. So, for example:
- There is a Baserow table with a number field and two rows
- In the first row it's number field cell value is
1.2
and the second row it's number field cell is2.0
- You then create a filter on that number field with your new filter type
is even
- Then the end result is that row with cell value
1.2
is filtered out, whereas the row with2.0
is kept.
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 by:
- Create a filter for a text field
- Change a cell of that text field so it no longer matches the filter
- It should indicate in real time if the row doesn't match the filters anymore.
- See the screenshot below for an example of what this looks like in our UI
Pointers
- The filter must be compatible with the number field type.
- The real time check of if an edited 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