Skip to content

feat: create component - badge - #601

Merged
paulinea merged 13 commits into
developfrom
403-create-component---badge
Jul 10, 2025
Merged

feat: create component - badge#601
paulinea merged 13 commits into
developfrom
403-create-component---badge

Conversation

@florentmaitre

Copy link
Copy Markdown
Member

No description provided.

@florentmaitre florentmaitre linked an issue Jun 26, 2025 that may be closed by this pull request
@github-actions

github-actions Bot commented Jun 26, 2025

Copy link
Copy Markdown

🟢 Netlify deploy for commit 13505dc succeeded

Deploy preview: null
Deploy log: https://app.netlify.com/projects/ouds-android/deploys/686fc66f86129476898a5e05

@florentmaitre
florentmaitre force-pushed the 403-create-component---badge branch 2 times, most recently from 1fd9fc9 to 93df07a Compare June 27, 2025 10:13
@florentmaitre
florentmaitre force-pushed the 403-create-component---badge branch from 93df07a to 0699aa5 Compare June 27, 2025 17:08
@florentmaitre
florentmaitre force-pushed the 403-create-component---badge branch from 0699aa5 to 721588d Compare June 30, 2025 10:03
@florentmaitre
florentmaitre force-pushed the 403-create-component---badge branch from 721588d to 43821f9 Compare June 30, 2025 16:42
@florentmaitre
florentmaitre marked this pull request as ready for review June 30, 2025 16:42
@florentmaitre
florentmaitre marked this pull request as draft July 1, 2025 07:59
@florentmaitre
florentmaitre force-pushed the 403-create-component---badge branch from 43821f9 to 15ad341 Compare July 1, 2025 08:34
@florentmaitre
florentmaitre marked this pull request as ready for review July 1, 2025 08:34
@florentmaitre
florentmaitre force-pushed the 403-create-component---badge branch from 15ad341 to 0cd7991 Compare July 1, 2025 10:47
Comment thread core/src/main/java/com/orange/ouds/core/component/OudsBadge.kt
Comment thread core/src/main/java/com/orange/ouds/core/component/OudsBadge.kt
Comment thread core/src/main/java/com/orange/ouds/core/component/OudsBadge.kt
Comment thread core/src/test/java/com/orange/ouds/core/component/OudsBadgeTest.kt
Comment thread app/src/main/res/values-ar/strings.xml Outdated
Comment on lines +110 to +118
<string name="app_components_badge_label">Badge</string>
<string name="app_components_badge_description_text">The badge is a small UI element used to highlight status, notifications, or categorization within an interface. It is often displayed as a label or indicator with a distinct background color and text.</string>
<string name="app_components_badge_status_label">Status</string>
<string name="app_components_badge_size_label">Size</string>
<string name="app_components_badge_type_label">Type</string>
<string name="app_components_badge_standardType_label">Standard</string>
<string name="app_components_badge_countType_label">Count</string>
<string name="app_components_badge_iconType_label">Icon</string>
<string name="app_components_badge_count_label">Count</string>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have to add these new strings in the translation file and ask for Arabic translation.

Comment thread app/src/main/res/values/strings.xml
@github-actions

github-actions Bot commented Jul 8, 2025

Copy link
Copy Markdown

📱 Alpha release available

Scan the QR code below to download and install the Design System Toolbox app which contains the changes of this pull request.
Please note that the link behind this QR code will expire on Tue, 8 Jul 2025 15:34:59 GMT.
qrcode

@jerome-regnier

Copy link
Copy Markdown
Member

Test sur Android :
https://www.figma.com/design/QtOWrH1m3RHOAkfyy0XFil/-OUDS-Core-Lib--Components?node-id=66541-40428&t=Su9ON6sy2LsUZwvq-1
Test effectué sur chaque variant dont le count avec un chiffre >100, affichage +99 ok et tous les autres variant ok.

@B3nz01d

B3nz01d commented Jul 9, 2025

Copy link
Copy Markdown
Member

@florentmaitre Here are my feedbacks:
1- to be coherent with the illustration, the default state of the badge component when you arrive on it the first time should be in:

  • type: Count
  • size: medium
  • number: "1" <- it needs to be defaulted to 1, it cannot stay empty
  • Status: negative
    2- When a user is set to xsmall or small and selects the icon or the count type the size should switch to medium automatically
    3- when you are on the medium setup and you select the small or xsmall it should switch to the corresponding size in the standard type.

@florentmaitre

Copy link
Copy Markdown
Member Author

@B3nz01d

1 - Yes we can set the badge type to count by default and set count value to 1. However, Figma initial setting for status is neutral and I think that Figma should be the source of truth for default values:

Capture d’écran 2025-07-09 à 15 40 44

By the way, the default values of our APIs follow Figma initial settings, meaning that the default status value is neutral in our APIs.

2 - Yes.

3 - I agree from a Figma point of view. However, we decided to have only one size type (which is OudsChip.Size) for all our APIs. As a consequence when the user selects OudsChip.Size.ExtraSmall or OudsChip.Size.Small with a count (or icon) badge, the count (or icon) is not displayed and it renders as if it was a standard badge. However, although it looks like a standard badge, practically the API used is still the count (or icon) API, so from an API point of view I think we should not change the type when switching to extra small or small.

@paulinea
paulinea merged commit 0cb19f4 into develop Jul 10, 2025
9 checks passed
@paulinea
paulinea deleted the 403-create-component---badge branch July 10, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create component - Badge

4 participants