-
Notifications
You must be signed in to change notification settings - Fork 50
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
Remove prop-types definitions from mjml-react #93
Closed
IanEdington
wants to merge
29
commits into
wix-incubator:master
from
Faire:ian/remove-prop-types-from-build
Closed
Remove prop-types definitions from mjml-react #93
IanEdington
wants to merge
29
commits into
wix-incubator:master
from
Faire:ian/remove-prop-types-from-build
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* add align to MjmlTableProps * table align type
MJML allows setting global values by using elements in the header. By forcing children types to be defined it restricts the ability to define mjml tags in the header. This type checking also doesn't provide much value since the resulting error is immediately visible. Based on this PR #47420 MjmlText has already been changed.
…nts by @tubbo The `icon-padding` attribute is available for an [mjml social element](https://mjml.io/documentation/#mj-social), but this is not reflected in the type. Add this attribute to the `MjmlSocialElementProps` type definition.
…eact package by @philipwindeyer * add mjClass prop to ClassNameProps * lets try that again, without my auto-formatter modifying the entire file * include mjClass in maxProps test for MjmlBody
* Add MjmlError * Update test
* Update MjmlColumn props * Add test
* Add undefined to optional properties, part H In preparation for exactOptionalPropertyTypes in Typescript 4.4, add undefined to all optional properties. #no-publishing-comment This PR covers non-widely used packages starting with h- and following. microsoft/dtslint#335 * shorten line lengths
* Add missing table props * Remove patch version * Use ClassNameProps for table
… by @eps1lon * [mjml-react] Add Explicit types for children https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-wrapper.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-breakpoint.js#L10 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-font.js#L7 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-button.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-column.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-divider.js#L7 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-group.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-hero.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-image.js#L7 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-navbar.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-navbar-link.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-spacer.js#L7 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-table.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-wrapper.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-carousel.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-carousel-image.js#L10 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-social-element.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-social.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-section.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-column.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-button.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-text.js#L8 https://github.com/wix-incubator/mjml-react/blob/7894e20e52db6340e8bad2cbb731f6a3f2430db4/src/mjml-body.js#L8 * Will only throw once we remove implicit children * Adjust children after propTypes changes * Revert MjmlFont test changes
https://github.com/wix-incubator/mjml-react/blob/c1eb06ab366697a609dc6f552f86855b03ae4d80/src/mjml-carousel-image.js#L9 https://github.com/wix-incubator/mjml-react/blob/c1eb06ab366697a609dc6f552f86855b03ae4d80/src/mjml-divider.js#L7 https://github.com/wix-incubator/mjml-react/blob/c1eb06ab366697a609dc6f552f86855b03ae4d80/src/mjml-image.js#L7 https://github.com/wix-incubator/mjml-react/blob/c1eb06ab366697a609dc6f552f86855b03ae4d80/src/mjml-spacer.js#L7
From dtslint/dt.json to @definitelytyped/dtslint/dt.json #no-publishing-comment
…mlSectionProps (#58314) * Update index.d.ts Add backgroundPosition props to MjmlWrapperProps and MjmlSectionProps * Update index.d.ts
…pe and missing props by @philipwindeyer * [README] 🤖 Update support window diagram https://github.com/philipwindeyer/DefinitelyTyped/actions/runs/1885659450 * add missing direction prop to MjmlGroup and MjmlSocialElement * add mjml-html-attributes and its child types * add missing MjmlHtml ttpe * correct formatting * add renderToJson types as well * add renderToJson fns to test imports * correct renderToJson return type * add missing props for mj-accordion and its child components * make tag prop optional in MjmlHtml def. revert order of props and Title/Text components * reorder props back to original order to minimize diff * Update types/mjml-react/index.d.ts Co-authored-by: Ian Edington <[email protected]> Co-authored-by: github/workflows/support-window.yml <[email protected]> Co-authored-by: Ian Edington <[email protected]>
…ontWeight value by @jdemangeon
… in buttons by @nahtnam * Update `mjml-react` to allow `letterSpacing` `letter-spacing` support was added to `mjml` here: mjmlio/mjml#1732 Looking at `mjml-react`, the button (https://github.com/wix-incubator/mjml-react/blob/261d996d9fb67492bd8168caaec50a11fd5f3a25/src/mjml-button.js) calls `handleMjmlProps` (https://github.com/wix-incubator/mjml-react/blob/261d996d9fb67492bd8168caaec50a11fd5f3a25/src/utils.js#L28) with all the props. That function just proxies all the props to `mjml` which leads me to believe no change is required in the `react-mjml` library. Furthermore, I tested locally and adding a `// @ts-ignore` and providing the `letterSpacing` prop works as expected * Update mjml-react-tests.tsx
) * Update the readme to include updated import and Faire's announcement * Update the announcement * update slack link * Apply suggestions from code review Co-authored-by: Ian Edington <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
opps