Update style of top bar search and fix a11y concern

What does this MR do and why?

  • Align to the right
  • Move to the right of temporary items like "New look" widget
  • Fix accessibility concerns at narrower viewport widths

References

Screenshots or screen recordings

Viewport size Before After
xs (<576px) 20250327-17_29_35-gdk_test-400x800_2x 20250327-17_49_42-gdk_test-400x800@2x.png
sm (>=576px) 20250327-17_29_34-gdk_test-600x800_2x 20250327-17_49_41-gdk_test-600x800@2x.png
md (>=768px) 20250327-17_29_33-gdk_test-800x800_2x 20250327-17_49_40-gdk_test-800x800@2x.png
lg (>=992px) 20250327-17_29_32-gdk_test-1000x800_2x 20250328-16_08_30-gdk_test-1000x800@2x.png
xl (>=1200px) 20250327-17_29_31-gdk_test-1400x800_2x 20250328-16_08_29-gdk_test-1400x800@2x.png

Focus state for icon-only button:

Before After
Screenshot_2025-03-27_at_13.38.37 Screenshot_2025-03-27_at_13.38.00

How to set up and validate locally

  1. Check out this branch
  2. Visit the GDK
  3. If necessary, turn on the :search_button_top_right feature flag
  4. If necessary to get the Duo chat button to appear in your GDK (purely for spacing purposes, there is no functional change to it), apply this patch:
diff --git a/ee/app/views/layouts/nav/_ask_duo_button.html.haml b/ee/app/views/layouts/nav/_ask_duo_button.html.haml
index a759dbdafa64..2a3271f79066 100644
--- a/ee/app/views/layouts/nav/_ask_duo_button.html.haml
+++ b/ee/app/views/layouts/nav/_ask_duo_button.html.haml
@@ -1,4 +1,4 @@
-- if ::Gitlab::Llm::TanukiBot.show_breadcrumbs_entry_point?(user: current_user, container: @group || @project)
+- if ::Gitlab::Llm::TanukiBot.show_breadcrumbs_entry_point?(user: current_user, container: @group || @project) || true
   - label = s_('DuoChat|GitLab Duo Chat')
   - chat_disabled_reason = ::Gitlab::Llm::TanukiBot.chat_disabled_reason(user: current_user, container: @group || @project).to_s

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chad Lavimoniere

Merge request reports

Loading