Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make search component extendable #2230

Merged
merged 23 commits into from
Jan 26, 2023

Conversation

pearl-truss
Copy link
Contributor

Summary

This PR:

  • Adds inputProps to Search and passes it down to TextInput
  • Split Search into two new components SearchField and SearchButton

Related Issues or PRs

closes #2209

How To Test

  1. Run yarn storybook and look at Components/Search/* notice the search input and search buttons have been broken out into their own components. And are composed together in Search
  2. Run yarn test:coverage and verify that all tests are passing and that the coverage threshold is being met.

Screenshots (optional)

SearchField

Screen Shot 2022-12-12 at 10 23 54 AM

SearchButton

Screen Shot 2022-12-12 at 10 24 02 AM

Search

Screen Shot 2022-12-12 at 10 24 08 AM

@pearl-truss pearl-truss changed the title [feat] Make search component extendable feat: Make search component extendable Dec 12, 2022
NamibiaTorres
NamibiaTorres previously approved these changes Dec 14, 2022
Copy link

@NamibiaTorres NamibiaTorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Everything is working and passing. Great job Pearl!

gidjin
gidjin previously approved these changes Dec 14, 2022
Copy link
Contributor

@gidjin gidjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks for contributing! If you want your github profile linked in our readme you can run yarn contributors:add <github user name> code and commit the changes before you merge.

import { render } from '@testing-library/react'
import { SearchField } from './SearchField'

describe('SearchField component', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I wonder if it's possible/worth the time to add a test ensuring that the new inputProps are passed down as expected? I can go either way on it so I'll leave it up to you :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! I'll add additional test before I merge this

jcbcapps
jcbcapps previously approved these changes Jan 23, 2023
Copy link
Contributor

@jcbcapps jcbcapps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great work!

@pearl-truss
Copy link
Contributor Author

@gidjin @NamibiaTorres I added the additional test. However, I'm seeing a build issue that I can't reproduce locally, it seems to be a CircleCI environment issue. I found some context here. If either of you have seen this issue before please let me know, I'm not sure how to proceed

Copy link
Contributor

@gidjin gidjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the updates!

@pearl-truss pearl-truss merged commit 9bd9137 into main Jan 26, 2023
@pearl-truss pearl-truss deleted the pm-make-search-component-extendable branch January 26, 2023 13:48
@gidjin gidjin mentioned this pull request Feb 17, 2023
gidjin added a commit that referenced this pull request Feb 17, 2023
## [4.1.0](4.0.0...4.1.0) (2023-02-17)

### Features

- Make search component extendable ([#2230](#2230)) ([9bd9137](9bd9137))

### Bug Fixes

- Export IconListContent and IconListIcon ([#2210](#2210)) ([#2217](#2217)) ([5cb4024](5cb4024))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] Make Search component more extendable
5 participants