-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Upgrade to TypeScript 2.8.1 #4411
Conversation
* In Panel component, isClickableOutsideFocusTrap should not be overriden back to false if it's already set to true in focusTrapZoneProps. (microsoft#4354) * In Panel, a true value of isClickableOutsideFocusTrap prop in focusTrapZoneProps should not be overriden. * Add change file. * MessageBar: For single line, put action button before dismiss button (microsoft#4365) * Reordered button elements for single line messagebars * New example for single line with dismiss and action buttons * Added change file * [TextField, Panel] Removed componentId internal prop (microsoft#3896) * Remove componentId internal prop * change file * Reinstate prop as deprecated * Fixed tslint issue * Update magellan-componentIdInternal_2018-02-06-19-27.json * Fix errors in Signal styles (microsoft#4367) * Fix: Website: Does not show neutral quaternary colors (microsoft#4188) * Add missing quaternary and alt colors on doc page * + change file * Fix focuszone props (microsoft#4335) * Revert "FocusTrapZone does not correctly trap focus when last child is FocusZone (microsoft#4172)" This reverts commit 699fa69. * Fix focus zone props so that it doesn't have a typescript error * adding change file * Searchbox: deprecate defaultValue (microsoft#4225) * Deprecate SearchBox defaultValue prop. * npm run change output * Do not try to show the suggestions when input is undefined (no more exceptions in IE) (microsoft#4294) * [BasePicker] suggestions should not be shown when input does not exist * added change file * Update master_2018-03-16-09-03.json * Remove a redundant "value" prop in ComboBox multi select example to eliminate confusing behaviors. (microsoft#4366) * Add multiSelect for ComboBox * Unbreak a unit test * rush change * bug fixes * Merge from upstream and resolve local build issues * Fix merge styles * Fix pending background * Unbreak unit test cases * Fix the merge * Add controled multi-select in the example page to make sure onChanged cb works * Remove trailing white spaces * Fix bug: enter key will not trigger onChanged * Dummy change to trigger another build * refactor * Fix some minor bugs * Update some comments for ComboBox * Minor bug fixes to the example page * rush change * Delete the old rush change file * Remove a trailing space * Remove a redundant property from the ComboBox example * rush chagne * Remove old rush change file * Update stanleyy-fillin_2018-03-26-22-09.json * Moving to ts-loader, throwing on console.warn in ssr tests (microsoft#4370) * Break on warnings. * Shrinkwrap update. * Applying package updates. * Missed a reference to awesome-typescript-loader in the webpack-resources file. * Rewrite suggestions for BaseFloatingPicker (experiments) (microsoft#4273) * create new suggestions, suggestionsControl, and suggestionsStore in experiments * add change files * fix picker tests and separate scss file into two files * Update BaseFloatingPicker.tsx * remove autobind reference from bad merge * address PR comments * address PR comments, fix selection for shouldSelectFirstItem * Checkbox: text should be selectable, icon shouldn't. (microsoft#4378) * Updating checkbox select. * addin change. * Fix snapshot. * Update change output (microsoft#4380) * Contextual Menu: Revert Split Button Alignment to Previous Left Aligntment (microsoft#4369) * made spin button and base button menu option un-focusable * added spin button test * added split button contextual menu change * got rid of un-needed code * added change files * added abillitiy to not focus on primary button for split button, but only on the container * enter on focus on split button trigger primary action * added split button style for disabled * prevent opening submenu if item is disabled * tighten restrictions on opening split buttons to open with alt + down * refactored button name and fixed test * updated bundle size * changed on menu item click to bw able to take in a keyboard event * updated package json * fixed weird tabbing * changed way we structured the focus * added stop propagation * changed split button container key down to work with other buttons now * update bundle size * added correct split button container styles * removed unnecessary attribute * fixed focusing on menu button when primary button is disabled * added change to focus * added aria hidden * fixed span location and moved TODO * added support to focus on whole container in split button for contextual menus * added comment * fixed styling issues with buttons * fixed style problems for contextual split button where content is centered * reverted change * added appropriate change file * Update contextualMenuAlignSplitButton_2018-03-27-18-13.json * Integrate markdown-to-jsx in example-app-base for use in documentation (microsoft#4302) * Add markdown to jsx related packages and update shrinkwrap * Copy template components to example app base and correct imports. * Create example md files * Add Markdown typings * Remove commented code * Test using md files in Activity Item Page * Simplify raw-loader md imports * npm run change output * Expand md import to full path * Applying package updates. * Contextual Menu Fix Split Button Submenu Target (microsoft#4368) * Update SplitButton submenu in ContextualMenu to base itself of the splitButtonContainer * rush change * used ref to pass in container instead of parent element for more defenseive code * changed class to use correct refs * added example and refactored focus * Initials for phone numbers (microsoft#4376) * Adding option for calculating initials for phone numbers * Added change description * Name change and cleanup * Update initials-for-phonenumbers_2018-03-27-14-10.json * Update initials-for-phonenumbers_2018-03-27-14-10.json * Applying package updates. * Markdown-to-jsx: fix dependencies (microsoft#4389) * Add markdown to jsx related packages and update shrinkwrap * Copy template components to example app base and correct imports. * Create example md files * Add Markdown typings * Remove commented code * Test using md files in Activity Item Page * Simplify raw-loader md imports * npm run change output * Expand md import to full path * Move markdown and syntax packages to dependencies. * Move md files to docs folder. * Applying package updates. * Remove root-level imports of office-ui-fabric-react from /experiments (microsoft#4392) * Remove root imports of office-ui-fabric-react * Update change output * Fixing tests in experiments to not generate warnings in `npm start`. (microsoft#4391) * Applying package updates. * Variants: fix theming output so original input theme values are respected (microsoft#4393) * oops * changefile * dry * max line length error * Applying package updates. * OverflowSet: allow the OverflowSet to not be contained within a FocusZone (microsoft#4400) * Add a prop so that OverflowSets do not have to contain FocusZones * pull the common aspects into variables so they can be reused * simplify OverflowSet even more (use Tag to remove duplication) * Revert back and remove the key since it's no longer needed * rush change * Make sure the focusZoneProps are still getting passed down * The divProperties only need to be used when doNotContainWithinFocusZone is true * Remove unneeded import * DetailsList: link color invisible for selected row in high-contrast-white (microsoft#4395) * DetailsList: link color too close to selected background in high-contrast-white * add change file * SplitButton: Close menu when primary button is clicked (microsoft#4403) * Updating the split button to close the menu when the primary button is executed. * change * Fix Signal rendering in IE (microsoft#4404) * More Signals fixes * Update change output * Pass all props to Signal Icon elements * Update change output * Pickers: Fix suggestions not having proper value selected (microsoft#4408) * Revert "FocusTrapZone does not correctly trap focus when last child is FocusZone (microsoft#4172)" This reverts commit 699fa69. * fix picker suggestions and add many tests * adding snap file * adding change file * improve test * fix tests and config * revert test changes * last test update * update test name and snapshot * remove tests to expedite checkin * Breadcrumb: File rename to make the 6.0 merge diff more readable. (microsoft#4394) * File rename to make the 6.0 merge diff more readable. * Adding checkbox. * Also moving a few more. * Pickers: Add suggestions tests (microsoft#4409) * Revert "FocusTrapZone does not correctly trap focus when last child is FocusZone (microsoft#4172)" This reverts commit 699fa69. * fix picker suggestions and add many tests * adding snap file * adding change file * improve test * fix tests and config * revert test changes * last test update * update test name and snapshot * undo suggestions change so it will merge properly * revert change to suggestions * Disable tree shaking (temporarily) (microsoft#4410) * Temporarily disable tree shaking. * Adding change files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For HoverCard
@@ -33,7 +33,7 @@ export class Autofill extends BaseComponent<IAutofillProps, IAutofillState> impl | |||
}; | |||
} | |||
|
|||
public get cursorLocation(): number { | |||
public get cursorLocation(): number | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am nervous about this.
It was previously a non nullable, now it is nullable, which can break downstream partners.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should these default to 0? @joschect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partners can quickly fix it with a ! operator. The 0 change would be a bigger problem IMO
@@ -27,7 +27,7 @@ export class Checkbox extends BaseComponent<ICheckboxProps, ICheckboxState> impl | |||
boxSide: 'start' | |||
}; | |||
|
|||
private _checkBox = createRef<HTMLInputElement>(); | |||
private _checkBox = createRef<HTMLButtonElement>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I think this is correct, but should we just make this more general? HTMLElement
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -249,14 +249,14 @@ export class TextField extends BaseComponent<ITextFieldProps, ITextFieldState> i | |||
/** | |||
* Gets the selection start of the text field | |||
*/ | |||
public get selectionStart(): number { | |||
public get selectionStart(): number | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably also scary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it already can return null, the typings were just incorrect before. This doesn't change existing behavior, but it does inform partners using strict null checks that they need to do a null check here
@dzearing do we need to make any more changes here? |
Ping @dzearing? |
Can this affect downstream dependencies in any way? e.g. sp-client? |
It shouldn't impact downstream partners |
…c-react into ts-2-8 # Conflicts: # common/config/rush/npm-shrinkwrap.json
merged master to fix the build here. |
Pull request checklist
$ npm run change
Description of changes
Upgrades fabric react to TypeScript 2.8.1. The new compiler comes with updated typechecks and a new APIs definitions for DOM APIs. The fixes here were made with correctness and safety in mind, so I did not fix any bugs that the new errors introduced.