Skip to content

Shimmer: refactor in preparation for migration to OUFR#4958

Merged
Vitalius1 merged 32 commits intomicrosoft:masterfrom
Vitalius1:v-vibr/RefactorShimmer
May 26, 2018
Merged

Shimmer: refactor in preparation for migration to OUFR#4958
Vitalius1 merged 32 commits intomicrosoft:masterfrom
Vitalius1:v-vibr/RefactorShimmer

Conversation

@Vitalius1
Copy link
Copy Markdown
Contributor

@Vitalius1 Vitalius1 commented May 23, 2018

Pull request checklist

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

Description of changes

This PR is the last refactor of Shimmer and this version is intended for migration to OUFR. Most of the changes are moving stuff around so functionally nothing changed.

Shimmer - Example. (give it a couple seconds to load :bowtie:)

Things done:

  • Support for RTL
  • Support for HighContrast
  • Support for screen-readers
  • Support for theming
  • Built following mergeStyles pattern
  • Modularized as much as possible
  • Support for different browser (IE11, Edge, Firefox, Chrome, Safari, Opera)
  • A lot of examples on using Shimmer for building various skeletons of UI
  • Deprecated props are warned in the console
Microsoft Reviewers: Open in CodeFlow

Vitalie Braga added 30 commits May 8, 2018 22:55
Removes some styling from shimmer container.
Setup of elements wrapper.
Extracts some logic to a new module.
Still a lot to do.
Refactors common styles in ShimmerLine.styles
High Contrast capability.

public render(): JSX.Element {
const {
getStyles,
Copy link
Copy Markdown
Contributor

@jordandrako jordandrako May 23, 2018

Choose a reason for hiding this comment

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

Approved, but the getStyles prop name is being replaced with styles in 6.0. Depending on when you want this merged, before or after 6.0 is merged to master, you may need to replace getStyles in the props with styles. The function getStyles within the .styles.ts file can remain getStyles.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See this commit for details: f226fb4

@Vitalius1
Copy link
Copy Markdown
Contributor Author

@dzearing Do you know why bundlesize check is still pending? Also, is there anyone from your team available for a code review? Thanks!

* Optional boolean for enabling flexWrap of the container containing the shimmerElements.
* @default false
*/
flexWrap?: boolean;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be true by default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No. This subcomponent is also used internally by ShimmerBase when everything stays in one line. So by default is false.

Copy link
Copy Markdown
Contributor

@atneik atneik left a comment

Choose a reason for hiding this comment

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

:shipit:

this._warnMutuallyExclusive({
'lineElements': 'shimmerElements',
'customElementsGroup': 'lineElements'
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's no need to support deprecated props in an experimental component. Of course anything using it will have to be changed and tested.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@JasonGore This experimental component is used in odsp-common repo in items-view and odsp-shared-react packages. So removing the deprecated props will cause a break on their side. The intention is to merge this change and right after I will migrate this component to OUFR without the deprecated props. Next step will be to go and change in odsp-common the imports from experiments to office-ui-fabric-react and use the correct props. Only when all this happens I will be able to remove the deprecated props in experiments package without breaking the contract with Shimmer API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, thanks for the explanation

* @deprecated Use 'top' instead
*/
TOP = 3,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No need to support deprecated values

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same as above

* @default false
* @deprecated Use 'customElementsGroup' instead.
*/
isBaseStyle?: boolean;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please remove deprecated props

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same as above

@JasonGore JasonGore dismissed their stale review May 26, 2018 01:16

Justification provided

@Vitalius1 Vitalius1 merged commit 5ecdca8 into microsoft:master May 26, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request May 29, 2018
* master:
  Applying package updates.
  Shimmer: refactor in preparation for migration to OUFR (microsoft#4958)
  Applying package updates.
  Theming: fix error colors (microsoft#4969)
  MaskedTextField: Added event callback passthrough (microsoft#4956)
  Experiments/Nav component: Enable auto expand until the next manual expand disables the auto expand (microsoft#4996)
  Applying package updates.
  Experiments/Nav component: Auto select/expand based on the selectedKey prop (microsoft#4984)
  StickyPane: fix Array.from in Ie (microsoft#4982)
  ContextualMenu has aria-labelledBy referencing element not in DOM (microsoft#4963)
  Keyboard support for the slim version of experiments/Nav component and added aria attributes (microsoft#4981)
  Move ghdocs to wiki (microsoft#4977)
  Remove build artifacts (microsoft#4976)
  Revisited the Multi-select Combo box initial state selection fix (microsoft#4884)
  Applying package updates.
  readme cleanup (microsoft#4972)
  Theming: add the bodyBackgroundDarker semantic slot (microsoft#4957)
  Improvements for auto-select opt-in mode (microsoft#4914)
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request May 29, 2018
* master: (85 commits)
  Applying package updates.
  Shimmer: refactor in preparation for migration to OUFR (microsoft#4958)
  Applying package updates.
  Theming: fix error colors (microsoft#4969)
  MaskedTextField: Added event callback passthrough (microsoft#4956)
  Experiments/Nav component: Enable auto expand until the next manual expand disables the auto expand (microsoft#4996)
  Applying package updates.
  Experiments/Nav component: Auto select/expand based on the selectedKey prop (microsoft#4984)
  StickyPane: fix Array.from in Ie (microsoft#4982)
  ContextualMenu has aria-labelledBy referencing element not in DOM (microsoft#4963)
  Keyboard support for the slim version of experiments/Nav component and added aria attributes (microsoft#4981)
  Move ghdocs to wiki (microsoft#4977)
  Remove build artifacts (microsoft#4976)
  Revisited the Multi-select Combo box initial state selection fix (microsoft#4884)
  Applying package updates.
  readme cleanup (microsoft#4972)
  Theming: add the bodyBackgroundDarker semantic slot (microsoft#4957)
  Improvements for auto-select opt-in mode (microsoft#4914)
  Applying package updates.
  Revert ChoiceGroup change in 5.0 to minimize potential partner impact. (microsoft#4962)
  ...
cliffkoh added a commit that referenced this pull request May 30, 2018
@Vitalius1 Vitalius1 mentioned this pull request May 30, 2018
2 tasks
@Vitalius1 Vitalius1 deleted the v-vibr/RefactorShimmer branch July 3, 2018 00:04
@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.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants