Skip to content

Fix teaching bubble overriding all default callout props#3811

Merged
gokunymbus merged 4 commits into
microsoft:masterfrom
jordandrako:Fix-TeachingBubble-overridding-all-default-calloutProps
Jan 26, 2018
Merged

Fix teaching bubble overriding all default callout props#3811
gokunymbus merged 4 commits into
microsoft:masterfrom
jordandrako:Fix-TeachingBubble-overridding-all-default-calloutProps

Conversation

@jordandrako

Copy link
Copy Markdown
Contributor

Pull request checklist

  • Include a change request file using $ npm run change

Description of changes

Add private _defaultCalloutProps instead of public defaultProps to set calloutProps.

Focus areas to test

Test if adding calloutProps to TeachingBubble component doesn't override other default calloutProp properties. ie: changing the beakWidth would reset the DirectionHint direction.

@jordandrako

Copy link
Copy Markdown
Contributor Author

@battletoilet @rebeccaballantyne Here is the second PR.

export class TeachingBubble extends BaseComponent<ITeachingBubbleProps, ITeachingBubbleState> {

// Specify default props values
public static defaultProps = {

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.

Unfortunately this should be deprecated and marked for removal in a future release. We want to avoid changing public contracts, even if they were added erroneously.

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.

I approved but fix this first and then finish your pr 👍

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.

Does this new commit satisfy that req?

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.

Yes :)

… then spread the default calloutProps and the _defaultCalloutProps into a new object that's passed into Callout.
@lynamemi

Copy link
Copy Markdown
Collaborator

closing and reopening to rebuild and get a clean screener

@lynamemi lynamemi closed this Jan 26, 2018
@lynamemi lynamemi reopened this Jan 26, 2018
@jordandrako

Copy link
Copy Markdown
Contributor Author

Merged master to get the screener fixes.

@gokunymbus gokunymbus merged commit 4b472ac into microsoft:master Jan 26, 2018
@jordandrako jordandrako deleted the Fix-TeachingBubble-overridding-all-default-calloutProps branch January 29, 2018 18:26
@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