Skip to content

feat(GlFilteredSearch): add props for adding additional HTML attributes

What does this MR do?

Closes #1688 (closed)

Adds searchButtonAttributes and searchInputAttributes props to GlFilteredSearch. These props allow you to add HTML attributes to the search button and the search input. This is helpful for QA E2E specs because then data-qa-selector attributes can be added to these elements.

The searchButtonAttributes prop is added to the search button

Screen_Shot_2022-02-01_at_6.46.52_PM

The searchInputAttributes prop is added in three places

  1. The input when there are no tokens

Screen_Shot_2022-02-01_at_6.46.25_PM

  1. The input when editing a token

Screen_Shot_2022-02-01_at_6.45.23_PM

  1. The div that is clicked to add a new token

Screen_Shot_2022-02-01_at_6.45.59_PM

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • [-] If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • [-] If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.
Edited by Peter Hegman

Merge request reports