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: Menu v3 #4782

Merged
merged 3 commits into from
Jul 18, 2024
Merged

feat: Menu v3 #4782

merged 3 commits into from
Jul 18, 2024

Conversation

dougmacknz
Copy link
Contributor

@dougmacknz dougmacknz commented Jun 25, 2024

Features pulled through:

  • Disabled items
  • Sections
  • Controlled open state
  • Sub menus (new to Culture Amp Menu component)
    • Update: commenting this out to give designers time for the change

Features blocked:

  • The ability to have 'selected' menu items
  • The ability to add functionality on long press

Not applicable / out of scope:

  • Reversed
  • Navigation use case
  • Backwards compatibility with Kaizen Button v1/v2

Notes:

  • Rather than doing a stickersheet, I've done a single 'Kitchen sink' example in the spec sheet and enabled it for Chromatic.

Copy link

changeset-bot bot commented Jun 25, 2024

🦋 Changeset detected

Latest commit: 8626b91

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kaizen/components Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dougmacknz dougmacknz changed the base branch from main to tooltip-poc June 25, 2024 05:50
@dougmacknz dougmacknz force-pushed the KZN-2422/rac-menu branch 3 times, most recently from 484d75f to d70601b Compare June 25, 2024 23:39
Base automatically changed from tooltip-poc to main June 26, 2024 03:10
@dougmacknz dougmacknz force-pushed the KZN-2422/rac-menu branch 5 times, most recently from 623a67a to 5af99dd Compare June 27, 2024 03:48
@dougmacknz dougmacknz force-pushed the KZN-2422/rac-menu branch 10 times, most recently from f574e56 to dee91f4 Compare July 5, 2024 00:08
/**
* A MenuTrigger adds open/close functionality when wrapping a Button and a Popover (with a Menu inside of the Popover)
*/
export const MenuTrigger = (props: MenuTriggerProps): JSX.Element => (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI the trigger components from RAC don't accept a ref prop, so I haven't done a forwardRef for them

@dougmacknz dougmacknz force-pushed the KZN-2422/rac-menu branch 4 times, most recently from e60be6b to f320c4e Compare July 5, 2024 06:57
@dougmacknz dougmacknz marked this pull request as ready for review July 5, 2024 06:58
@dougmacknz dougmacknz requested a review from a team as a code owner July 5, 2024 06:58
@dougmacknz dougmacknz force-pushed the KZN-2422/rac-menu branch 3 times, most recently from 9c29bf9 to 33edde3 Compare July 16, 2024 05:08
@dougmacknz dougmacknz force-pushed the KZN-2422/rac-menu branch 2 times, most recently from a1148a4 to 3b38a9d Compare July 16, 2024 23:14
@@ -4,7 +4,7 @@ import {
exampleActionButtonPropsButton,
exampleDropdownContentEnabled,
exampleDropdownContentOneDisabled,
} from "~components/Menu/_docs/examples"
} from "~components/__actions__/Menu/v1/_docs/examples"
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh this is hella confusing lol

Comment on lines 1 to 5
@import "~@kaizen/design-tokens/sass/border";
@import "~@kaizen/design-tokens/sass/color";
@import "~@kaizen/design-tokens/sass/shadow";
@import "~@kaizen/design-tokens/sass/spacing";
@import "~@kaizen/design-tokens/sass/typography";
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you tried not using the SCSS syntax for this? I'm pretty sure it would work...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 8 to 16
background-color: $color-white;
color: $color-purple-800;
width: 248px;
max-height: 22rem;
overflow: auto;
padding-block: $spacing-6;
outline: none;
border-radius: $border-solid-border-radius;
box-shadow: $shadow-large-box-shadow;
Copy link
Contributor

Choose a reason for hiding this comment

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

Also try convert these to CSS vars

Copy link
Contributor

Choose a reason for hiding this comment

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

@mcwinter07 you might also want to try this, as a inch towards CSS modules

Copy link
Contributor

Choose a reason for hiding this comment

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

Happy to give it a crack 💥 🔨

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

export * from "./Menu"
export * from "./MenuItem"
export * from "./MenuTrigger"
// export * from "./SubmenuTrigger"
Copy link
Contributor

@gyfchong gyfchong Jul 17, 2024

Choose a reason for hiding this comment

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

Given its not accessible I think we should just remove the SubmenuTrigger and all related until we decide its a feature to have. I'm concerned we'll forget why this was commented out and let someone enable it by accident.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair, I'll remove it all in a single commit once we're pretty settled on this PR going in, so that it's easy to see the code if we want to reference it later

@dougmacknz dougmacknz force-pushed the KZN-2422/rac-menu branch 5 times, most recently from c39ec2b to e17727c Compare July 18, 2024 04:21
@dougmacknz dougmacknz merged commit 57355d8 into main Jul 18, 2024
16 of 17 checks passed
@dougmacknz dougmacknz deleted the KZN-2422/rac-menu branch July 18, 2024 07:28
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.

4 participants