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

Fabric 7: TypeScript 3.5 Updates (WIP) #9209

Merged
merged 18 commits into from Jun 3, 2019
Merged

Fabric 7: TypeScript 3.5 Updates (WIP) #9209

merged 18 commits into from Jun 3, 2019

Conversation

JasonGore
Copy link
Member

@JasonGore JasonGore commented May 24, 2019

Pull request checklist

  • Addresses an existing issue: Fixes Target TS3.5 #9038
  • Include a change request file using $ npm run change

Description of changes

WIP TS3.5 updates on fabric-7 branch.

Microsoft Reviewers: Open in CodeFlow

// It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for JSX attributes,
// but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.
// Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then return native props.
// We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -15,7 +15,8 @@ export interface IMarkdownTableCellProps extends IMarkdownTableProps {
* Render the table cell as a th or td.
* @default 'td'
*/
as: 'th' | 'td';
// TODO: doc says default is 'td', where is it set? if it has a default, why is 'as' required? making optional for now.
as?: 'th' | 'td';
Copy link
Member Author

Choose a reason for hiding this comment

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

@ecraig12345 FYI. The watch issue combined with my lack of knowledge with this code made it hard to iterate and find a good fix for this.

export type IPageSectionPropsWithSectionName = IPageSectionProps;
// export type IPageSectionPropsWithSectionName<TPlatform extends string = string> =
// Required<Pick<IPageSectionProps<TPlatform>, 'sectionName'>> & Omit<IPageSectionProps<TPlatform>, 'sectionName'>;
// export type IPageSectionPropsWithSectionName = Required<Pick<IPageSectionProps, 'sectionName'>> & Omit<IPageSectionProps, 'sectionName'>;
Copy link
Member Author

Choose a reason for hiding this comment

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

@ecraig12345 FYI. The watch issue combined with my lack of knowledge with this code made it hard to iterate and find a good fix for this.

examples: IExample[];
// TODO: There seems to be a disparity between this type and IPageSectionProps as used in Page.tsx.
// Making optional for now to workaround.
examples?: IExample[];
Copy link
Member Author

Choose a reason for hiding this comment

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

@ecraig12345 One more...

@JasonGore JasonGore closed this May 30, 2019
@JasonGore JasonGore reopened this May 30, 2019
@JasonGore
Copy link
Member Author

CI (aside from CLA) appears not to be running against this PR.

@JasonGore
Copy link
Member Author

I'm not sure why CI on this PR remains busted. Perhaps it's because it started as a draft PR? I'm going to close this PR and create another.

@JasonGore JasonGore reopened this May 31, 2019
@JasonGore JasonGore requested a review from Raghurk as a code owner May 31, 2019 20:05
@msft-github-bot
Copy link
Contributor

msft-github-bot commented May 31, 2019

Component perf results:

Scenario Target branch avg total (ms) PR avg total (ms) Target branch avg per item (ms) PR avg per item (ms) Is significant change Is regression
PrimaryButton 92.789 ... 0.928 ... ... ...
BaseButton 37.639 ... 0.376 ... ... ...
NewButton 124.349 ... 1.243 ... ... ...
button 6.314 ... 0.063 ... ... ...
DetailsRows without styles 206.131 ... 2.061 ... ... ...
DetailsRows 229.867 ... 2.299 ... ... ...
Toggles 58.761 ... 0.588 ... ... ...
NewToggle 76.111 ... 0.761 ... ... ...
DocumentCardTitle with truncation 30.188 ... 0.302 ... ... ...
DefaultButton ... 76.373 ... 0.764 ... ...


// TODO: Have Markus verify... className props was required, but I'm not sure if it should be.
// If it is truly required, it seems the parent component should be ensuring that default values are
// provided and not assume the consumer of the slot will provide them.
Copy link
Member Author

Choose a reason for hiding this comment

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

@Markionium FYI, wasn't sure which way to go here. (Sorry for the typo on your name.)

@msft-github-bot
Copy link
Contributor

Hello @JasonGore!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msft-github-bot) and give me an instruction to get started! Learn more here.

@JasonGore
Copy link
Member Author

@msft-github-bot Please merge in 1 minute

@msft-github-bot
Copy link
Contributor

Hello @JasonGore!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Mon, 03 Jun 2019 18:15:26 GMT, which is in 1 minute

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@msft-github-bot msft-github-bot merged commit 812abf8 into microsoft:fabric-7 Jun 3, 2019
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants