Page MenuHomePhabricator

Move `.cdx-typeahead-search--active` dynamic class from Codex to Vector
Closed, ResolvedPublicDesign

Description

The solution to T312594 involves changing the auto-expand behavior of the search input to expand when the menu opens, not when the input is focused. In CdxTypeaheadSearch, we previously had the following dynamic root classes:

'cdx-typeahead-search--active': isActive.value, // This variable is true when the input is focused.
'cdx-typeahead-search--expanded': expanded.value,

The --active class was used to expand the width of the input. Now, those styles depend on expanded.value, and we already have a dynamic class for that variable, so the --active class is no longer needed.

In Vector, the --active class is being used to handle showing the search button on hover and focus. Since this class is no longer needed in Codex, we should remove it there and add a dynamic class to the Vector app instead.


Acceptance criteria

  • The class is removed from Codex
  • A similar dynamic class is added to Vector and the show/hide button UX still works as expected

Event Timeline

AnneT changed the task status from Open to In Progress.
AnneT triaged this task as High priority.
AnneT removed a project: Design.
AnneT removed a subscriber: stjn.

Change 829055 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/skins/Vector@master] Remove dependency on `.cdx-typeahead-search--active` class

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

Change 829055 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove dependency on `.cdx-typeahead-search--active` class

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

Change 830694 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] TypeaheadSearch: Remove active class

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

Change 830694 merged by jenkins-bot:

[design/codex@main] TypeaheadSearch: Remove active class

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

Change 831947 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/core@master] Update Codex from v0.1.1 to v0.2.1

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

Change 831947 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.1.1 to v0.2.1

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