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: update to the latest forma and new tokens #336

Merged
merged 18 commits into from
Aug 16, 2021

Conversation

suevalov
Copy link
Contributor

@suevalov suevalov commented Jul 26, 2021

  • Bumps Forma36 to the latest version
  • Update all tokens values (using codemod)

@suevalov suevalov requested a review from a team July 26, 2021 09:43
Copy link
Contributor

@kdamball kdamball left a comment

Choose a reason for hiding this comment

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

The previous naming vs current values are a bit confusing e.g: ElementMid < TextMid but overall code looks fine. I guess colorPrimary doesn't need changing?

I would manual check also on how apps look with these new values @fabe

@colomolo colomolo force-pushed the update-to-the-latest-forma branch from 50c5202 to 7877a6e Compare August 9, 2021 13:20
@colomolo colomolo requested review from kdamball and fabe August 11, 2021 12:26
@colomolo
Copy link
Contributor

colomolo commented Aug 11, 2021

Checked these apps (don't have access to all of them):

  • AI image tagging
  • Brandfolder
  • Bynder
  • Cloudinary
  • Commerce layer
  • commercetools
  • Dropbox
  • Frontify
  • Gatsby Cloud
  • Google Analytics
  • Image Focal Point
  • Jira
  • Knowledge base
  • Mux
  • Netlify
  • Optimizely
  • Saleor Commerce
  • Shopify
  • Smartling
  • Typeform

Copy link
Contributor

@kdamball kdamball left a comment

Choose a reason for hiding this comment

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

Left a bunch of minor questions but LGTM so far as long as tests pass

@@ -13,6 +13,9 @@ describe("EditorPage", () => {
beforeEach(() => {
sdk = mockProps.sdk;
sdk.entry.fields.experimentId.onValueChanged = fn => () => {};

Date.now = jest.fn(() => 100);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for this change? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Tests failed due to tricky date and random number mock logic inside the Dropdown component:
https://github.com/contentful/forma-36/blob/99609176a0604fd0f6b62753cf45a246cdbb48b6/packages/forma-36-react-components/src/components/Dropdown/Dropdown.test.tsx#L11-L14

Ids are generated based on random number, so needed to stub it here too. Checked this in with @suevalov

Copy link
Contributor

Choose a reason for hiding this comment

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

Good to know, thanks!

@@ -185,7 +185,7 @@ export default class AppConfig extends React.Component<Props, State> {
);
}

onParameterChange = (key: string, e: React.ChangeEvent<HTMLInputElement>) => {
onParameterChange = (key: string, e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | React.ChangeEvent<HTMLSelectElement>) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing here - do we support more elements? I dont see an equivalent change in HTML? I still see the Select tag

Copy link
Contributor

@colomolo colomolo Aug 12, 2021

Choose a reason for hiding this comment

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

Type error comes from TextField using onParameterChange handler:

onChange={this.onParameterChange.bind(this, def.id)}

Copy link
Contributor

Choose a reason for hiding this comment

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

Good call. Maybe then removing the HTMLInputElement?

Copy link
Contributor

@colomolo colomolo Aug 13, 2021

Choose a reason for hiding this comment

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

Copy link
Contributor

@andipaetzold andipaetzold left a comment

Choose a reason for hiding this comment

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

Please recreate the package-lock.json files with npm 6. The files were (accidentally?) migrated to lockfileVersion 2.

I am also happy to upgrade the whole repo to npm 7 but I don't think this PR is the right place for that.

@colomolo colomolo requested a review from andipaetzold August 12, 2021 16:08
@andipaetzold andipaetzold dismissed their stale review August 13, 2021 13:31

Lock files have the correct version now

Copy link
Contributor

@kdamball kdamball left a comment

Choose a reason for hiding this comment

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

LGTM - but haven't done any UI check

@colomolo colomolo merged commit d4cba00 into master Aug 16, 2021
@colomolo colomolo deleted the update-to-the-latest-forma branch August 16, 2021 09:46
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.

5 participants