Skip to content

feat(MenuItem): Added description to MenuItem#1543

Merged
AlexandraGallipoliRodrigues merged 8 commits into
masterfrom
alex/WEB-2410-add-description-to-MenuItem
May 6, 2026
Merged

feat(MenuItem): Added description to MenuItem#1543
AlexandraGallipoliRodrigues merged 8 commits into
masterfrom
alex/WEB-2410-add-description-to-MenuItem

Conversation

@AlexandraGallipoliRodrigues
Copy link
Copy Markdown
Contributor

@AlexandraGallipoliRodrigues AlexandraGallipoliRodrigues commented May 5, 2026

Copilot AI review requested due to automatic review settings May 5, 2026 07:50
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Size stats

master this branch diff
Total JS 16.1 MB 16.1 MB +197 B
JS without icons 2.01 MB 2.01 MB +197 B
Lib overhead 92.5 kB 92.5 kB 0 B
Lib overhead (gzip) 19.9 kB 19.9 kB 0 B

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the MenuItem component API to support an optional secondary text (description) and updates the menu item layout/styles to display it under the main label.

Changes:

  • Add optional description?: string to MenuItem props.
  • Render the description below the label in both the normal and checkbox menu item variants.
  • Introduce a new itemTextContent style to layout label/description vertically.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/menu.tsx Adds the description prop and renders it under the label in both checkbox and non-checkbox menu items.
src/menu.css.ts Adds itemTextContent styling to stack label and description vertically.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/menu.tsx Outdated
Comment on lines +122 to +126
<div className={styles.itemTextContent}>
<Text3 regular color={contentColor}>
{label}
</Text3>
{description && (
Comment thread src/menu.tsx Outdated
Comment on lines +122 to +125
<div className={styles.itemTextContent}>
<Text3 regular color={contentColor}>
{label}
</Text3>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Deploy preview for mistica-web ready!

Project:mistica-web
Status: ✅  Deploy successful!
Preview URL:https://mistica-qaiklq2ft-flows-projects-65bb050e.vercel.app
Latest Commit:764f9bf

Deployed with vercel-action

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Accessibility report
✔️ No issues found

ℹ️ You can run this locally by executing yarn audit-accessibility.

@ieduardogf ieduardogf requested a review from yceballost May 5, 2026 08:14
Copy link
Copy Markdown
Contributor

@atabel atabel left a comment

Choose a reason for hiding this comment

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

please follow the PR titles convention:

feat(component name): description
or
fix(component name): description

This PR title is used as a commit message when the branch is squashed+merged into master, and it's used to generate the release notes when we build a new release

Comment thread src/menu.tsx Outdated
Comment on lines +122 to +125
<div className={styles.itemTextContent}>
<Text3 regular color={contentColor}>
{label}
</Text3>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread src/menu.tsx

interface MenuItemBaseProps {
label: string;
description?: string;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please include some example using description in the storybook and make a screenshot test to cover the case

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you can include description in some item in playroom snippet also

@AlexandraGallipoliRodrigues AlexandraGallipoliRodrigues changed the title alex/WEB-2410-add-description-to-MenuItem feat(MenuItem): Added description to MenuItem May 5, 2026
Comment thread src/menu.tsx

interface MenuItemBaseProps {
label: string;
description?: string;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you can include description in some item in playroom snippet also

Comment thread src/menu.tsx Outdated
{label}
</Text3>
{description && (
<Text3 light color={vars.colors.textSecondary}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Text2 regular instead of Text3

image

Comment thread src/menu.tsx Outdated
{label}
</Text3>
{description && (
<Text3 light color={vars.colors.textSecondary}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/menu.tsx
Comment on lines +98 to +107
const renderTextContent = (id?: string) => (
<div id={id} className={styles.itemTextContent}>
<Text3 regular color={contentColor}>
{label}
</Text3>
{description && (
<Text2 regular color={vars.colors.textSecondary}>
{description}
</Text2>
)}
@AlexandraGallipoliRodrigues AlexandraGallipoliRodrigues added this pull request to the merge queue May 6, 2026
Merged via the queue into master with commit a1f2e7d May 6, 2026
15 checks passed
@tuentisre
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 16.62.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

MurilloLeoni pushed a commit to MurilloLeoni/mistica-web that referenced this pull request May 8, 2026
# [16.62.0](Telefonica/mistica-web@v16.61.0...v16.62.0) (2026-05-08)

### Features

* **AiCard:** add new component aicard ([Telefonica#1544](Telefonica#1544)) ([96959e9](Telefonica@96959e9))
* allow PR workflows from forks ([Telefonica#1547](Telefonica#1547)) ([2270adc](Telefonica@2270adc)), closes [/github.com/Telefonica/tf-github-cdo-repos/blob/main/novum/repositories/mistica-web/terraform.tfvars#L23-L32](https://github.com//github.com/Telefonica/tf-github-cdo-repos/blob/main/novum/repositories/mistica-web/terraform.tfvars/issues/L23-L32)
* **Icons:** update artificial intelligence icons in vivo ([Telefonica#1545](Telefonica#1545)) ([f732114](Telefonica@f732114))
* **MenuItem:** Added description to MenuItem ([Telefonica#1543](Telefonica#1543)) ([a1f2e7d](Telefonica@a1f2e7d))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants