Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve visibility of advanced search options #3502

Open
flodolo opened this issue Jan 2, 2025 · 1 comment
Open

Improve visibility of advanced search options #3502

flodolo opened this issue Jan 2, 2025 · 1 comment
Labels

Comments

@flodolo
Copy link
Collaborator

flodolo commented Jan 2, 2025

While the lens icon copies the behavior of the funnel icon (there is no visual indication that it will open a dropdown), part of the feedback during the survey was that the feature is not discoverable.

I see two options to improve the situation.

Move the advanced search options to the main dropdown

This was suggested during implementation, and I still feel like a separate menu is the right approach. The idea is that users should touch these options very rarely, because the defaults cover most of the cases.

Add a visual hint

Looking into Font Awesome, it looks like it supports icon stacking, so we could stack a down arrow with the lens? I did some quick experiments, but it doesn't look amazing.

@flodolo
Copy link
Collaborator Author

flodolo commented Jan 2, 2025

Example of stacked icon

Screenshot 2025-01-02 alle 09 39 49
diff --git a/translate/src/modules/search/components/SearchPanel.css b/translate/src/modules/search/components/SearchPanel.css
index 7a3b28a9..7d682eec 100644
--- a/translate/src/modules/search/components/SearchPanel.css
+++ b/translate/src/modules/search/components/SearchPanel.css
@@ -15,9 +15,14 @@
 
     .fa {
       font-size: 17px;
-      margin-left: 10px;
+      margin-left: 1px;
       margin-top: 9px;
     }
+
+    .fa-caret-down {
+      font-size: 13px;
+      transform: translate(35%, -25%);
+    }
   }
 
   & .menu {
diff --git a/translate/src/modules/search/components/SearchPanel.tsx b/translate/src/modules/search/components/SearchPanel.tsx
index a837c494..3d7d87c9 100644
--- a/translate/src/modules/search/components/SearchPanel.tsx
+++ b/translate/src/modules/search/components/SearchPanel.tsx
@@ -128,7 +128,10 @@ export function SearchPanel({
   return (
     <div className='search-panel'>
       <div className='visibility-switch' onClick={toggleVisible}>
-        <span className='fa fa-search'></span>
+        <span className="fa-stack">
+          <i className="fa fa-search fa-stack-2x"></i>
+          <i className="fa fa-caret-down fa-stack-1x"></i>
+        </span>
       </div>
       {visible ? (
         <SearchPanelDialog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 Needs triage
Development

No branches or pull requests

1 participant