Skip to content

Conversation

BPScott
Copy link
Member

@BPScott BPScott commented Dec 15, 2018

WHY are these changes introduced?

The final cyclical import is dead (again). We can now enable the import/no-cycle eslint rule (again).

#691 removed some cyclical imports. It also stopped exporting a few color helper functions in the final build (see #718) as I incorrectly assumed that they should be internal. It turns out people are using them, so that PR got reverted in #721.

WHAT is this pull request doing?

I reapplied the not-the-color-helper parts of #691 in #754. This PR is the follow up that removes the cyclical dependency in color helpers, without touching any exports.

It moves the color types into the utility folder next to the color utility functions

How to 🎩

  • Run tests
  • Run yarn run sk type-check to prove typescript is happy
  • Note that while an import path is changed the contents of that file remain identical.
  • Run yarn build-consumer web then run yarn run sk type-check in web to prove there are no missing exports (You may have to install polaris-icons in web as a workaround because build-consumer isn't smart enough to handle updating transitive dependencies) - web consumes the HSBColor type in some places so this will prove that the types are still exported.

@BPScott BPScott temporarily deployed to polaris-react-pr-767 December 15, 2018 00:34 Inactive
@BPScott BPScott requested a review from tmlayton December 15, 2018 00:35
@BPScott BPScott force-pushed the cyclical-imports-THEEND branch from 34c8de7 to 8cb2d62 Compare December 15, 2018 00:37
UNRELEASED.md Outdated

- Added a slight delay to the Percy screenshot script to give time for components to render fully ([#704](https://github.com/Shopify/polaris-react/pull/704))
- Refactors to remove cyclical type imports ([#759](https://github.com/Shopify/polaris-react/pull/759) and [#754](https://github.com/Shopify/polaris-react/pull/754))
- Refactors to remove cyclical type imports ([#759](https://github.com/Shopify/polaris-react/pull/759), [#754](https://github.com/Shopify/polaris-react/pull/754) and [#767](https://github.com/Shopify/polaris-react/pull/767))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Refactors to remove cyclical type imports ([#759](https://github.com/Shopify/polaris-react/pull/759), [#754](https://github.com/Shopify/polaris-react/pull/754) and [#767](https://github.com/Shopify/polaris-react/pull/767))
- Refactors to remove cyclical type imports ([#759](https://github.com/Shopify/polaris-react/pull/759), [#754](https://github.com/Shopify/polaris-react/pull/754), and [#767](https://github.com/Shopify/polaris-react/pull/767))

Oxford comma

Copy link
Member Author

Choose a reason for hiding this comment

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

The strippers, JFK, and Stalin appreciate your attention to detail.

(I've rebased to include this)

Copy link
Contributor

@tmlayton tmlayton left a comment

Choose a reason for hiding this comment

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

Type checking in both this project and web looks good 🎩

@BPScott BPScott force-pushed the cyclical-imports-THEEND branch from 8cb2d62 to 719ca66 Compare December 17, 2018 22:52
@BPScott BPScott requested a deployment to polaris-react-pr-767 December 17, 2018 22:53 Abandoned
@BPScott BPScott merged commit 3be0888 into master Dec 17, 2018
@BPScott BPScott deleted the cyclical-imports-THEEND branch December 17, 2018 23:00
@danrosenthal danrosenthal temporarily deployed to production January 7, 2019 14:27 Inactive
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.

3 participants