Skip to content

Conversation

@adimittal91
Copy link
Contributor

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ npm run change

Description of changes

Window.innerwidth is not defined in some cases in getResponsiveMode when the component is getting mounted. Adding error handling for such cases. Setting responsiveMode to undefined.

Focus areas to test

(optional)

@msftclas
Copy link

msftclas commented Jun 8, 2017

@adimittal91,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

responsiveMode++;
}
} catch (e) {
responsiveMode = undefined;
Copy link
Member

Choose a reason for hiding this comment

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

It seems like you should fall back to _defaultMode. Returning undefined is unexpected, given it doesn't map to any enum value.

@dzearing dzearing merged commit b0ee1f6 into microsoft:master Jun 12, 2017
jspurlin pushed a commit to jspurlin/office-ui-fabric-react that referenced this pull request Jun 12, 2017
* Enable no implicit any in the utilities package (microsoft#1970)

* Fix no implicit anys in utilities package.

* Rush change

* Reverse all shrinkwrap changes except the typings one.

* Fix bundle minification to exclude debug warnings. (microsoft#1973)

* Updating shrinkwrap, rush, and making minify build have production flag to remove debug code.

* Updates.

* removing lockfile.

* dropping to 7. Moving back to npm run build.

* Downgrading rush.

* Applying package updates.

* Website: Update dev.office.com header (microsoft#1966)

* Use Fabric Core 7.1.0 for the website

* Adjust position of caret's in header so that they spin around central axis

* Update to latest icon font from dev.office.com for header and move outside out :global{} to fix build issue

* Remove a u- prefix that was missed earlier

* Update dev.office.com header with the latest navigation links

* Add change file

* Make sure the quote rule is enabled for tsline (microsoft#1961)

* With responsive mode error (microsoft#1956)

* withResponsiveMode: Adding error handling around the case where window.innerWidth throws an exception

* adding change log file

* Create withResponsiveMode.tsx
christiango pushed a commit that referenced this pull request Jun 19, 2017
* Add ComboBox functionality

* Make a fix for IE where non-allowFreeform is showing the keypresses...

* Update the PR with code review feedback. Simplified the code a lot, decoupled the shared props/memebers from comboBox and Dropdown, and extended BaseAutoFill which allowed DynamicAutoFill to be removed

* Fixing some build warnings

* Update my example page to explicitly not use two mutually exclusive props

* The npm-shrinkwrap.json file automatically updated... commiting

* Had a bad copy paste, fixing up the incorrectly logic

* Removing the fontFamily aspect of the comboBox and utilizing the onRenderOption instead. The fontFamily aspect was too specific for the generic comboBox

* Update based on feedback

* Jspurlin jspurlin/combo box (#2)

* Enable no implicit any in the utilities package (#1970)

* Fix no implicit anys in utilities package.

* Rush change

* Reverse all shrinkwrap changes except the typings one.

* Fix bundle minification to exclude debug warnings. (#1973)

* Updating shrinkwrap, rush, and making minify build have production flag to remove debug code.

* Updates.

* removing lockfile.

* dropping to 7. Moving back to npm run build.

* Downgrading rush.

* Applying package updates.

* Website: Update dev.office.com header (#1966)

* Use Fabric Core 7.1.0 for the website

* Adjust position of caret's in header so that they spin around central axis

* Update to latest icon font from dev.office.com for header and move outside out :global{} to fix build issue

* Remove a u- prefix that was missed earlier

* Update dev.office.com header with the latest navigation links

* Add change file

* Make sure the quote rule is enabled for tsline (#1961)

* With responsive mode error (#1956)

* withResponsiveMode: Adding error handling around the case where window.innerWidth throws an exception

* adding change log file

* Create withResponsiveMode.tsx

* New Component: Stepper (#1759)

* First step at stepper implementation.

* Add first implementation of stepper.

* Add functionality to stepper

* Refine the Stepper class and add tests

* let's make sure to put focus back on the text field when submitting via enter

* Added documentation to Stepper.

* Add flexibility to current stepper implementation.

* Modified example implementations.

* Add aria-valuemax.

* Change Stepper to SpinButton.

* Add example with unit.

* Implement color scheme in the ContextualMenu control to enable alternative theming.

* Improvements to SpinButton.

* Fix increment function calls.

* Add new width optional parameter.

* Add label direction.

* Fix border.

* Add Position enum.

* `defaultValue` is now the deciding prop for using the default implementation or not.

* onBlur is now onValidate.

* Fix tests.

* Fix warnings.

* Add implementation for labelGap.

* Put some polish on the styling, added some icon support, and added some more example spinButtons

* Implement the bar and unit tests and component page

* Add the ability for the spinButton buttons to look pressed when spinning via keyboard

* Revert "Implement color scheme in the ContextualMenu control to enable alternative theming."

This reverts commit 4f830cd.

* Don't render an empty icon for an icon-less header menu item.

* Revert "Implement Document Title Bar"

* update some CSS for high contrast in ff and use css utility instead of concatenating string classnames

* Fix quotation issue

* Fix Spin Button properties table.

* Fix Spin Button example code

* Use iconProps instead of string

* Extracted `spinning` out of state

* Add autobind instead of manually binding private functions to this

* Change `+` syntax for more explicit `Number()`

* Remove unnecessary cast

* Fix typos

* `incrementButtonIcon` and `decrementButtonIcon` are now IIconProps

* Add KeyboardSpinDirection enum

* Fix test description

* Fix SpinButton tests

* Remove unused onChange callback from SpinButton

* Revert onChange

* Remove old Stepper.ts file

* Use module css instead of global

* Fix missing word in comment

* Callback functions now allow for void return (state to be updated outside)

* Use `_async` instead of window

* Fix minor rendering issue with browser zoom

* Rename `_spinning` to `_spinningByMouse` for clarity

* Fix tests

* Fix extra space before label

* Remove width outside of SpinButton component and fix styling

* Add more tests to SpinButton

* Fix SpinButton documentation

* Fix typo

* Fix AppDefinition for SpinButton and Spinner

* Add missing documentation to SpinButton title prop

* Various SpinButton fixes

* Fix SpinButton path for properties

* Fix SpinButton styling issues

* Remove labelGap property from SpinButton

* merge some changes

* merge changes

* merge

* Fix a new tslint warning after npm installing

* Fixing some casing warnings npm start was angry about

* Removing an extra line that got added with the last push

* Create SelectableOption.ts

* Create SelectableOption.ts

* Create ComboBox.Props.ts

* Create ComboBox.test.tsx

* Create ComboBox.Basic.Example.tsx

* Create Dropdown.Props.ts

* Fix the case sensitivity issue

* one more casing issue

* changing the reference of utilities in the test file

* Actually it look like it has to be pascalCase here

* ... really... what's going on with the casing here

* Address feedback from in person review with David

* A few minor updated to remove uneeded comment and unneeded try/finally in tests

* Fix up a typo and fix up to use consistent syntax on a few lines
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants