This adds a feature to filter on main view. I added a "Filter" button on the side navigation bar which users can press in order to filter each column header by different values which includes entry fields for name and participants and numerical ranges for all count fields. Note that this doesn't include filtering by chat type since this was addressed in https://github.com/tkroening/CounterForMessenger/pull/6. This merges backend functionality with the filter_treeview function added in https://github.com/tkroening/CounterForMessenger/pull/4. Users can click "Clear filters" in order to get rid of all selections.
[x] New feature (non-breaking change which adds functionality)
[x] This change requires a readme update
How Has This Been Tested?
The filter feature was manually tested.
[x] Test A
Load sample data
Click the "Filter" button in the sidebar to open the new popup
Choose a name from one of the rows and enter it into the "Name" entry box (ex: Emily Smith)
Click "Apply Filters"
Result: The data is filtered so only the rows that match the name are selected.
[x] Test B
Load sample data
Click the "Filter" button in the sidebar to open the new popup
Choose a subset of participants and enter it into the "Participants" entry box (ex: Emily Smith, John Doe)
Click "Apply Filters"
Result: The data is filtered so only rows where the participants has a subset of the participants entered into the entry box are selected.
[x] Test C
Load sample data
Click the "Filter" button in the sidebar to open the new popup
Enter in a min and max value for one of the numerical fields (ex: Number of messages, min is 5, max is 8)
Click "Apply Filters"
Result: The data is filtered so only rows where the number of messages is between min and max are selected.
[x] Test D
Load sample data
Click the "Filter" button in the sidebar to open the new popup
Enter in a min and max value for one of the numerical fields and a subset of participants in the participants entry box (ex: Participants: Emily Smith, John Doe. Number of Messages: min: 5 max: 8)
Click "Apply Filters"
Result: The data is filtered so only rows where the number of messages is between the min and max and the participants has a subset of the participants entered into the entry box are selected.
[x] Test E
Load sample data
Click the "Filter" button in the sidebar to open the new popup
Click "Apply Filters"
Click "Clear filters"
Result: All selections are removed so all of the rows appear.
Test Configuration:
App version: 0.1.8
Hardware: Macbook Pro 2020, 2 GHz Quad-Core Intel Core i5 processor, macOS Ventura version 13.5.1
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published in downstream modules
Description
This adds a feature to filter on main view. I added a "Filter" button on the side navigation bar which users can press in order to filter each column header by different values which includes entry fields for name and participants and numerical ranges for all count fields. Note that this doesn't include filtering by chat type since this was addressed in https://github.com/tkroening/CounterForMessenger/pull/6. This merges backend functionality with the
filter_treeview
function added in https://github.com/tkroening/CounterForMessenger/pull/4. Users can click "Clear filters" in order to get rid of all selections.Fixes # (issue) https://github.com/Kubis10/CounterForMessenger/issues/29#issue-1659924278
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
The filter feature was manually tested.
Result: The data is filtered so only the rows that match the name are selected.
Result: The data is filtered so only rows where the participants has a subset of the participants entered into the entry box are selected.
Result: The data is filtered so only rows where the number of messages is between min and max are selected.
Result: The data is filtered so only rows where the number of messages is between the min and max and the participants has a subset of the participants entered into the entry box are selected.
Result: All selections are removed so all of the rows appear.
Test Configuration:
Checklist: