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

[popover2] Popover2 and ContextMenu2 fixes & enhancements #4601

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Mar 23, 2021

Ported changes on v4 branch from #4588 and #4595 onto develop.

Fixes #4537

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

  • Refactor Tree example as a function component with cleaner state handling logic (using a React reducer hook)
  • Add a repro case for ContextMenu2 with Tree - wrong open position #4537 in the refactored Tree example
  • Add positioningStrategy prop for Popover2
  • Add popoverClassName prop for ContextMenu2
  • Fix ContextMenu2's styles to use their own classes instead of ContextMenu's, add the relevant Sass stylesheet
  • Create a new utility class .bp3-fixed-positioning-containing-block which is used to give hints to child / ancestor elements which use position: fixed and need to know about their containing block for proper layout calculations. See MDN docs. Use this new utility class in Collapse and ContextMenu2 to fix ContextMenu2 with Tree - wrong open position #4537.
  • Update ContextMenu2RenderProps to include the mouse event like ContextMenuTarget did, to improve compatibility with existing use cases in the wild (like I encountered in the table package in [v4] [table] migrate from ContextMenuTarget to ContextMenu2 #4595)
  • Add className, disabled, and onContextMenu props for ContextMenu2

Reviewers should focus on:

Already reviewed

@blueprint-bot
Copy link

[popover2] Popover2 and ContextMenu2 fixes & enhancements

Previews: documentation | landing | table

@adidahiya
Copy link
Contributor Author

ContextMenu2 and Tree examples look good in docs preview 👍

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

Successfully merging this pull request may close these issues.

ContextMenu2 with Tree - wrong open position
2 participants