From 1041eb6d166594ef10216a31cb0b7207f5277c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20B=C4=82LTEANU?= Date: Tue, 19 Nov 2024 00:11:44 +0200 Subject: [PATCH] Replaces legacy magnifier icon with SVG icon in project jump (#41714). diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index 84d68904a..3bd8ae53b 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -331,6 +331,10 @@ + + + + diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 4f971d80d..36f523c2e 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -268,7 +268,9 @@ a#toggle-completed-versions {color:#999;} } .drdn.expanded .drdn-content {display:block;} -.drdn-content .quick-search {margin:8px;} +.drdn-content .quick-search {margin:8px; display: flex; align-items: center;} +.drdn-content .quick-search svg {margin-left: 5px; position: absolute;} +.drdn-content .quick-search input.autocomplete {background: none; padding-left: 24px !important;} .drdn-content .autocomplete {box-sizing: border-box; width:100% !important; height:28px;} .drdn-content .autocomplete:focus {border-color:#5ad;} .drdn-items {max-height:400px; overflow:auto;} diff --git a/app/assets/stylesheets/responsive.css b/app/assets/stylesheets/responsive.css index ea30ab86c..4eff84187 100644 --- a/app/assets/stylesheets/responsive.css +++ b/app/assets/stylesheets/responsive.css @@ -184,9 +184,14 @@ font-size:0.9375rem; font-weight:normal; } + #project-jump .drdn-content svg { + width: 1.25rem; + height: 1.25rem; + } #project-jump .drdn-content .autocomplete { height:40px; font-size:1.25rem; + padding-left: 28px !important; } #project-jump .drdn-content a { padding:8px; @@ -259,21 +264,7 @@ content: '\2261'; } - /* search magnifier icon */ - .search-magnifier { - font-family: var(--fonts-main); - color: #bbb; - - cursor: pointer; - -webkit-transform: rotate(-45deg); - -moz-transform: rotate(45deg); - -o-transform: rotate(45deg); - } - .search-magnifier--flyout { - font-size: 1.5625rem; - line-height: 54px; - position: absolute; z-index: 1; left: 12px; diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bac8da266..d708019c9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -610,7 +610,7 @@ module ApplicationHelper :class => (@project.nil? && controller.class.main_menu ? 'selected' : nil)) content = content_tag('div', - content_tag('div', q, :class => 'quick-search') + + content_tag('div', sprite_icon('search', icon_only: true, size: 18) + q, :class => 'quick-search') + content_tag('div', render_projects_for_jump_box(projects, selected: @project), :class => 'drdn-items projects selection') + content_tag('div', all, :class => 'drdn-items all-projects selection'), diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 865ca9928..12dbfafc2 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -27,7 +27,7 @@ diff --git a/config/icon_source.yml b/config/icon_source.yml index a97b4bcb9..92ea716b1 100644 --- a/config/icon_source.yml +++ b/config/icon_source.yml @@ -197,3 +197,5 @@ svg: chevrons-left - name: key svg: key +- name: search + svg: search -- 2.39.5 (Apple Git-154)