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

Adding groups to the Contextual Menu #1892

Merged
merged 13 commits into from Mar 18, 2024
Merged

Conversation

GomezIvann
Copy link
Collaborator

@GomezIvann GomezIvann commented Mar 13, 2024

Checklist

  • The Build process is done without errors. All tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
In the previous weeks, we have been working on a new component, the DxcContextualMenu. During its development, a new need arose: adding groups to the component, which can contain single elements or other groups.

To implement this new functionality we had to use a recursive algorithm to optimize the rendering of nested components up to N level. This had a few consequences for the component API:

  • defaultSelectedItemIndex has been removed. The default selection employing an index became more complex with the inclusion of groups.
  • No more icons in the slot position. Now you can only place a badge on the right side of an item.
  • The component no longer exports a Badge. The user should use the regular DxcBadge as the value of the prop with the same name.

The design can be checked here.

@GomezIvann GomezIvann marked this pull request as ready for review March 13, 2024 15:52
@GomezIvann GomezIvann changed the title New Contextual Menu component Adding groups to the Contextual Menu Mar 14, 2024
@kukoc kukoc self-assigned this Mar 15, 2024
Copy link
Contributor

@kukoc kukoc left a comment

Choose a reason for hiding this comment

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

Just a couple of minor things that I believe should be changed

@GomezIvann GomezIvann requested a review from kukoc March 18, 2024 09:06
@kukoc kukoc merged commit eff2879 into master Mar 18, 2024
4 checks passed
@kukoc kukoc deleted the gomezivann/contextual-menu-update branch March 18, 2024 15:29
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.

None yet

2 participants