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

Pivots move to overflow set when limited space - Initial PR for design review #11270

Closed

Conversation

msnyder-msft
Copy link
Contributor

@msnyder-msft msnyder-msft commented Nov 22, 2019

Pull request checklist

Description of changes

Today, pivots are not very responsive. When many tabs are shown and take up a lot of horizontal space, they don't adapt when the page/container size changes.
This change set is intended to add a resize group around the pivot and pushes items into an overflow set when there isn't enough room to show all the tabs.

This is just an initial change set to get some input on designs and things to consider. I'd love to hear your thoughts.
I also haven't touched the tests, I know there's going to be a bunch of work to do there.

Focus areas to test

Pivots

image
image

Microsoft Reviewers: Open in CodeFlow

@msftclas
Copy link

msftclas commented Nov 22, 2019

CLA assistant check
All CLA requirements met.

@msnyder-msft msnyder-msft changed the title Initial PR for design review - Pivots move to overflow set when limited space Pivots move to overflow set when limited space - Initial PR for design review Nov 22, 2019
@micahgodbolt
Copy link
Member

@msnyder-msft can you add a changefile? Just run yarn change from the root

@micahgodbolt
Copy link
Member

i know this just an early code review, but it'd be great to get it passing so that we can see the rendered output as well. Just need to add a changefile to get ci kicked off

@msnyder-msft
Copy link
Contributor Author

i know this just an early code review, but it'd be great to get it passing so that we can see the rendered output as well. Just need to add a changefile to get ci kicked off

Sorry for the delay. It's pushed now. Didn't realize that was a problem for design review.

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Nov 22, 2019

It looks like the build has failed with the following error:

● Pivot › renders link Pivot correctly
● Pivot › renders link Pivot correctly
office-ui-fabric-react:     expect(value).toMatchSnapshot()
office-ui-fabric-react:     Received value does not match stored snapshot "Pivot renders link Pivot correctly 1".
office-ui-fabric-react:     - Snapshot
office-ui-fabric-react:     + Received
office-ui-fabric-react:     @@ -1,369 +1,407 @@
office-ui-fabric-react:       <div>
office-ui-fabric-react:     -   <div
office-ui-fabric-react:     -     className=
office-ui-fabric-react:     -         ms-FocusZone
office-ui-fabric-react:     -         &:focus {
office-ui-fabric-react:     -           outline: none;
office-ui-fabric-react:     +   <div>
office-ui-fabric-react:     +     <div
office-ui-fabric-react:     +       style={
office-ui-fabric-react:     +         Object {
office-ui-fabric-react:     +           "position": "relative",
office-ui-fabric-react:               }
office-ui-fabric-react:     -     data-focuszone-id="FocusZone1"
office-ui-fabric-react:     -     onFocus={[Function]}
office-ui-fabric-react:     -     onKeyDown={[Function]}
office-ui-fabric-react:     -     onMouseDownCapture={[Function]}
office-ui-fabric-react:     -   >
office-ui-fabric-react:     -     <div
office-ui-fabric-react:     -       className=
office-ui-fabric-react:     -           ms-Pivot
office-ui-fabric-react:     -           {
office-ui-fabric-react:     -             -moz-osx-font-smoothing: grayscale;
office-ui-fabric-react:     -             -webkit-font-smoothing: antialiased;
office-ui-fabric-react:     -             box-shadow: none;
office-ui-fabric-react:     -             box-sizing: border-box;
office-ui-fabric-react:     -             color: #0078d4;
office-ui-fabric-react:     -             font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
office-ui-fabric-react:     -             font-size: 14px;
office-ui-fabric-react:     -             font-weight: 400;
office-ui-fabric-react:     -             margin-bottom: 0px;
office-ui-fabric-react:     -             margin-left: 0px;
office-ui-fabric-react:     -             margin-right: 0px;
office-ui-fabric-react:     -             margin-top: 0px;
office-ui-fabric-react:     -             padding-bottom: 0px;
office-ui-fabric-react:     -             padding-left: 0px;
office-ui-fabric-react:     -             padding-right: 0px;
office-ui-fabric-react:     -             padding-top: 0px;
office-ui-fabric-react:     -             position: relative;
office-ui-fabric-react:     -             white-space: nowrap;
office-ui-fabric-react:     +       }
office-ui-fabric-react:     +     >
office-ui-fabric-react:     +       <div
office-ui-fabric-react:     +         data-automation-id="visibleContent"
office-ui-fabric-react:     +         style={
office-ui-fabric-react:     +           Object {
office-ui-fabric-react:     +             "position": "fixed",
office-ui-fabric-react:     +             "visibility": "hidden",
office-ui-fabric-react:                 }
office-ui-fabric-react:     -       role="tablist"
office-ui-fabric-react:     -     >
office-ui-fabric-react:     -       <button
office-ui-fabric-react:     -         aria-selected={true}
office-ui-fabric-react:     -         className=
office-ui-fabric-react:     -             ms-Button
office-ui-fabric-react:     -             ms-Button--action
office-ui-fabric-react:     -             ms-Button--command
office-ui-fabric-react:     -             ms-Pivot-link
office-ui-fabric-react:     -             is-selected
office-ui-fabric-react:     -             {
office-ui-fabric-react:     -               -moz-osx-font-smoothing: grayscale;
office-ui-fabric-react:     -               -webkit-font-smoothing: antialiased;
office-ui-fabric-react:     -               background-color: transparent;
office-ui-fabric-react:     -               border-radius: 0px;
office-ui-fabric-react:     -               border: 0px;
office-ui-fabric-react:     -               box-sizing: border-box;
office-ui-fabric-react:     -               color: #323130;
office-ui-fabric-react:     -               cursor: pointer;
office-ui-fabric-react:     -               display: inline-block;
office-ui-fabric-react:     -               font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
office-ui-fabric-react:     -               font-size: 14px;
office-ui-fabric-react:     -               font-weight: 600;
office-ui-fabric-react:     -               height: 44px;
office-ui-fabric-react:     -               line-height: 44px;
office-ui-fabric-react:     -               margin-right: 8px;
office-ui-fabric-react:     -               outline: transparent;
office-ui-fabric-react:     -               padding-bottom: 0;
office-ui-fabric-react:     -               padding-left: 8px;
office-ui-fabric-react:     -               padding-right: 8px;
office-ui-fabric-react:     -               padding-top: 0;
office-ui-fabric-react:     -               position: relative;
office-ui-fabric-react:     -               text-align: center;
office-ui-fabric-react:     -               text-decoration: none;
office-ui-fabric-react:     -               user-select: none;
office-ui-fabric-react:     -               vertical-align: top;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &::-moz-focus-inner {
office-ui-fabric-react:     -               border: 0;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             .ms-Fabric--isFocusVisible &:focus:after {
office-ui-fabric-react:     -               border: 0px;
office-ui-fabric-react:     -               bottom: 2px;
office-ui-fabric-react:     -               content: attr(data-content);
office-ui-fabric-react:     -               left: 2px;
office-ui-fabric-react:     -               outline: 1px solid #605e5c;
office-ui-fabric-react:     -               position: relative;
office-ui-fabric-react:     -               right: 2px;
office-ui-fabric-react:     -               top: 2px;
office-ui-fabric-react:     -               z-index: 1;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus:after {
office-ui-fabric-react:     -               border: none;
office-ui-fabric-react:     -               bottom: -2px;
office-ui-fabric-react:     -               left: -2px;
office-ui-fabric-react:     -               outline-color: ButtonText;
office-ui-fabric-react:     -               right: -2px;
office-ui-fabric-react:     -               top: -2px;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:active > * {
office-ui-fabric-react:     -               left: 0px;
office-ui-fabric-react:     -               position: relative;
office-ui-fabric-react:     -               top: 0px;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:hover {
office-ui-fabric-react:     -               background-color: #f3f2f1;
office-ui-fabric-react:     -               color: #201f1e;
office-ui-fabric-react:     -               cursor: pointer;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             @media screen and (-ms-high-contrast: active){&:hover {
office-ui-fabric-react:     -               border-color: Highlight;
office-ui-fabric-react:     -               color: Highlight;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:hover .ms-Button-icon {
office-ui-fabric-react:     -               color: #0078d4;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:focus {
office-ui-fabric-react:     -               outline: none;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:active {
office-ui-fabric-react:     -               background-color: #edebe9;
office-ui-fabric-react:     -               color: #201f1e;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:active .ms-Button-icon {
office-ui-fabric-react:     -               color: #004578;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:before {
office-ui-fabric-react:     -               background-color: #0078d4;
office-ui-fabric-react:     -               bottom: 0px;
office-ui-fabric-react:     -               content: "";
office-ui-fabric-react:     -               height: 2px;
office-ui-fabric-react:     -               left: 8px;
office-ui-fabric-react:     -               position: absolute;
office-ui-fabric-react:     -               right: 8px;
office-ui-fabric-react:     -               transition: left 0.267s cubic-bezier(.1,.25,.75,.9),
office-ui-fabric-react:     -                                   right 0.267s cubic-bezier(.1,.25,.75,.9);
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:after {
office-ui-fabric-react:     -               color: transparent;
office-ui-fabric-react:     -               content: attr(data-content);
office-ui-fabric-react:     -               display: block;
office-ui-fabric-react:     -               font-weight: 700;
office-ui-fabric-react:     -               height: 1px;
office-ui-fabric-react:     -               overflow: hidden;
office-ui-fabric-react:     -               visibility: hidden;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             .ms-Fabric--isFocusVisible &:focus {
office-ui-fabric-react:     -               outline: 1px solid #605e5c;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             @media screen and (-ms-high-contrast: active){&:before {
office-ui-fabric-react:     -               background-color: Highlight;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:hover::before {
office-ui-fabric-react:     -               left: 0px;
office-ui-fabric-react:     -               right: 0px;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             @media screen and (-ms-high-contrast: active){& {
office-ui-fabric-react:     -               color: Highlight;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -         data-content="Test Link 1"
office-ui-fabric-react:     -         data-is-focusable={true}
office-ui-fabric-react:     -         id="Pivot0-Tab0"
office-ui-fabric-react:     -         name="Test Link 1"
office-ui-fabric-react:     -         onClick={[Function]}
office-ui-fabric-react:     -         onKeyDown={[Function]}
office-ui-fabric-react:     -         onKeyPress={[Function]}
office-ui-fabric-react:     -         onKeyUp={[Function]}
office-ui-fabric-react:     -         onMouseDown={[Function]}
office-ui-fabric-react:     -         onMouseUp={[Function]}
office-ui-fabric-react:     -         role="tab"
office-ui-fabric-react:     -         type="button"
office-ui-fabric-react:     +         }
office-ui-fabric-react:             >
office-ui-fabric-react:     -         <span
office-ui-fabric-react:     +         <div
office-ui-fabric-react:     +           aria-orientation="horizontal"
office-ui-fabric-react:                 className=
office-ui-fabric-react:     -               ms-Button-flexContainer
office-ui-fabric-react:     +               ms-FocusZone
office-ui-fabric-react:     +               ms-OverflowSet
office-ui-fabric-react:     +               ms-Pivot
office-ui-fabric-react:     +               &:focus {
office-ui-fabric-react:     +                 outline: none;
office-ui-fabric-react:     +               }
office-ui-fabric-react:                     {
office-ui-fabric-react:     -                 align-items: center;
office-ui-fabric-react:     +                 -moz-osx-font-smoothing: grayscale;
office-ui-fabric-react:     +                 -webkit-font-smoothing: antialiased;
office-ui-fabric-react:     +                 box-shadow: none;
office-ui-fabric-react:     +                 box-sizing: border-box;
office-ui-fabric-react:     +                 color: #0078d4;
office-ui-fabric-react:                       display: flex;
office-ui-fabric-react:                       flex-wrap: nowrap;
office-ui-fabric-react:     -                 height: 100%;
office-ui-fabric-react:     -                 justify-content: flex-start;
office-ui-fabric-react:     +                 font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
office-ui-fabric-react:     +                 font-size: 14px;
office-ui-fabric-react:     +                 font-weight: 400;
office-ui-fabric-react:     +                 margin-bottom: 0px;
office-ui-fabric-react:     +                 margin-left: 0px;
office-ui-fabric-react:     +                 margin-right: 0px;
office-ui-fabric-react:     +                 margin-top: 0px;
office-ui-fabric-react:     +                 padding-bottom: 0px;
office-ui-fabric-react:     +                 padding-left: 0px;
office-ui-fabric-react:     +                 padding-right: 0px;
office-ui-fabric-react:     +                 padding-top: 0px;
office-ui-fabric-react:     +                 position: relative;
office-ui-fabric-react:     +                 white-space: nowrap;
office-ui-fabric-react:                     }
office-ui-fabric-react:     -           data-automationid="splitbuttonprimary"
office-ui-fabric-react:     +           data-focuszone-id="FocusZone1"
office-ui-fabric-react:     +           onFocus={[Function]}
office-ui-fabric-react:     +           onKeyDown={[Function]}
office-ui-fabric-react:     +           onMouseDownCapture={[Function]}
office-ui-fabric-react:     +           role="presentation"
office-ui-fabric-react:               >
office-ui-fabric-react:     -           <span
office-ui-fabric-react:     +           <div
office-ui-fabric-react:                   className=
office-ui-fabric-react:     -                 ms-Pivot-linkContent
office-ui-fabric-react:     +                 ms-OverflowSet-item
office-ui-fabric-react:                       {
office-ui-fabric-react:     -                   flex: 0 1 100%;
office-ui-fabric-react:     -                 }
office-ui-fabric-react:     -                 & > *  {
office-ui-fabric-react:     -                   margin-left: 4px;
office-ui-fabric-react:     -                 }
office-ui-fabric-react:     -                 & > *:first-child {
office-ui-fabric-react:     -                   margin-left: 0px;
office-ui-fabric-react:     +                   display: inherit;
office-ui-fabric-react:     +                   flex-shrink: 0;
office-ui-fabric-react:                       }
office-ui-fabric-react:                 >
office-ui-fabric-react:     -             <span
office-ui-fabric-react:     +             <button
office-ui-fabric-react:     +               aria-selected={true}
office-ui-fabric-react:                     className=
office-ui-fabric-react:     -                   ms-Pivot-text
office-ui-fabric-react:     +                   ms-Button
office-ui-fabric-react:     +                   ms-Button--action
office-ui-fabric-react:     +                   ms-Button--command
office-ui-fabric-react:     +                   ms-Pivot-link
office-ui-fabric-react:     +                   is-selected
office-ui-fabric-react:                         {
office-ui-fabric-react:     +                     -moz-osx-font-smoothing: grayscale;
office-ui-fabric-react:     +                     -webkit-font-smoothing: antialiased;
office-ui-fabric-react:     +                     background-color: transparent;
office-ui-fabric-react:     +                     border-radius: 0px;
office-ui-fabric-react:     +                     border: 0px;
office-ui-fabric-react:     +                     box-sizing: border-box;
office-ui-fabric-react:     +                     color: #323130;
office-ui-fabric-react:     +                     cursor: pointer;
office-ui-fabric-react:                           display: inline-block;
office-ui-fabric-react:     +                     font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
office-ui-fabric-react:     +                     font-size: 14px;
office-ui-fabric-react:     +                     font-weight: 600;
office-ui-fabric-react:     +                     height: 44px;
office-ui-fabric-react:     +                     line-height: 44px;
office-ui-fabric-react:     +                     margin-right: 8px;
office-ui-fabric-react:     +                     outline: transparent;
office-ui-fabric-react:     +                     padding-bottom: 0;
office-ui-fabric-react:     +                     padding-left: 8px;
office-ui-fabric-react:     +                     padding-right: 8px;
office-ui-fabric-react:     +                     padding-top: 0;
office-ui-fabric-react:     +                     position: relative;
office-ui-fabric-react:     +                     text-align: center;
office-ui-fabric-react:     +                     text-decoration: none;
office-ui-fabric-react:     +                     user-select: none;
office-ui-fabric-react:                           vertical-align: top;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &::-moz-focus-inner {
office-ui-fabric-react:     +                     border: 0;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   .ms-Fabric--isFocusVisible &:focus:after {
office-ui-fabric-react:     +                     border: 0px;
office-ui-fabric-react:     +                     bottom: 2px;
office-ui-fabric-react:     +                     content: attr(data-content);
office-ui-fabric-react:     +                     left: 2px;
office-ui-fabric-react:     +                     outline: 1px solid #605e5c;
office-ui-fabric-react:     +                     position: relative;
office-ui-fabric-react:     +                     right: 2px;
office-ui-fabric-react:     +                     top: 2px;
office-ui-fabric-react:     +                     z-index: 1;
office-ui-fabric-react:                         }
office-ui-fabric-react:     +                   @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus:after {
office-ui-fabric-react:     +                     border: none;
office-ui-fabric-react:     +                     bottom: -2px;
office-ui-fabric-react:     +                     left: -2px;
office-ui-fabric-react:     +                     outline-color: ButtonText;
office-ui-fabric-react:     +                     right: -2px;
office-ui-fabric-react:     +                     top: -2px;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:active > * {
office-ui-fabric-react:     +                     left: 0px;
office-ui-fabric-react:     +                     position: relative;
office-ui-fabric-react:     +                     top: 0px;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:hover {
office-ui-fabric-react:     +                     background-color: #f3f2f1;
office-ui-fabric-react:     +                     color: #201f1e;
office-ui-fabric-react:     +                     cursor: pointer;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   @media screen and (-ms-high-contrast: active){&:hover {
office-ui-fabric-react:     +                     border-color: Highlight;
office-ui-fabric-react:     +                     color: Highlight;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:hover .ms-Button-icon {
office-ui-fabric-react:     +                     color: #0078d4;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:focus {
office-ui-fabric-react:     +                     outline: none;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:active {
office-ui-fabric-react:     +                     background-color: #edebe9;
office-ui-fabric-react:     +                     color: #201f1e;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:active .ms-Button-icon {
office-ui-fabric-react:     +                     color: #004578;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:before {
office-ui-fabric-react:     +                     background-color: #0078d4;
office-ui-fabric-react:     +                     bottom: 0px;
office-ui-fabric-react:     +                     content: "";
office-ui-fabric-react:     +                     height: 2px;
office-ui-fabric-react:     +                     left: 8px;
office-ui-fabric-react:     +                     position: absolute;
office-ui-fabric-react:     +                     right: 8px;
office-ui-fabric-react:     +                     transition: left 0.267s cubic-bezier(.1,.25,.75,.9),
office-ui-fabric-react:     +                                         right 0.267s cubic-bezier(.1,.25,.75,.9);
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:after {
office-ui-fabric-react:     +                     color: transparent;
office-ui-fabric-react:     +                     content: attr(data-content);
office-ui-fabric-react:     +                     display: block;
office-ui-fabric-react:     +                     font-weight: 700;
office-ui-fabric-react:     +                     height: 1px;
office-ui-fabric-react:     +                     overflow: hidden;
office-ui-fabric-react:     +                     visibility: hidden;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   .ms-Fabric--isFocusVisible &:focus {
office-ui-fabric-react:     +                     outline: 1px solid #605e5c;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   @media screen and (-ms-high-contrast: active){&:before {
office-ui-fabric-react:     +                     background-color: Highlight;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:hover::before {
office-ui-fabric-react:     +                     left: 0px;
office-ui-fabric-react:     +                     right: 0px;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   @media screen and (-ms-high-contrast: active){& {
office-ui-fabric-react:     +                     color: Highlight;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +               data-content="Test Link 1"
office-ui-fabric-react:     +               data-is-focusable={true}
office-ui-fabric-react:     +               id="Pivot0-Tab0"
office-ui-fabric-react:     +               name="Test Link 1"
office-ui-fabric-react:     +               onClick={[Function]}
office-ui-fabric-react:     +               onKeyDown={[Function]}
office-ui-fabric-react:     +               onKeyPress={[Function]}
office-ui-fabric-react:     +               onKeyUp={[Function]}
office-ui-fabric-react:     +               onMouseDown={[Function]}
office-ui-fabric-react:     +               onMouseUp={[Function]}
office-ui-fabric-react:     +               role="tab"
office-ui-fabric-react:     +               type="button"
office-ui-fabric-react:                   >
office-ui-fabric-react:     -                
office-ui-fabric-react:     -               Test Link 1
office-ui-fabric-react:     -             </span>
office-ui-fabric-react:     -           </span>
office-ui-fabric-react:     -         </span>
office-ui-fabric-react:     -       </button>
office-ui-fabric-react:     -       <button
office-ui-fabric-react:     -         aria-selected={false}
office-ui-fabric-react:     -         className=
office-ui-fabric-react:     -             ms-Button
office-ui-fabric-react:     -             ms-Button--action
office-ui-fabric-react:     -             ms-Button--command
office-ui-fabric-react:     -             ms-Pivot-link
office-ui-fabric-react:     -             {
office-ui-fabric-react:     -               -moz-osx-font-smoothing: grayscale;
office-ui-fabric-react:     -               -webkit-font-smoothing: antialiased;
office-ui-fabric-react:     -               background-color: transparent;
office-ui-fabric-react:     -               border-radius: 0px;
office-ui-fabric-react:     -               border: 0px;
office-ui-fabric-react:     -               box-sizing: border-box;
office-ui-fabric-react:     -               color: #323130;
office-ui-fabric-react:     -               cursor: pointer;
office-ui-fabric-react:     -               display: inline-block;
office-ui-fabric-react:     -               font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
office-ui-fabric-react:     -               font-size: 14px;
office-ui-fabric-react:     -               font-weight: 400;
office-ui-fabric-react:     -               height: 44px;
office-ui-fabric-react:     -               line-height: 44px;
office-ui-fabric-react:     -               margin-right: 8px;
office-ui-fabric-react:     -               outline: transparent;
office-ui-fabric-react:     -               padding-bottom: 0;
office-ui-fabric-react:     -               padding-left: 8px;
office-ui-fabric-react:     -               padding-right: 8px;
office-ui-fabric-react:     -               padding-top: 0;
office-ui-fabric-react:     -               position: relative;
office-ui-fabric-react:     -               text-align: center;
office-ui-fabric-react:     -               text-decoration: none;
office-ui-fabric-react:     -               user-select: none;
office-ui-fabric-react:     -               vertical-align: top;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &::-moz-focus-inner {
office-ui-fabric-react:     -               border: 0;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             .ms-Fabric--isFocusVisible &:focus:after {
office-ui-fabric-react:     -               border: 0px;
office-ui-fabric-react:     -               bottom: 2px;
office-ui-fabric-react:     -               content: attr(data-content);
office-ui-fabric-react:     -               left: 2px;
office-ui-fabric-react:     -               outline: 1px solid #605e5c;
office-ui-fabric-react:     -               position: relative;
office-ui-fabric-react:     -               right: 2px;
office-ui-fabric-react:     -               top: 2px;
office-ui-fabric-react:     -               z-index: 1;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus:after {
office-ui-fabric-react:     -               border: none;
office-ui-fabric-react:     -               bottom: -2px;
office-ui-fabric-react:     -               left: -2px;
office-ui-fabric-react:     -               outline-color: ButtonText;
office-ui-fabric-react:     -               right: -2px;
office-ui-fabric-react:     -               top: -2px;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:active > * {
office-ui-fabric-react:     -               left: 0px;
office-ui-fabric-react:     -               position: relative;
office-ui-fabric-react:     -               top: 0px;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:hover {
office-ui-fabric-react:     -               background-color: #f3f2f1;
office-ui-fabric-react:     -               color: #201f1e;
office-ui-fabric-react:     -               cursor: pointer;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             @media screen and (-ms-high-contrast: active){&:hover {
office-ui-fabric-react:     -               border-color: Highlight;
office-ui-fabric-react:     -               color: Highlight;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:hover .ms-Button-icon {
office-ui-fabric-react:     -               color: #0078d4;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:focus {
office-ui-fabric-react:     -               outline: none;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:active {
office-ui-fabric-react:     -               background-color: #edebe9;
office-ui-fabric-react:     -               color: #201f1e;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:active .ms-Button-icon {
office-ui-fabric-react:     -               color: #004578;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:before {
office-ui-fabric-react:     -               background-color: transparent;
office-ui-fabric-react:     -               bottom: 0px;
office-ui-fabric-react:     -               content: "";
office-ui-fabric-react:     -               height: 2px;
office-ui-fabric-react:     -               left: 8px;
office-ui-fabric-react:     -               position: absolute;
office-ui-fabric-react:     -               right: 8px;
office-ui-fabric-react:     -               transition: left 0.267s cubic-bezier(.1,.25,.75,.9),
office-ui-fabric-react:     -                                   right 0.267s cubic-bezier(.1,.25,.75,.9);
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             &:after {
office-ui-fabric-react:     -               color: transparent;
office-ui-fabric-react:     -               content: attr(data-content);
office-ui-fabric-react:     -               display: block;
office-ui-fabric-react:     -               font-weight: 700;
office-ui-fabric-react:     -               height: 1px;
office-ui-fabric-react:     -               overflow: hidden;
office-ui-fabric-react:     -               visibility: hidden;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -             .ms-Fabric--isFocusVisible &:focus {
office-ui-fabric-react:     -               outline: 1px solid #605e5c;
office-ui-fabric-react:     -             }
office-ui-fabric-react:     -         data-content=""
office-ui-fabric-react:     -         data-is-focusable={true}
office-ui-fabric-react:     -         id="Pivot0-Tab1"
office-ui-fabric-react:     -         name=""
office-ui-fabric-react:     -         onClick={[Function]}
office-ui-fabric-react:     -         onKeyDown={[Function]}
office-ui-fabric-react:     -         onKeyPress={[Function]}
office-ui-fabric-react:     -         onKeyUp={[Function]}
office-ui-fabric-react:     -         onMouseDown={[Function]}
office-ui-fabric-react:     -         onMouseUp={[Function]}
office-ui-fabric-react:     -         role="tab"
office-ui-fabric-react:     -         type="button"
office-ui-fabric-react:     -       >
office-ui-fabric-react:     -         <span
office-ui-fabric-react:     -           className=
office-ui-fabric-react:     -               ms-Button-flexContainer
office-ui-fabric-react:     -               {
office-ui-fabric-react:     -                 align-items: center;
office-ui-fabric-react:     -                 display: flex;
office-ui-fabric-react:     -                 flex-wrap: nowrap;
office-ui-fabric-react:     -                 height: 100%;
office-ui-fabric-react:     -                 justify-content: flex-start;
office-ui-fabric-react:     -               }
office-ui-fabric-react:     -           data-automationid="splitbuttonprimary"
office-ui-fabric-react:     -         >
office-ui-fabric-react:     -           <span
office-ui-fabric-react:     +               <span
office-ui-fabric-react:     +                 className=
office-ui-fabric-react:     +                     ms-Button-flexContainer
office-ui-fabric-react:     +                     {
office-ui-fabric-react:     +                       align-items: center;
office-ui-fabric-react:     +                       display: flex;
office-ui-fabric-react:     +                       flex-wrap: nowrap;
office-ui-fabric-react:     +                       height: 100%;
office-ui-fabric-react:     +                       justify-content: flex-start;
office-ui-fabric-react:     +                     }
office-ui-fabric-react:     +                 data-automationid="splitbuttonprimary"
office-ui-fabric-react:     +               >
office-ui-fabric-react:     +                 <span
office-ui-fabric-react:     +                   className=
office-ui-fabric-react:     +                       ms-Pivot-linkContent
office-ui-fabric-react:     +                       {
office-ui-fabric-react:     +                         flex: 0 1 100%;
office-ui-fabric-react:     +                       }
office-ui-fabric-react:     +                       & > *  {
office-ui-fabric-react:     +                         margin-left: 4px;
office-ui-fabric-react:     +                       }
office-ui-fabric-react:     +                       & > *:first-child {
office-ui-fabric-react:     +                         margin-left: 0px;
office-ui-fabric-react:     +                       }
office-ui-fabric-react:     +                 >
office-ui-fabric-react:     +                   <span
office-ui-fabric-react:     +                     className=
office-ui-fabric-react:     +                         ms-Pivot-text
office-ui-fabric-react:     +                         {
office-ui-fabric-react:     +                           display: inline-block;
office-ui-fabric-react:     +                           vertical-align: top;
office-ui-fabric-react:     +                         }
office-ui-fabric-react:     +                   >
office-ui-fabric-react:     +                      
office-ui-fabric-react:     +                     Test Link 1
office-ui-fabric-react:     +                   </span>
office-ui-fabric-react:     +                 </span>
office-ui-fabric-react:     +               </span>
office-ui-fabric-react:     +             </button>
office-ui-fabric-react:     +           </div>
office-ui-fabric-react:     +           <div
office-ui-fabric-react:                   className=
office-ui-fabric-react:     -                 ms-Pivot-linkContent
office-ui-fabric-react:     +                 ms-OverflowSet-item
office-ui-fabric-react:                       {
office-ui-fabric-react:     -                   flex: 0 1 100%;
office-ui-fabric-react:     +                   display: inherit;
office-ui-fabric-react:     +                   flex-shrink: 0;
office-ui-fabric-react:                       }
office-ui-fabric-react:     -                 & > *  {
office-ui-fabric-react:     -                   margin-left: 4px;
office-ui-fabric-react:     -                 }
office-ui-fabric-react:     -                 & > *:first-child {
office-ui-fabric-react:     -                   margin-left: 0px;
office-ui-fabric-react:     -                 }
office-ui-fabric-react:                 >
office-ui-fabric-react:     -             <span
office-ui-fabric-react:     +             <button
office-ui-fabric-react:     +               aria-selected={false}
office-ui-fabric-react:                     className=
office-ui-fabric-react:     -                   ms-Pivot-text
office-ui-fabric-react:     +                   ms-Button
office-ui-fabric-react:     +                   ms-Button--action
office-ui-fabric-react:     +                   ms-Button--command
office-ui-fabric-react:     +                   ms-Pivot-link
office-ui-fabric-react:                         {
office-ui-fabric-react:     +                     -moz-osx-font-smoothing: grayscale;
office-ui-fabric-react:     +                     -webkit-font-smoothing: antialiased;
office-ui-fabric-react:     +                     background-color: transparent;
office-ui-fabric-react:     +                     border-radius: 0px;
office-ui-fabric-react:     +                     border: 0px;
office-ui-fabric-react:     +                     box-sizing: border-box;
office-ui-fabric-react:     +                     color: #323130;
office-ui-fabric-react:     +                     cursor: pointer;
office-ui-fabric-react:                           display: inline-block;
office-ui-fabric-react:     +                     font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
office-ui-fabric-react:     +                     font-size: 14px;
office-ui-fabric-react:     +                     font-weight: 400;
office-ui-fabric-react:     +                     height: 44px;
office-ui-fabric-react:     +                     line-height: 44px;
office-ui-fabric-react:     +                     margin-right: 8px;
office-ui-fabric-react:     +                     outline: transparent;
office-ui-fabric-react:     +                     padding-bottom: 0;
office-ui-fabric-react:     +                     padding-left: 8px;
office-ui-fabric-react:     +                     padding-right: 8px;
office-ui-fabric-react:     +                     padding-top: 0;
office-ui-fabric-react:     +                     position: relative;
office-ui-fabric-react:     +                     text-align: center;
office-ui-fabric-react:     +                     text-decoration: none;
office-ui-fabric-react:     +                     user-select: none;
office-ui-fabric-react:                           vertical-align: top;
office-ui-fabric-react:                         }
office-ui-fabric-react:     +                   &::-moz-focus-inner {
office-ui-fabric-react:     +                     border: 0;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   .ms-Fabric--isFocusVisible &:focus:after {
office-ui-fabric-react:     +                     border: 0px;
office-ui-fabric-react:     +                     bottom: 2px;
office-ui-fabric-react:     +                     content: attr(data-content);
office-ui-fabric-react:     +                     left: 2px;
office-ui-fabric-react:     +                     outline: 1px solid #605e5c;
office-ui-fabric-react:     +                     position: relative;
office-ui-fabric-react:     +                     right: 2px;
office-ui-fabric-react:     +                     top: 2px;
office-ui-fabric-react:     +                     z-index: 1;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   @media screen and (-ms-high-contrast: active){.ms-Fabric--isFocusVisible &:focus:after {
office-ui-fabric-react:     +                     border: none;
office-ui-fabric-react:     +                     bottom: -2px;
office-ui-fabric-react:     +                     left: -2px;
office-ui-fabric-react:     +                     outline-color: ButtonText;
office-ui-fabric-react:     +                     right: -2px;
office-ui-fabric-react:     +                     top: -2px;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:active > * {
office-ui-fabric-react:     +                     left: 0px;
office-ui-fabric-react:     +                     position: relative;
office-ui-fabric-react:     +                     top: 0px;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:hover {
office-ui-fabric-react:     +                     background-color: #f3f2f1;
office-ui-fabric-react:     +                     color: #201f1e;
office-ui-fabric-react:     +                     cursor: pointer;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   @media screen and (-ms-high-contrast: active){&:hover {
office-ui-fabric-react:     +                     border-color: Highlight;
office-ui-fabric-react:     +                     color: Highlight;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:hover .ms-Button-icon {
office-ui-fabric-react:     +                     color: #0078d4;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:focus {
office-ui-fabric-react:     +                     outline: none;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:active {
office-ui-fabric-react:     +                     background-color: #edebe9;
office-ui-fabric-react:     +                     color: #201f1e;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:active .ms-Button-icon {
office-ui-fabric-react:     +                     color: #004578;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:before {
office-ui-fabric-react:     +                     background-color: transparent;
office-ui-fabric-react:     +                     bottom: 0px;
office-ui-fabric-react:     +                     content: "";
office-ui-fabric-react:     +                     height: 2px;
office-ui-fabric-react:     +                     left: 8px;
office-ui-fabric-react:     +                     position: absolute;
office-ui-fabric-react:     +                     right: 8px;
office-ui-fabric-react:     +                     transition: left 0.267s cubic-bezier(.1,.25,.75,.9),
office-ui-fabric-react:     +                                         right 0.267s cubic-bezier(.1,.25,.75,.9);
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   &:after {
office-ui-fabric-react:     +                     color: transparent;
office-ui-fabric-react:     +                     content: attr(data-content);
office-ui-fabric-react:     +                     display: block;
office-ui-fabric-react:     +                     font-weight: 700;
office-ui-fabric-react:     +                     height: 1px;
office-ui-fabric-react:     +                     overflow: hidden;
office-ui-fabric-react:     +                     visibility: hidden;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +                   .ms-Fabric--isFocusVisible &:focus {
office-ui-fabric-react:     +                     outline: 1px solid #605e5c;
office-ui-fabric-react:     +                   }
office-ui-fabric-react:     +               data-content=""
office-ui-fabric-react:     +               data-is-focusable={true}
office-ui-fabric-react:     +               id="Pivot0-Tab1"
office-ui-fabric-react:     +               name=""
office-ui-fabric-react:     +               onClick={[Function]}
office-ui-fabric-react:     +               onKeyDown={[Function]}
office-ui-fabric-react:     +               onKeyPress={[Function]}
office-ui-fabric-react:     +               onKeyUp={[Function]}
office-ui-fabric-react:     +               onMouseDown={[Function]}
office-ui-fabric-react:     +               onMouseUp={[Function]}
office-ui-fabric-react:     +               role="tab"
office-ui-fabric-react:     +               type="button"
office-ui-fabric-react:                   >
office-ui-fabric-react:     -                
office-ui-fabric-react:     -               
office-ui-fabric-react:     -             </span>
office-ui-fabric-react:     -           </span>
office-ui-fabric-react:     -         </span>
office-ui-fabric-react:     -       </button>
office-ui-fabric-react:     +               <span
office-ui-fabric-react:     +                 className=
office-ui-fabric-react:     +                     ms-Button-flexContainer
office-ui-fabric-react:     +                     {
office-ui-fabric-react:     +                       align-items: center;
office-ui-fabric-react:     +                       display: flex;
office-ui-fabric-react:     +                       flex-wrap: nowrap;
office-ui-fabric-react:     +                       height: 100%;
office-ui-fabric-react:     +                       justify-content: flex-start;
office-ui-fabric-react:     +                     }
office-ui-fabric-react:     +                 data-automationid="splitbuttonprimary"
office-ui-fabric-react:     +               >
office-ui-fabric-react:     +                 <span
office-ui-fabric-react:     +                   className=
office-ui-fabric-react:     +                       ms-Pivot-linkContent
office-ui-fabric-react:     +                       {
office-ui-fabric-react:     +                         flex: 0 1 100%;
office-ui-fabric-react:     +                       }
office-ui-fabric-react:     +                       & > *  {
office-ui-fabric-react:     +                         margin-left: 4px;
office-ui-fabric-react:     +                       }
office-ui-fabric-react:     +                       & > *:first-child {
office-ui-fabric-react:     +                         margin-left: 0px;
office-ui-fabric-react:     +                       }
office-ui-fabric-react:     +                 >
office-ui-fabric-react:     +                   <span
office-ui-fabric-react:     +                     className=
office-ui-fabric-react:     +                         ms-Pivot-text
office-ui-fabric-react:     +                         {
office-ui-fabric-react:     +                           display: inline-block;
office-ui-fabric-react:     +                           vertical-align: top;
office-ui-fabric-react:     +                         }
office-ui-fabric-react:     +                   >
office-ui-fabric-react:     +                      
office-ui-fabric-react:     +                     
office-ui-fabric-react:     +                   </span>
office-ui-fabric-react:     +                 </span>
office-ui-fabric-react:     +               </span>
office-ui-fabric-react:     +             </button>
office-ui-fabric-react:     +           </div>
office-ui-fabric-react:     +         </div>
office-ui-fabric-react:     +       </div>
office-ui-fabric-react:           </div>
office-ui-fabric-react:         </div>
office-ui-fabric-react:         <div
office-ui-fabric-react:           aria-labelledby="Pivot0-Tab0"
office-ui-fabric-react:           role="tabpanel"
office-ui-fabric-react: 
office-ui-fabric-react:       30 |     );
office-ui-fabric-react:       31 |     const tree = component.toJSON();
office-ui-fabric-react:     > 32 |     expect(tree).toMatchSnapshot();
office-ui-fabric-react:          |                  ^
office-ui-fabric-react:       33 |   });
office-ui-fabric-react:       34 | });
office-ui-fabric-react:       35 | 
office-ui-fabric-react: 
office-ui-fabric-react:       at Object.<anonymous> (src/components/Pivot/Pivot.deprecated.test.tsx:32:18)
office-ui-fabric-react:  › 1 snapshot failed.

Good news, it appears that I might be able to help with automatically recovering from this error}.

✔️ Recovery has been initiated by @micahgodbolt at 2019-11-22T22:47:24Z (oufr - update snapshots)*.

1 Please note, automated recovery may not always be the right action to take. Please evaluate the error carefully first.
2 Automated recovery is only available until the next time a push happens, and for up to 7 days from now.

@msft-github-bot
Copy link
Contributor

Dear humans, I have kicked off a recovery build at @micahgodbolt's instruction. You can monitor progress here.

@micahgodbolt
Copy link
Member

@msnyder-msft its not really REQUIRED for a review, but we currently fail builds that don't have one, and its great to see the finished build in our PR deploy site.

@msnyder-msft
Copy link
Contributor Author

msnyder-msft commented Nov 22, 2019

@msnyder-msft its not really REQUIRED for a review, but we currently fail builds that don't have one, and its great to see the finished build in our PR deploy site.

@micahgodbolt That's really neat! I didn't realize it would do that. Will it still deploy if snapshots are failing? Because I haven't updated the tests yet.

@micahgodbolt
Copy link
Member

Looks like it didn't resolve all of the snap issues. cd into packages/office-ui-fabric-react and run yarn update-snapshots.

@msnyder-msft
Copy link
Contributor Author

msnyder-msft commented Nov 25, 2019

Looks like it didn't resolve all of the snap issues. cd into packages/office-ui-fabric-react and run yarn update-snapshots.

@micahgodbolt Thanks! I pushed the snapshots now.

@micahgodbolt
Copy link
Member

@msnyder-msft can you push those updated snaps so we can get a PR preview?

@micahgodbolt
Copy link
Member

oh, snaps seem done. there are some linting issues popping up about your imports

image

@msnyder-msft
Copy link
Contributor Author

msnyder-msft commented Dec 3, 2019

@micahgodbolt I've pushed the fixes for those 2 files. We'll see if it's happier now. The output from that lint command (lerna run build --stream -- --lint) is so noisy that it's really hard to see where the actual issues are at so thanks for highlighting the important stuff.
It also keeps complaining about having to force stop jest. Is that normal?

@micahgodbolt
Copy link
Member

I saw issues about physical file imports. Don't include the file extension in your imports.

@size-auditor
Copy link

size-auditor bot commented Dec 3, 2019

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react Pivot 172.273 kB 187.608 kB ExceedsTolerance     15.335 kB
office-ui-fabric-react ContextualMenu 146.864 kB 146.934 kB ExceedsBaseline     70 bytes
office-ui-fabric-react FloatingPicker 223.63 kB 223.7 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Dialog 192.689 kB 192.759 kB ExceedsBaseline     70 bytes
office-ui-fabric-react DocumentCard 199.727 kB 199.797 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Dropdown 214.594 kB 214.664 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Panel 184.031 kB 184.101 kB ExceedsBaseline     70 bytes
office-ui-fabric-react CommandBar 186.158 kB 186.228 kB ExceedsBaseline     70 bytes
office-ui-fabric-react ComboBox 227.579 kB 227.649 kB ExceedsBaseline     70 bytes
office-ui-fabric-react SearchBox 173.099 kB 173.169 kB ExceedsBaseline     70 bytes
office-ui-fabric-react SelectedItemsList 213.695 kB 213.765 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Nav 173.736 kB 173.806 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Facepile 195.883 kB 195.953 kB ExceedsBaseline     70 bytes
office-ui-fabric-react MessageBar 175.117 kB 175.187 kB ExceedsBaseline     70 bytes
office-ui-fabric-react SpinButton 178.655 kB 178.725 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Button 179.271 kB 179.341 kB ExceedsBaseline     70 bytes
office-ui-fabric-react SwatchColorPicker 177.085 kB 177.155 kB ExceedsBaseline     70 bytes
office-ui-fabric-react TeachingBubble 189.867 kB 189.937 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Breadcrumb 184.427 kB 184.497 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Grid 166.965 kB 167.035 kB ExceedsBaseline     70 bytes
office-ui-fabric-react Pickers 265.305 kB 265.375 kB ExceedsBaseline     70 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 347134e1debf871386dc689e3f675522835bfec5 (build)

@msnyder-msft
Copy link
Contributor Author

I saw issues about physical file imports. Don't include the file extension in your imports.

@micahgodbolt I just pushed an update to fix the errors about the API. I think everything should be happy now except for jest which is complaining about force stopping.
image

@msft-github-bot
Copy link
Contributor

Component Perf Analysis

No significant results to display.

All results

Scenario Master Ticks PR Ticks Status
BaseButton 852 841
BaseButton (experiments) 1146 1162
DefaultButton 1153 1150
DefaultButton (experiments) 2222 2239
DetailsRow 3640 3625
DetailsRow (fast icons) 3685 3536
DetailsRow without styles 3290 3297
DocumentCardTitle with truncation 36442 36079
MenuButton 1481 1439
MenuButton (experiments) 3935 3934
PrimaryButton 1325 1327
PrimaryButton (experiments) 2333 2319
SplitButton 3168 3173
SplitButton (experiments) 7928 7872
Stack 533 578
Stack with Intrinsic children 1253 1288
Stack with Text children 4833 4756
Text 448 427
Toggle 918 947
Toggle (experiments) 2560 2653
button 66 49

@micahgodbolt
Copy link
Member

Looks like we've got a passing build :D

We are getting visual test errors, and I can tell you why.

image

Now that we're using resizeGroup to fit the pivot into the given space......this means that if the parent is not a block level element, it'll keep shrinking to fit the contents.....and the contents will keep shrinking to fit the parent.

So you get a fully collapsed pivot.

This will be a concern going forward, as this change could be considered breaking as pivots no longer automatically take up all the space expected.

@msnyder-msft
Copy link
Contributor Author

@micahgodbolt I see you started the review thread over email. I had seen those failing tests but before investing too much in fixing them I wanted to be sure the major design pattern was acceptable to folks. Once folks are happy with that, I'll get those discrepancies resolved.

@micahgodbolt
Copy link
Member

@msnyder-msft trying to remember if you were on this thread about our thoughts here, but to sum up:

Making this change is probably going to be too disruptive for anyone expecting pivots to take up 100% of the space that it can.

What we'd like to recommend is to update the pivots to allow for an onRender function to replace the existing pivots with custom pivots that you could customize in the way that you did. We can even include an example of how you can do it (depending on complexity).

So basically, take the work you did into an onRenderPivotItems (or something similar), and update the pivot to support that custom render.

Happy to give you a hand with how this would work. I know it has come up a few times.

@msnyder-msft
Copy link
Contributor Author

@micahgodbolt thanks for the summary here. I was waiting for an outcome on that thread before moving forward. I understand the general idea but not sure I am completely clear where this logic would live now.
The first part of your solution (expose onRender) sounds like you are expecting the consumer to do all the work I've created here. But then the second part sounds like we have this logic defined in the pivot component and they can somehow access that function onRenderPivotItems and pass that into onRender'?
Maybe it would be easiest to have a quick call to discuss unless there's a simpler way to explain here.

@micahgodbolt
Copy link
Member

micahgodbolt commented Dec 11, 2019

@msnyder-msft it'd look something like this

<Pivot
  onRenderPivotLinks={(linkCollection, selectedKey) => {
    return <ResizeablePivotLinks linkCollections={linkCollection} selectedKey={selectedKey} />;
  }}
  linkFormat={PivotLinkFormat.tabs}
>
  <PivotItem headerText="Foo">
    <Label>Pivot #1</Label>
  </PivotItem>
  <PivotItem headerText="Bar">
    <Label>Pivot #2</Label>
  </PivotItem>
  <PivotItem headerText="Bas">
    <Label>Pivot #3</Label>
  </PivotItem>
  <PivotItem headerText="Biz">
    <Label>Pivot #4</Label>
  </PivotItem>
</Pivot> 

@micahgodbolt
Copy link
Member

Also, you don't necessarily need to write the control in Fabric. We just need the Pivot set up to be flexible enough to support that custom render function

@msnyder-msft
Copy link
Contributor Author

@micahgodbolt ok that makes sense. So you're saying to make limited changes in Fabric and that ResizeablePivotLinks component is something I write in my own repo?

@micahgodbolt
Copy link
Member

Bingo :)

How can we modify the current pivot without breaking existing API to support rendering a customized set of links. Then you can hack on that in your own repo, and if you come up with a really solid, stable solution we can look at adding that to the OUFR repo

@micahgodbolt
Copy link
Member

@msnyder-msft is take a new approach that will make the change less disruptive. I'm going to close this PR down until he's ready for a new review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pivot: Support overflowing pivots
6 participants