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: Add css modules, tokens and refactor Search components #150

Merged
merged 9 commits into from
Jul 21, 2022

Conversation

ArthurTriis1
Copy link
Contributor

@ArthurTriis1 ArthurTriis1 commented Jul 20, 2022

Signed-off-by: Arthur Andrade [email protected]

What's the purpose of this pull request?

How does it work?

This PR renames the components from Search feature to follow the Pattern Search[ComponentName], and relocates the components to group in search folder, as that's components share the same states provided for useInputSearch and belong to the same feature.

The refactored components are:

Before After
src/components/common/SearchInput src/components/search/SearchInput
src/components/search/History src/components/search/SearchHistory
src/components/search/Suggestions src/components/search/SearchDropdown
src/components/search/SuggestionProductCard src/components/search/SearchProductCard
src/components/ui/Search/Suggestions src/components/search/SearchSuggestions
src/components/search/TopSuggestions/index.ts src/components/search/SearchTop/index.ts

Also, this PR adds tokens to SearchHistory, but when it was done, it was perceived that the SearchHistory style is shared with SearchTop, SearchDropdown and SearchSuggestions, so file src/components/search/search-common.module.scss was created to be added to these 4 components.

To finish, storybook documentation was created for all search components, with an Overview documentation for the feature using API mocks add-on.

How to test it?

To test, you can check the feature Search in storybook documentation and check the style and behaviours of the feature in preview.

Checklist

You may erase this after checking them all ;)

Changelog

  • Added an entry in the CHANGELOG.md at the beginning of its due section. The latest version should comes first.
  • Added the PR number with the PR link at the entry in the CHANGELOG.md. E.g., New items in the pull_request_template.md (#4)

PR Description

  • Added a label according to the PR goal - Breaking change, Enhancement, Bug or Chore.
  • Added the component, hook, or pathname in-between backticks (``) - If applicable. E.g., ComponentName component.
  • Identified the function or parameter in the PR - If applicable. E.g., useWindowDimensions hook.

Documentation

  • PR description
  • Added to/Updated the Storybook - if applicable.
  • For documentation changes, ping @ carolinamenezes, @ PedroAntunesCosta or @ Mariana-Caetano to review and update.

Signed-off-by: Arthur Andrade <[email protected]>
@vercel
Copy link

vercel bot commented Jul 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
gatsby-store-storybook ✅ Ready (Inspect) Visit Preview Jul 21, 2022 at 5:31PM (UTC)

@vtex-sites
Copy link

vtex-sites bot commented Jul 20, 2022

Preview is ready

This pull request generated a Preview

👀   Preview: https://preview-150--gatsby.preview.vtex.app
🔬   Go deeper by inspecting the Build Logs
📝   based on commit 85406bb

@ArthurTriis1 ArthurTriis1 self-assigned this Jul 20, 2022
@ArthurTriis1 ArthurTriis1 added Documentation Improvements or additions to documentation Features New feature or request labels Jul 20, 2022
@ArthurTriis1 ArthurTriis1 changed the title feat: Add Search feature Feat: Add css modules, tokens and refactor Search components Jul 20, 2022
Signed-off-by: Arthur Andrade <[email protected]>
@ArthurTriis1 ArthurTriis1 marked this pull request as ready for review July 20, 2022 18:55
Signed-off-by: Arthur Andrade <[email protected]>
Signed-off-by: Arthur Andrade <[email protected]>
Copy link
Contributor

@hellofanny hellofanny left a comment

Choose a reason for hiding this comment

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

Approving because it's has the same changes made on vtex-sites/nextjs.store#173 👍

@vtex-sites
Copy link

vtex-sites bot commented Jul 21, 2022

Lighthouse Reports

Here are the Lighthouse reports of this Pull Request

📝 Based on commit 85406bb

Lighthouse Report by page
📎   /
📎   /apple-magic-mouse/p
📎   /office

Signed-off-by: Arthur Andrade <[email protected]>
Signed-off-by: Arthur Andrade <[email protected]>
Signed-off-by: Arthur Andrade <[email protected]>
Copy link
Collaborator

@renatamottam renatamottam left a comment

Choose a reason for hiding this comment

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

LGTM!

@ArthurTriis1 ArthurTriis1 merged commit 38d54e1 into main Jul 21, 2022
@ArthurTriis1 ArthurTriis1 deleted the FS-381-Add-new-tokens-to-SearchHistory branch July 21, 2022 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation Features New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants