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

[core] Export TypographyVariant type #19598

Merged
merged 4 commits into from
Feb 14, 2020

Conversation

aleccaputo
Copy link
Contributor

@aleccaputo aleccaputo commented Feb 6, 2020

for feature #19572

  • export useful TS types for typography which were hard to discover
  • Remove unused code

Closes #19572

- export useful TS types for typography which were hard to discover
- Remove unused code
@aleccaputo aleccaputo requested a review from eps1lon February 6, 2020 23:10
@mui-pr-bot
Copy link

mui-pr-bot commented Feb 6, 2020

No bundle size changes comparing 01b8b09...1ed5965

Generated by 🚫 dangerJS against 1ed5965

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Form how I understood it, the idea what to expose more variables from createMuiTheme, for instance, the ones we import deep in https://material-ui.com/guides/typescript/? I don't understand why the types of the Typography component needs to be changed.

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Thanks for working on this but this is not what we discussed in #19572. It was specifically about createTypography and generally about key types that can't be extracted.


export interface TypographyTypeMap<P = {}, D extends React.ElementType = 'span'> {
props: P & {
align?: PropTypes.Alignment;
align?: TypographyAlignment;
Copy link
Member

Choose a reason for hiding this comment

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

We don't need this as explained in #19572 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha, will do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eps1lon fixed

@eps1lon eps1lon added PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI typescript labels Feb 7, 2020
@aleccaputo
Copy link
Contributor Author

Form how I understood it, the idea what to expose more variables from createMuiTheme, for instance, the ones we import deep in https://material-ui.com/guides/typescript/? I don't understand why the types of the Typography component needs to be changed.

@oliviertassinari Ah i defiantly misunderstood that, but can do that if you would like. Would you want me to just import/export them straight from index.d.ts?

@aleccaputo aleccaputo requested a review from eps1lon February 7, 2020 17:07
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

We were discussing Variant in createTypography not Typography. I can see no issue with Typography. Please stick to the things we discussed in the issue.

@oliviertassinari
Copy link
Member

@aleccaputo Did you have the time to look at the issue? :)

@aleccaputo
Copy link
Contributor Author

@oliviertassinari @eps1lon how's that look?

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@eps1lon eps1lon added package: material-ui Specific to @mui/material PR: ready to ship and removed PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Feb 13, 2020
@eps1lon eps1lon changed the title Export more types for typography [core] Export TypographyVariant type Feb 13, 2020
@oliviertassinari oliviertassinari merged commit 9f54e27 into mui:master Feb 14, 2020
@oliviertassinari
Copy link
Member

@aleccaputo Thank you for the cooperation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: material-ui Specific to @mui/material typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export useful developer Typescript types
4 participants