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

fix hold_control action support #2400

Merged
merged 5 commits into from
Jan 15, 2025
Merged

Conversation

FredLL-Avaiga
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

fix the on_action support on hold_control

Related Tickets & Documents

How to reproduce the issue

import time

from taipy.gui import Gui, hold_control, resume_control
from taipy.gui import builder as tgb


def cancel_callback(state, id):
    print(f"Callback triggered with id: {id} and state: {state}")

def callback_with_hold(state):
    hold_control(state, callback=cancel_callback,message="waiting")
    # hold_control(state, callback=lambda state, id: print(f"Callback triggered with id: {id} and state: {state}"),message="waiting")
    time.sleep(5)
    resume_control(state)

with tgb.Page() as hold_and_resume_page:
    tgb.text("# Hold and Resume control", mode="md")

    tgb.button("trigger callback!", on_action=callback_with_hold)

if __name__ == "__main__":
    Gui(page=hold_and_resume_page).run(title="2399 hold_control action support")

@FredLL-Avaiga FredLL-Avaiga added 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon 📝Release Notes Impacts the Release Notes or the Documentation in general Gui: Back-End labels Jan 15, 2025
@FredLL-Avaiga FredLL-Avaiga self-assigned this Jan 15, 2025
Fred Lefévère-Laoide added 3 commits January 15, 2025 10:29
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.

Good catch indeed

Copy link
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
19597 17063 87% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
taipy/gui/gui.py 79% 🟢
taipy/gui/utils/callable.py 100% 🟢
TOTAL 90% 🟢

updated for commit: d8cff9c by action🐍

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.

👍

@FredLL-Avaiga FredLL-Avaiga merged commit 9db15e4 into develop Jan 15, 2025
128 checks passed
@FredLL-Avaiga FredLL-Avaiga deleted the bug/#2399-hold_control-action branch January 15, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gui: Back-End 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon 📝Release Notes Impacts the Release Notes or the Documentation in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 BUG] Issue with hold_control
2 participants