rusackas commented on a change in pull request #18662:
URL: https://github.com/apache/superset/pull/18662#discussion_r819656707



##########
File path: 
superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx
##########
@@ -545,7 +589,18 @@ export default function VizTypeGallery(props: 
VizTypeGalleryProps) {
     if (searchInputValue.trim() === '') {
       return [];
     }
-    return fuse.search(searchInputValue).map(result => result.item);
+    return fuse
+      .search(searchInputValue)
+      .map(result => result.item)
+      .sort((a, b) => {

Review comment:
       Maybe instead of using this sort based on the label's place in the array 
order, we can define the labels with some basic (flexible/configurable) 
weighting, like this
   ```js
   const chartLabels = {
       Featured: {
           weight: 0.3
       },
       Depracated: {
           weight: -0.3
       }
   }
   ```




-- 
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