Coachmark: Positioning fixes#4995
Coachmark: Positioning fixes#4995leddie24 merged 51 commits intomicrosoft:masterfrom leddie24:coachmarkFixes
Conversation
…et element. Fix documentation page to not hide overflow on Coachmark example.
….ts. Add string to 'target' type, Add COACHMARK_ATTRIBUTE_NAME. Fix TeachingBubble closeButton selector.
…erProps. TODO fix Beak transform for different directions. Change Coachmark size and beak size.
…omponent on resize
…sions and set as exported const. Fix scss selectors for TeachingBubble buttons.
…color from Beak props
…chmark is expanded. Fix finalheight prop.
…n't contain element. TODO fix bounds for target rect
…beakDirection in Coachmark
…oachmark Do's and Overview.
…emove extra div in PositioningContainer
…c-react into coachmarkFixes # Conflicts: # packages/office-ui-fabric-react/src/components/Coachmark/PositioningContainer/PositioningContainer.types.ts
| ); | ||
| } | ||
|
|
||
| public dismiss = (ev?: Event | React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>): void => { |
There was a problem hiding this comment.
Since dismiss is public you'll need to keep it around and deprecate it.
| } else { | ||
| // Beak is aligned to the top of target | ||
| if (targetAlignment === RectangleEdge.top) { | ||
| beakTop = `calc(${COACHMARK_WIDTH / 2}px - ${BEAK_WIDTH / 2}px)`; |
There was a problem hiding this comment.
Why are you using calc? That's likely going to be slower than just doing the calculation right here in javascript.
| }; | ||
| } | ||
|
|
||
| private get _beakDirection(): BeakDirection { |
There was a problem hiding this comment.
I'd recommend using rectangleEdge from positioning. Then implement a public "getOppositeEdge" function in positioning which would look like
export function getOppositeEdge(edge: RectangleEdge): RectangleEdge {
return edge * -1;
}
|
|
||
| export interface IBeak { } | ||
|
|
||
| export enum BeakDirection { |
There was a problem hiding this comment.
Reuse RectangleEdge from positioning
…g. Remove unnecessary css calc for beak in Coachmark.
|
@joschect i'm happy to sign off on this a codeowner as long as you are |
|
Looks like there's some bug only reproing in Windows. The Positioning container cuts off the teaching bubble and doesn't fully extend to its full height. |
|
give me a shout when you've got those bugs wrapped up and i'll approve |
|
@micahgodbolt could you take another look when you get a chance? Thanks! |
|
As long as it all passes, i'm good. @joschect already signed off |
* master: (274 commits) Demo Page Refactor Part 1 (microsoft#5055) SplitButton: Add aria-roledescription (microsoft#5062) Add addins sketch toolkit link (microsoft#5052) Dropdown title (microsoft#4983) Allow for more control over event handling for keytips (microsoft#5064) Build time speed improvements (microsoft#4965) Coachmark: Positioning fixes (microsoft#4995) Applying package updates. Experiments/Nav component: display "show more" link only if there is atleast one hidden link (microsoft#5057) Add pointerup listener to exit keytip mode (microsoft#5051) Update PULL_REQUEST_TEMPLATE.md Update ISSUE_TEMPLATE.md Shimmer: resolve conflicts (microsoft#5034) Invalid ARIA attributes: Fix empty values (microsoft#5040) ComboBox: Correct invalid ARIA attributes. (microsoft#4873) (microsoft#5001) ComboBox: Fix submit pending value (microsoft#5048) FocusTrapZone - restore last focused descendant element (microsoft#4897) Applying package updates. Take 2 of the require.resolve change. This time using the "resolve" pkg (microsoft#5031) fixing webpack config to allow rush build to complete on a small VM (microsoft#5037) ...
* master: (111 commits) Moving a variable to be defined sooner so that it is there when failures occur. Fix icon imports (microsoft#5069) MessageBar: More visible HC color for dismiss and expand buttons (microsoft#5061) Fix DetailsList accessibility and add more ARIA hooks (microsoft#5066) Update jest (microsoft#5068) Demo Page Refactor Part 1 (microsoft#5055) SplitButton: Add aria-roledescription (microsoft#5062) Add addins sketch toolkit link (microsoft#5052) Dropdown title (microsoft#4983) Allow for more control over event handling for keytips (microsoft#5064) Build time speed improvements (microsoft#4965) Coachmark: Positioning fixes (microsoft#4995) Applying package updates. Experiments/Nav component: display "show more" link only if there is atleast one hidden link (microsoft#5057) Add pointerup listener to exit keytip mode (microsoft#5051) Update PULL_REQUEST_TEMPLATE.md Update ISSUE_TEMPLATE.md Shimmer: resolve conflicts (microsoft#5034) Invalid ARIA attributes: Fix empty values (microsoft#5040) ComboBox: Correct invalid ARIA attributes. (microsoft#4873) (microsoft#5001) ...
…5656) * Cherry pick Coachmark: Positioning fixes (#4995) e87289b * Cherry pick TeachingBubble/Coachmark: Fix TeachingBubble content wrapping to next line unnecessarily (#5121) 72bab3c * Cherrry pick Fix import paths to use relative paths in product code (#5338) e2076e1 * Cherry pick Coachmark accessibility #5155 7a36bb9 * Revert formatting back to 5.0 in Coachmark.tsx * Fix unnecessary ; and change " to ' * Fix merge conflicts for Coachmark.Basic.Example.tsx * " to ' * Fix imports for TeachingBubble.tsx * Update TeachinBubbleContent, update TeachingBubble snapshot * Update snapshot. Fix TeachingBubble.types * Fix import for RefObject * Fix some inadvertent formatting from prettier.
Pull request checklist
$ npm run changeDescription of changes
Coachmark right position:

Coachmark top position:

Coachmark left position

Teaching bubble close button hover fix
Before:

After

Focus areas to test
(optional)