Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Component: VHeaderMobile #1876

Closed
1 task done
obulat opened this issue Oct 3, 2022 · 0 comments · Fixed by #1875
Closed
1 task done

Component: VHeaderMobile #1876

obulat opened this issue Oct 3, 2022 · 0 comments · Fixed by #1875
Assignees
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature 🟨 priority: medium Not blocking but should be addressed soon

Comments

@obulat
Copy link
Contributor

obulat commented Oct 3, 2022

Description

The new mobile search header is a composite component. In resting state, it shows the Openverse logo link, the search term, and the VContentSettingsButton. When the search input is activated, it shows a back button in the start (left) of the input, and a cross button for clearing the search term.
When the search input is activated, the Recent search terms modal should be opened.
The PR for this issue does not have to implement the Recent searches modal and the Content settings modal

API

Slots

Name Slot props Description
start - The items at the start of the header: VLogoButton when resting, and VBackButton when active
default - The items at the end of the header: the VContentSettingsButton when resting and VClearButton when active

State

The functionality for handling the search submission and search text updates should be extracted to a separate composable, and should be shared with the VHeaderDesktop (TODO: create the issue for the composable)

Code samples

<header>
  <form>
    <slot name="start">
      <VLogoButton v-if="!isActive"/>
      <VBackButton v-else />
    </slot>
    <input id="search-input" />
    <slot>
      <VClearButton v-if="isActive" />
      <template v-else>
        <VSearchStatus class="hidden md:flex" /> // The number of results
        <VSearchContentSettingsButton />
      </template>
    </slot>
  </form>
</header>

Dependencies

References

Implementation

  • 🙋 I would be interested in implementing this component.
@obulat obulat added 🟨 priority: medium Not blocking but should be addressed soon 🌟 goal: addition Addition of new feature 🕹 aspect: interface Concerns end-users' experience with the software labels Oct 3, 2022
@obulat obulat added this to the Create new header and footer milestone Oct 3, 2022
@obulat obulat self-assigned this Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature 🟨 priority: medium Not blocking but should be addressed soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant