Skip to content

Conversation

@pchandoria
Copy link
Contributor

@pchandoria pchandoria commented May 11, 2018

Pull request checklist

Description of changes

In an effort to reduce bundle size on critical path rendering, we are trying to defer what is not required upfront. One such control from Fabric for us is ContextualMenu, which is required for edit scenario mostly. However What we learned is we cannot chunk this from core because we need BaseButton and It has hard dependency on IContextualMenuProps. Which is fine.
Unfortunately IContextualMenuProps have hard dependency on ContextualMenu which is not fine.
export interface IContextualMenuProps extends React.Props, IWithResponsiveModeState {

Focus areas to test

This is not supposed to change any runtime behavior as change is in typing only

@pchandoria pchandoria requested a review from joschect as a code owner May 11, 2018 01:02
@msftclas
Copy link

msftclas commented May 11, 2018

CLA assistant check
All CLA requirements met.

@pchandoria pchandoria changed the title Pchandoria/contextual menu fix Issue#4832: Break BaseButton Types hard dependency from class ContextualMenu May 11, 2018
Copy link
Collaborator

@antonlabunets antonlabunets left a comment

Choose a reason for hiding this comment

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

Let's figure out whether this really can qualify for a patch

{
"packageName": "office-ui-fabric-react",
"comment": "Breaking BaseButton Types dependency from ContextualMenu class",
"type": "patch"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not certain this is a patch. What if people used to depend on props from ContextualMenu? @dzearing / @aditima - what's your take. When I chatted with @pgonzal we believe this a breaking change that we may need to hold off till 6?

Copy link
Contributor

Choose a reason for hiding this comment

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

They can still use them because it's any. This won't be breaking.

Copy link
Collaborator

Choose a reason for hiding this comment

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

On second though any covers everything and the ContextMenu was itself pointing back to IContextualMenuProps

@antonlabunets antonlabunets merged commit 8e91d0c into microsoft:master May 11, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request May 13, 2018
…i-fabric-react into parallel-tsc

* 'parallel-tsc' of https://github.com/Markionium/office-ui-fabric-react:
  Variants: have project use OUFR instead of just styling (microsoft#4854)
  Add more customization hooks to ProgressIndicator (microsoft#4566)
  Issue#4832: Break BaseButton Types hard dependency from class ContextualMenu (microsoft#4845)
  Applying package updates.
  Revert react portals change (microsoft#4840)
  Update ImageOverview.md
  Fixes duplicate reading of suggestions on people picker (microsoft#4765)
  Persona: Deprecate primaryText (microsoft#4811)
  Experiments: Fix Fluent theme color names (microsoft#4834)
  Applying package updates.
  Add JasonGore to command bar codeowners
  Fix index import (microsoft#4826)
  Added overflowMenuProps property to CommandBar (microsoft#4818)
  Fluent theme: Fix imports to use relative paths (microsoft#4831)
  ContextualMenuItem: adding secondaryText (microsoft#4788)
  ComboBox: Option Performance Optimization (microsoft#4782)
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request May 13, 2018
* master: (95 commits)
  Variants: have project use OUFR instead of just styling (microsoft#4854)
  Add more customization hooks to ProgressIndicator (microsoft#4566)
  Issue#4832: Break BaseButton Types hard dependency from class ContextualMenu (microsoft#4845)
  Applying package updates.
  Revert react portals change (microsoft#4840)
  Update ImageOverview.md
  Fixes duplicate reading of suggestions on people picker (microsoft#4765)
  Persona: Deprecate primaryText (microsoft#4811)
  Experiments: Fix Fluent theme color names (microsoft#4834)
  Applying package updates.
  Add JasonGore to command bar codeowners
  Fix index import (microsoft#4826)
  Added overflowMenuProps property to CommandBar (microsoft#4818)
  Fluent theme: Fix imports to use relative paths (microsoft#4831)
  ContextualMenuItem: adding secondaryText (microsoft#4788)
  ComboBox: Option Performance Optimization (microsoft#4782)
  Marqueeselection style update (microsoft#4803)
  Applying package updates.
  FocusZone: Add the ability to stop focus from propagating outside the FocusZone (microsoft#4823)
  Unknown persona coin (microsoft#4809)
  ...
@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.

Can BaseButton not depend on ContextualMenu through IContextualMenuProps but some interface?

4 participants