-
Notifications
You must be signed in to change notification settings - Fork 40
Description
From @danb213 at CSIRO in #5624 (comment):
Something that might help is to auto-tick the results that appear on first load of the query results, this would make it easier for users to either click "deselect all" to select a few results, or manually remove any outliers. In addition it would help clarify the process - after our UAT a common comment was on how to select all results, even though the system treats the list as being fully selected until at least one row is ticked. With the addition of a permanent "select all" and "deselect all" perhaps this behaviour needs to be changed?
I think it would be ok if the "select all" and "invert" only appeared for up to x rows for performance reasons, that should satisfy our users.
Requested again by Corinna at CSIRO in #5624 (comment), and Silvia at CSIC in #5624 (comment):
Specify users at RJB are missing the "select all" button for query results that was available in Specify6.
They told me that, as use case, with a large number of results, selecting all but a few (15 or 25 out of hundreds or thousands) is difficult because they have to select all the records, scrolling down to the last one, and then deselect the few ones.
From @maxpatiiuk in #5624 (comment):
Those seemingly simple features are actually quite hard to implement, as not all query results are loaded in the browser.
I.e, if query returns 10k rows, the front-end can't fetch all 10k because that would take a long time.
Also, it is extremely impractical to find specific few rows you want to unselect among the 10k results.
See #1406 for a longer explanation.
Potential workarrounds:
- Add "Select All" and "Invert Selection", but have them only appear when query has fewer than x result rows.
- Do "Select All" and "Invert Selection" on the back-end (quite complicated)
Instead, most use cases for these features can be satisfied like this:
- You can quickly select several rows by selecting first row, and then shift-clicking on the other row, and all rows in between would be selected.
- You can adjust the query filters to exclude the rows you don't want to select.
This was not implemented intentionally in the past, but I am confident we can find a solution that loads segments of the results gradually:
We did that intentionally.
There are several reasons:
- If a query returns a million records, and you want to uncheck a few, it would have to load all million records first, which would be SLOW. The current solution allows you to select only records that are visible, thus ensuring that they are loaded already.
- If you have many query results, it is unlikely you would want to uncheck a handful of them, because a better solution is to just adjust your filter conditions. Instead, you would want to uncheck a handful of results happen if you have only ~30 results, which is not hard to do under current design: check first checkbox, scroll to the end, and shift click on the last checbox
Overview
This feature aims to enhance the query results UI by adding "Select All" and "Invert Selection" buttons that are always visible and functional, similar to functionality that was available in Specify6. Currently, the system treats the list as fully selected by default until at least one row is manually selected, which is causing confusion among users.
Requirements
UI Requirements
- Add a "Select All" button that is always visible in the query results view
- Keep the existing "Deselect All" button that appears when records are selected
- Group these buttons in a logical controls area above the query results table
Functional Requirements
-
"Select All" button:
- When clicked, selects all visible records in the current query result
- Should provide visual feedback (checkbox checked for all rows)
- For performance reasons, may be limited to operate on a maximum number of records
-
Behavior changes:
- Change the default behavior so query results are NOT treated as fully selected by default
- Make selection state visually explicit (show checked checkboxes when items are selected)
- Ensure record count indicators clearly show total vs. selected records
-
Performance considerations:
- Make sure there is throttling for selection operations on large result sets
- Possibly add an option to set maximum number of records that can be bulk-selected
- Consider lazy-loading techniques for rendering large result sets
Testing Requirements
- Test with small, medium, and large result sets (10, 100, 1,000, 100,000+ records)
- Verify performance with maximum supported result set size
- Test all selection operations: select all, deselect all
- Verify that downstream operations (export, create record set, etc.) work correctly with explicitly selected records
Acceptance Criteria
- Users can see and use "Select All" buttons at all times in query results
- Selecting all records in a large result set completes in a reasonable time (<10 seconds)
- Visual feedback clearly indicates which records are selected
- All downstream operations work correctly with the new selection model
- Performance remains acceptable for result sets of all sizes
User Experience Flow
- User runs a query that returns results
- Initial state shows all records with unchecked checkboxes
- User can click "Select All" to select all records at once
- User can then manually deselect specific records they want to exclude
- Record count indicator shows number of selected records out of total
Requested By: CSIRO, CSIC, and many others
Discussed in #5624
Originally posted by grantfitzsimmons August 25, 2022
When a user selects some records from the query list a "deselect all" button appears. However it would be very useful to also have options to "select all" and "invert selection" buttons that are always available
Reported By: CSIRO