patw0929 / react-intl-tel-input

Rewrite International Telephone Input in React.js. (Looking for maintainers, and PRs & contributors are also welcomed!)
https://patw0929.github.io/react-intl-tel-input/
MIT License
284 stars 220 forks source link

Extract Flagbox #315

Closed mcataford closed 4 years ago

mcataford commented 4 years ago

Preamble

As part of removing the extraneous use of Webpack in #314 , I noticed that the usage of scss in styling forces the project to be bundled so that a style loader can take care of the style. Before scss can be replaced by something more appropriate for the module context (versus having a bundled webapp), there's a few refactors that can be done to simplify the logic, lighten the code and speed up later development.

Description

This breaks out the FlagBox component our of CountryList to separate concerns and extract code that is purely presentational in nature from containers that are more involved in business logic. As far as the outside API is concerned, this is a no-op, but it'll benefit developer velocity and further work.

Types of changes

Checklist:

QA

I went through storybook and interacted with the component before and after the changes, and compared with the latest master. No differences there. Also interacted with the CountryList using keyboard-only to make sure that it didn't regress.

Test suites passing + the above quality checks make this change a high-confidence move.

mcataford commented 4 years ago

FTR: Going to go ahead and merge it so I can continue on to the next small incremental refactor.

patw0929 commented 4 years ago

:tada: This PR is included in version 8.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: