You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "kgabryje (via GitHub)" <gi...@apache.org> on 2026/02/19 16:09:38 UTC

[PR] fix: Search in folders editor with verbose names [superset]

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

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   Fixes the folder search to match against `verbose_name` and `expression` fields in addition to `metric_name`/`column_name`. Previously, searching for an expression like `COUNT(*)` or a verbose name would not find the matching item.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   1. Open the dataset editor folders view
   2. Search for a metric by its expression (e.g., `COUNT(*)`)
   3. Search for a metric by its verbose name
   4. Verify matching items are shown in the results
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] 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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: Search in folders editor with verbose names [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38101:
URL: https://github.com/apache/superset/pull/38101#issuecomment-3928937823

   **Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: Search in folders editor with verbose names [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38101:
URL: https://github.com/apache/superset/pull/38101#issuecomment-3928254691

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: Search in folders editor with verbose names [superset]

Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #38101:
URL: https://github.com/apache/superset/pull/38101#discussion_r2828787972


##########
superset-frontend/src/components/Datasource/FoldersEditor/folderOperations.ts:
##########
@@ -79,8 +79,15 @@ export const filterItemsBySearch = (
   const matchingIds = new Set<string>();
 
   items.forEach(item => {
-    const name = 'metric_name' in item ? item.metric_name : item.column_name;
-    if (name?.toLowerCase().includes(lowerSearch)) {
+    const name =
+      'metric_name' in item ? item.metric_name : item.column_name;
+    const { verbose_name: verboseName, expression } = item;
+
+    if (
+      name?.toLowerCase().includes(lowerSearch) ||

Review Comment:
   nit: use .`some`?
   ```
   if ([name, verboseName, expression].some(s => s?.toLowerCase().includes(lowerSearch)))...
   ```



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: Search in folders editor with verbose names [superset]

Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje merged PR #38101:
URL: https://github.com/apache/superset/pull/38101


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: Search in folders editor with verbose names [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38101:
URL: https://github.com/apache/superset/pull/38101#issuecomment-3928295750

   <!-- Bito Reply -->
   The suggestion is valid — using .some() on the array [name, verboseName, expression] provides a more concise and readable way to check if any field matches the search, equivalent to the existing || chain.
   
   **superset-frontend/src/components/Datasource/FoldersEditor/folderOperations.ts**
   ```
   if ([name, verboseName, expression].some(s => s?.toLowerCase().includes(lowerSearch))) {
         matchingIds.add(item.uuid);
       }
   ```


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org