cccs-RyanK opened a new pull request, #19979:
URL: https://github.com/apache/superset/pull/19979

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   The select all functionality was removed previously, but our users rely on 
this useful feature in the explore chart, so this PR is for bringing back that 
feature. 
   
   With the way things currently are, the user must manually select columns one 
by one by clicking or drag and drop into the columns field when building a 
query in the explore view.  When the user is initially creating a chart, it is 
often the case that they want to query all the possible fields to identify what 
is relevant and narrow it down. This becomes tedious when dealing with 
data-sets that have many columns (100+).
   
   We have had to create a temporary solution in our fork just to allow our 
users who rely on it to use the explore chart. This design aims to reintroduce 
the select all functionality while keeping the UX clean. It is only shown in 
the columns select when in the raw records query mode in the explore view on 
the 'table plugin', since this is the place where it is needed by our users.
   
   Thoughts and feedback are appreciated!
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   Drag and Drop Feature Enabled:
   select all
   When the columns field is empty, the select all button can be clicked to 
populate the columns values with all available options.
   
![image](https://user-images.githubusercontent.com/102618419/167172650-8bca2bde-a248-4d9d-806d-79ce72075538.png)
   
   deselect all
   Once any option(s) have been selected, the button text changes to deselect 
all. If it is clicked in this state, it empties the columns value (and changes 
back to 'select all').
   
![image](https://user-images.githubusercontent.com/102618419/167172736-867516b4-9338-49ec-b09e-e8dc8f405466.png)
   
   Drag and Drop Feature Disabled
   * the selected values component is "full" when all options are currently 
selected (list of selected values equals list of options)
   select all
   When the columns value is not full*, the select all button can be clicked to 
add all remaining options. Since there is already a 'clear' button built in to 
select control when dnd is disabled, the select all button does not turn into a 
deselect all button when an item is added. This allows a user to select all 
options without first clearing the values and then selecting all. The user can 
still clear the values at any time with the 'clear' button. 
   
   select all disabled
   When the columns value is full*, the select all button is disabled because 
all options are currently selected. 
   
   
    
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   Drag and Drop Feature enabled
    - Go into the explore view for a chart that has the 'Table' viz type. 
    - In the 'Data' tab, under the 'Query' drop down, select 'Raw Records' as 
the 'Query Mode'.
    - For the 'Columns' selector, you should see a 'Select All' or 'Deselect 
All' button. 
    - Clicking it should select all options when the button is in select all 
mode, and should deselect all buttons when in deselect mode.
   
   Drag and Drop Feature disabled
    - Go into the explore view for a chart that has the 'Table' viz type. 
    - In the 'Data' tab, under the 'Query' drop down, select 'Raw Records' as 
the 'Query Mode'.
    - For the 'Columns' selector, you should see a 'Select All' button. 
    - If all options are selected, the button should be disabled. 
    - Otherwise, the button should be enabled and should select all remaining 
options
    - The clear button in the selector component should still clear all 
selected values.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: 
https://github.com/apache/superset/discussions/18247
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to