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 width property to linear & circular progress #1797

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

namnguyen20999
Copy link
Member

from taipy.gui import Gui

value = 52
title = "Progress"
title_anchor = "bottom"  # Options: "left", "right", "top", "bottom", "none"
linear = True
show_value = True

page = """
<|progress|value={value}|linear={linear}|show_value|title={title}|color=green|width=100|>
"""

if __name__ == '__main__':
    Gui(page).run(port=3000, debug=True, use_reloader=True)
image

Copy link
Member

@FabienLelaquais FabienLelaquais left a comment

Choose a reason for hiding this comment

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

Looking good.
Minor comments... let me know if I should re-review

@@ -110,7 +118,7 @@ const Progress = (props: ProgressBarProps) => {

return showValue && value !== undefined ? (
linear ? (
<Box sx={boxWithFlexDirectionSx}>
<Box sx={boxWithFlexDirectionSx} data-testid="linear-progress-container">
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need this attribute??

Copy link
Member Author

Choose a reason for hiding this comment

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

This is used only for unit tests only, making it more stable than the auto-generated className from React, which might change due to styling or refactoring

Copy link
Member

Choose a reason for hiding this comment

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

Sure. But then.... all application get this... I mean users
Can you not add the class name when generating the component when testing (yes you can)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated, I've removed it from the component

frontend/taipy-gui/src/components/Taipy/Progress.tsx Outdated Show resolved Hide resolved
taipy/gui/viselements.json Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Sep 17, 2024

Coverage report for ./frontend/taipy-gui

Caution

Coverage does not meet threshold
Branches coverage not met for global: expected >=80%, but got 69.0897597977244%

St.
Category Percentage Covered / Total
🟢 Statements
87.64% (+0.01% 🔼)
3192/3642
🟡 Branches
69.09% (+0.04% 🔼)
2186/3164
🟢 Functions
82.67% (+0.02% 🔼)
582/704
🟢 Lines
88.21% (+0.01% 🔼)
2956/3351

Test suite run success

642 tests passing in 43 suites.

Report generated by 🧪jest coverage report action from d18ecc8

Copy link
Contributor

github-actions bot commented Sep 17, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
19324 16269 84% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
taipy/gui/_renderers/factory.py 96% 🟢
TOTAL 96% 🟢

updated for commit: d18ecc8 by action🐍

Co-authored-by: Fabien Lelaquais <[email protected]>
Copy link
Member

@FabienLelaquais FabienLelaquais left a comment

Choose a reason for hiding this comment

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

👍

@namnguyen20999 namnguyen20999 merged commit 5a8f6e7 into develop Sep 18, 2024
158 of 160 checks passed
@namnguyen20999 namnguyen20999 deleted the feature/progress_width branch September 18, 2024 06:14
@FabienLelaquais FabienLelaquais added 📈 Improvement Improvement of a feature. 🟧 Priority: High Must be addressed as soon labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI 📈 Improvement Improvement of a feature. 🟧 Priority: High Must be addressed as soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants