Page MenuHomePhabricator

docs: review styles for the doc search
Open, Needs TriagePublic

Description

Background

This task is to review and improve the styles for the new search bar (and results) implemented in T317792: Consider adding search to the Codex docs site.

Design proposal

Search bar

Make the search bar similar to the Codex SearchInput:

  1. Use background-color-base and border-color-interactive
  2. When hover over the search input, use border-color-interactive--hover and color-placeholder
  3. If possible, align left and right paddings to 8px
  4. Make the ⌘k less prominent by using smaller paddings and background-color-neutral-subtle and border-color-muted

image.png (2,880×1,400 px, 345 KB)

Search results
  • Modal:
    • 512px width on desktop and tablet and full-screen on mobile
    • Do we need the keyboard navigation in this modal? We don't provide keyboard navigation in other menus in the Codex site
  • Make the menu results simpler and similar to the Codex MenuItem:
    • Remove the # from the results if possible
    • Remove the gray border around the results and use instead a border-color-muted divider to separate each of them in the list
    • Use background-color-interactive--hover and background-color-interactive--active when hover and active
    • Bold the text when it matches the text typed in the input
    • When the typed text matches words within a paragraph of a page section, the relevant description’s text in the search result will appear in bold, indicating that the paragraph contains matched text.
    • Include InfoChip to show the section where the result is included (just if possible)

Captura de pantalla 2025-01-10 a las 12.22.55.png (2,880×1,404 px, 417 KB)

Acceptance criteria

Design

  • Explore improvements for the search bar
  • Explore improvements for the search results

Code

  • Update the Codex site with the decided improvements

Event Timeline

CCiufo-WMF renamed this task from Codex search: review styles to docs: review styles for the doc search input.Jan 6 2025, 5:26 PM
CCiufo-WMF triaged this task as Medium priority.
CCiufo-WMF set the point value for this task to 0.
bmartinezcalvo renamed this task from docs: review styles for the doc search input to docs: review styles for the doc search.Jan 10 2025, 10:59 AM

I've explored potential design improvements for the search bar and results. Listing all them here:

Search bar

Make the search bar similar to the Codex SearchInput by:

  1. Use background-color-base and border-color-interactive
  2. When hover over the search input, use border-color-interactive--hover and color-placeholder
  3. If possible, align left and right paddings to 8px
  4. Make the ⌘k less prominent by using smaller paddings and background-color-neutral-subtle and border-color-muted

image.png (2,880×1,400 px, 345 KB)

Search results
  • Modal:
    • 512px width on desktop and tablet and full-screen on mobile
    • Do we need the keyboard navigation in this modal? We don't provide keyboard navigation in other menus in the Codex site
  • Make the menu results simpler and similar to the Codex MenuItem:
    • Remove the # from the results if possible
    • Remove the gray border around the results and use instead a border-color-muted divider to separate each of them in the list
    • Use background-color-interactive--hover and background-color-interactive--active when hover and active
    • Bold the text when it matches the text typed in the input
    • When the typed text matches words within a paragraph of a page section, the relevant description’s text in the search result will appear in bold, indicating that the paragraph contains matched text.
    • Include InfoChip to show the section where the result is included (just if possible)

Captura de pantalla 2025-01-10 a las 12.22.55.png (2,880×1,404 px, 417 KB)

After discussions with the engineers, we've determined that adjusting the visual design (CSS) should be relatively easy. However, modifying the interactions and behaviors (JavaScript) will be more challenging. So we will update the visual styles in this task and we will work on interactions and reorganization of the search results in T382540: docs: Improve search results.

CCiufo-WMF removed the point value 0 for this task.Jan 13 2025, 4:53 PM
CCiufo-WMF lowered the priority of this task from Medium to Low.Feb 3 2025, 4:50 PM
CCiufo-WMF raised the priority of this task from Low to Needs Triage.Feb 24 2025, 3:12 PM
CCiufo-WMF moved this task from Needs Refinement to Backlog on the Design-System-Team board.

Change #1122717 had a related patch set uploaded (by VolkerE; author: VolkerE):

[design/codex@main] docs: Consistently use "`<html>` element" writing convention

https://gerrit.wikimedia.org/r/1122717

Change #1180253 had a related patch set uploaded (by VolkerE; author: VolkerE):

[design/codex@main] docs: Apply HTML "`<tagged-element>` element" writing convention

https://gerrit.wikimedia.org/r/1180253

Change #1122717 abandoned by VolkerE:

[design/codex@main] docs: Consistently use HTML "`<tag>` element" writing convention

Reason:

Superseded by I01c652d3059f12

https://gerrit.wikimedia.org/r/1122717

Change #1180253 merged by jenkins-bot:

[design/codex@main] docs: Apply HTML "`<tagged-element>` element" writing convention

https://gerrit.wikimedia.org/r/1180253

Change #1191541 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update Codex from v2.3.1 to v2.3.2

https://gerrit.wikimedia.org/r/1191541

Change #1191541 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v2.3.1 to v2.3.2

https://gerrit.wikimedia.org/r/1191541