Skip to content

fix: value length at progress bar when unit is percentage#7440

Merged
deleonio merged 3 commits intodevelopfrom
feature/7397-fix-value-length
Mar 7, 2025
Merged

fix: value length at progress bar when unit is percentage#7440
deleonio merged 3 commits intodevelopfrom
feature/7397-fix-value-length

Conversation

@laske185
Copy link
Copy Markdown
Contributor

@laske185 laske185 commented Mar 5, 2025

Refs: #7397
This pull request includes changes to the KolProgress component and its usage in the ProgressBasic sample to improve the display of progress values. The most important changes include modifying the width calculation for the progress bar value and updating the sample values for better demonstration.

Changes to KolProgress component:

Updates to ProgressBasic sample:

Refs #7397

The A11y and PO reviews will only take place after all other DoD steps have been completed by the Developer:

  • Meaningful pull request title for the release notes
  • Pull request is linked to an issue and all changes relate to the issue
  • Tests to protect this code implemented (if applicable)
  • Manual test performed successfully (if applicable)
  • Documentation or migration has been updated (if applicable)

Refs: #7397

# Conflicts:
#	packages/components/src/components/progress/shadow.tsx
@laske185 laske185 requested a review from Copilot March 5, 2025 08:36
Copy link
Copy Markdown
Contributor

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.

PR Overview

This PR fixes the progress bar’s value length display issue for percentage-based progress indicators and updates the sample usage to better demonstrate the component’s behavior.

  • Adjusts the width calculation logic in KolProgress for percentage values.
  • Updates sample values in ProgressBasic to illustrate different progress scenarios.

Reviewed Changes

File Description
packages/samples/react/src/components/progress/basic.tsx Updated sample progress values to demonstrate progress with percentages and custom units.
packages/components/src/components/progress/shadow.tsx Modified width calculation for the progress bar value to account for percentage values.

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

Comments suppressed due to low confidence (1)

packages/components/src/components/progress/shadow.tsx:119

  • [nitpick] Consider extracting the width calculation expression into a well-named variable with an accompanying comment to clarify the intent behind adding 1 and using the string length for measurement.
<div class="kol-progress__bar-value" style={{ width: `${`${(isPercentage ? 100 : this.state._max) + 1}`.length}ch` }}>

@laske185 laske185 added the v3 label Mar 5, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2025

@laske185 laske185 linked an issue Mar 5, 2025 that may be closed by this pull request
@deleonio deleonio merged commit 579153b into develop Mar 7, 2025
9 checks passed
@deleonio deleonio deleted the feature/7397-fix-value-length branch March 7, 2025 04:41
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2025
@deleonio deleonio removed the v3 label Jun 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inkorrekte Prozentanzeige beim Progress

3 participants