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

fix: Transfers responsibility of InputText's main attributes and callbacks to the renderer #163

Merged
merged 5 commits into from
Jul 11, 2022

Conversation

lucasfp13
Copy link
Contributor

@lucasfp13 lucasfp13 commented Jul 7, 2022

What's the purpose of this pull request?

This PR intends to fix the InputText by removing some component's local implementation, which should be the responsibility of the parent component that is rendering it.

How does it work?

Previously, some main attributes were being defined inside InputText component (e.g. onInput and value) and by doing this, parent components rendering the InputText had limitations using the same attributes.

How to test it?

The component should look the same as before. The main difference is the change of the responsibility to implement input's required attributes to the parent.

Checklist

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.

@lucasfp13 lucasfp13 added the Bug Fixes Something isn't working label Jul 7, 2022
@lucasfp13 lucasfp13 self-assigned this Jul 7, 2022
@vercel
Copy link

vercel bot commented Jul 7, 2022

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

Name Status Preview Updated
nextjs-store-storybook ✅ Ready (Inspect) Visit Preview Jul 11, 2022 at 5:07PM (UTC)

@vtex-sites
Copy link

vtex-sites bot commented Jul 7, 2022

Preview is ready

This pull request generated a Preview

👀   Preview: https://sfj-8bff5a0--nextjs.preview.vtex.app
🔬   Go deeper by inspecting the Build Logs
📝   based on commit 8bff5a0

@vercel vercel bot temporarily deployed to Preview July 7, 2022 14:24 Inactive
@vtex-sites
Copy link

vtex-sites bot commented Jul 7, 2022

Lighthouse Reports

Here are the Lighthouse reports of this Pull Request

📝 Based on commit 8bff5a0

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

@vercel vercel bot temporarily deployed to Preview July 7, 2022 19:39 Inactive
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!

@renatamottam renatamottam changed the title fix: Transfers responsibility of InputText's main attributes and callbacks to the renderer Fix: Transfers responsibility of InputText's main attributes and callbacks to the renderer Jul 8, 2022
Copy link
Contributor

@victorhmp victorhmp left a comment

Choose a reason for hiding this comment

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

LGTM!
Just a minor nitpick

src/components/ui/InputText/InputText.tsx Outdated Show resolved Hide resolved
@lucasfp13 lucasfp13 force-pushed the fix/input-text-component branch from 8dedcc5 to 5dbfc80 Compare July 11, 2022 14:35
@vercel vercel bot temporarily deployed to Preview July 11, 2022 14:40 Inactive
@vercel vercel bot temporarily deployed to Preview July 11, 2022 17:07 Inactive
@lucasfp13 lucasfp13 changed the title Fix: Transfers responsibility of InputText's main attributes and callbacks to the renderer fix: Transfers responsibility of InputText's main attributes and callbacks to the renderer Jul 11, 2022
@lucasfp13 lucasfp13 merged commit 8bff5a0 into main Jul 11, 2022
@lucasfp13 lucasfp13 deleted the fix/input-text-component branch July 11, 2022 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fixes Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants