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

New Feature: Enhanced Progress Control #1676

Merged

Conversation

namnguyen20999
Copy link
Member

@namnguyen20999 namnguyen20999 commented Aug 17, 2024

Resolves: #1626

New Feature: Enhanced Progress Control

This PR introduces several enhancements to the progress control element:

  1. Dynamic title Property:

    • A new title property has been added to the progress control, allowing users to provide a dynamic title that can update based on the current status or context of the progress.
  2. Dynamic title_anchor Property:

    • Introduced the title_anchor property, which determines the placement of the title around the progress element. Available options include "left", "right", "top", "bottom", or "none".
    • When set to "none", the title will be hidden. The default value is "bottom".

main.py

from taipy.gui import Gui

value = 50
title = "Progress"
title_anchor = "right"  # Options: "left", "right", "top", "bottom", "none"

page = """
<|progress|value={value}|linear|title={title}|title_anchor={title_anchor}|show_value|>
"""

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

Result
image

Other cases:
title_anchor = "top"
image

title_anchor = "bottom"
image

title_anchor = "left"
image

title_anchor = "none"
image

@namnguyen20999 namnguyen20999 added 📈 Improvement Improvement of a feature. GUI: Front-End 💬 Discussion Requires some discussion and decision labels Aug 17, 2024
@namnguyen20999 namnguyen20999 added this to the Community 3.2 milestone Aug 17, 2024
@namnguyen20999 namnguyen20999 self-assigned this Aug 17, 2024
@namnguyen20999 namnguyen20999 linked an issue Aug 17, 2024 that may be closed by this pull request
5 tasks
Copy link
Contributor

github-actions bot commented Aug 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.05063291139241%

St.
Category Percentage Covered / Total
🟢 Statements
87.63% (+0.07% 🔼)
3189/3639
🟡 Branches
69.05% (+0.41% 🔼)
2182/3160
🟢 Functions
82.65% (+0.05% 🔼)
581/703
🟢 Lines
88.2% (+0.07% 🔼)
2953/3348

Test suite run success

626 tests passing in 43 suites.

Report generated by 🧪jest coverage report action from fcbedd2

Copy link
Contributor

github-actions bot commented Aug 17, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

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

New Files

No new covered files...

Modified Files

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

updated for commit: fcbedd2 by action🐍

FlorianJacta
FlorianJacta previously approved these changes Aug 19, 2024
FabienLelaquais
FabienLelaquais previously approved these changes Sep 9, 2024
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.

👌

taipy/gui/viselements.json Outdated Show resolved Hide resolved
taipy/gui/viselements.json Show resolved Hide resolved
taipy/gui/viselements.json Outdated Show resolved Hide resolved
frontend/taipy-gui/src/components/Taipy/Progress.spec.tsx Outdated Show resolved Hide resolved
…ithub.com:Avaiga/taipy into 1626-add-dynamic-label-to-progress-visual-element
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.

👍

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

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

limit re-render by makeing sx more stable

frontend/taipy-gui/src/components/Taipy/Progress.tsx Outdated Show resolved Hide resolved
frontend/taipy-gui/src/components/Taipy/Progress.tsx Outdated Show resolved Hide resolved
frontend/taipy-gui/src/components/Taipy/Progress.tsx Outdated Show resolved Hide resolved
frontend/taipy-gui/src/components/Taipy/Progress.tsx Outdated Show resolved Hide resolved
frontend/taipy-gui/src/components/Taipy/Progress.tsx Outdated Show resolved Hide resolved
…ithub.com:Avaiga/taipy into 1626-add-dynamic-label-to-progress-visual-element
FredLL-Avaiga
FredLL-Avaiga previously approved these changes Sep 16, 2024
frontend/taipy-gui/src/components/Taipy/Progress.tsx Outdated Show resolved Hide resolved
…ss-visual-element' into 1626-add-dynamic-label-to-progress-visual-element
@namnguyen20999 namnguyen20999 merged commit 7d09861 into develop Sep 17, 2024
71 of 72 checks passed
@namnguyen20999 namnguyen20999 deleted the 1626-add-dynamic-label-to-progress-visual-element branch September 17, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 Discussion Requires some discussion and decision GUI: Front-End 📈 Improvement Improvement of a feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dynamic label to progress visual element
4 participants