sadpandajoe opened a new pull request, #43404:
URL: https://github.com/apache/superset/pull/43404

   ### SUMMARY
   When a dataset column has a display Label (`verbose_name`) set, the Explore 
filter
   control had two related display bugs:
   
   - The filter column-picker's search box only matched the technical column 
name, not
     the Label, so searching for the Label text returned no results.
   - After selecting a column by its Label, the saved filter pill showed the 
technical
     column name instead of the Label — inconsistent with the Metrics control 
in the
     same panel, which already displays the Label correctly for the same column.
   
   The generated SQL and query results were already correct in both cases; this 
change
   is a display/search-matching fix only. Both fixes mirror the existing, 
working
   implementation already used by the Metrics control for the same column 
metadata.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before: searching a filter column by its Label returns no match; a saved 
filter pill
   for a labeled column shows the technical column name (e.g. `num > 500`).
   After: searching by Label matches the column; the saved filter pill shows 
the Label
   (e.g. `total_count > 500`), matching how the Metrics control already 
displays it.
   Evidence to follow as a comment on this PR.
   
   ### TESTING INSTRUCTIONS
   1. Edit a dataset column to set a display Label different from its technical 
name
      (e.g. the `birth_names` dataset's `num` column, Label `total_count`).
   2. Open a chart built from that dataset in Explore and add a filter.
   3. In the filter column-picker, search using the Label text — the column now 
appears
      in the results (previously it did not).
   4. Select the column, set an operator and value, and save the filter.
   5. Confirm the filter pill displays the Label (e.g. `total_count > 500`) 
rather than
      the technical column name.
   6. Open the filter's Custom SQL tab and confirm it still shows the technical 
column
      name (e.g. `num > 500`) — the underlying query is unaffected by this 
change.
   7. Repeat with a column that has no Label set and confirm search/display 
continue to
      use the technical column name exactly as before.
   
   Automated coverage: `AdhocFilterEditPopoverSimpleTabContent.test.tsx`,
   `AdhocFilter.test.ts`, `AdhocFilterOption.test.tsx`, 
`DndFilterSelect.test.tsx`.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] 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
   - [ ] 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