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

feat: MenuItem2 component #5471

Merged
merged 6 commits into from
Jul 27, 2022
Merged

feat: MenuItem2 component #5471

merged 6 commits into from
Jul 27, 2022

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Jul 27, 2022

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

  • Create new MenuItem2 component in @blueprintjs/popover2, a replacement for MenuItem which uses Popover2 instead of Popover to render submenus
    • Note: it would be more convenient (and less of an upgrade burden on consumers) if we could only deprecate usage of MenuItem with children defined (those which have submenus), but we cannot do that with TypeScript's JSX type checking features, so we must deprecate MenuItem completely to be safe.
  • Deprecate MenuItem
  • Migrate MenuItem -> MenuItem2 across all non-deprecated Blueprint components in this repo

Reviewers should focus on:

No regressions in MenuItem2 docs example compared to MenuItem

Screenshot

MenuItem2 example:

image

Updated Popover2 example:

image

Updated Select2 example:

image

image

Updated icon docs page:

image

Updated ContextMenu2 example:

image

Updated table example:

image

@blueprint-bot
Copy link

MenuItem2 component, part 4: migrate to MenuItem2 within repo

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

fix unit tests

Previews: documentation | landing | table | demo


import { Clipboard } from "../../common/clipboard";
import { TABLE_COPY_FAILED } from "../../common/errors";
import { Regions } from "../../regions";
import { IMenuContext } from "./menuContext";

export interface ICopyCellsMenuItemProps extends MenuItemProps {
export interface ICopyCellsMenuItemProps extends MenuItem2Props {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this is a small breaking change, but in practice I think it should be ok for consumers since I didn't see any usage of popoverProps: Partial<IPopoverProps> for this component in any of our code bases.

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.

2 participants