Skip to content

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
Collaborator

@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
@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.

3 participants