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

popupdialog associated with an id (query selector) #2339

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

FredLL-Avaiga
Copy link
Member

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

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

Description

  • popup dialog associated with an id (query selector)
  • also fix a possible bug in chart

Related Tickets & Documents

How to reproduce the issue

from taipy.gui import Gui, State

ref_id = None
pop_open = False
val = None

def on_action(state: State, id: str):
  if id == "dialog":
    state.ref_id = None
    state.pop_open = False
  elif id:
    state.ref_id = f"#{id}"
    state.pop_open = True
  else:
      state.val = state.val +1 if state.val is not None else 1

page = """
<|button 1 |button|id=id1|>
<|button 2|button|id=id2|>


<|button |button|id=id3|>
<|button |button|id=id4|>
<|button |button|id=id5|>


<|button |button|id=id6|>
<|button |button|id=id7|>
<|button |button|id=id8|>
<|button |button|id=id9|>


<|button |button|id=id10|>
<|button |button|id=id11|>

<|{pop_open}|dialog|popup|ref_id={ref_id}|id=dialog|
<|inside the popup|button|>

<|{val}|>
|>
"""

if __name__ == "__main__":
  Gui(page).run(title="2293 popup")

resolves #2293
- also fix a possible bug in chart
Copy link
Contributor

github-actions bot commented Dec 16, 2024

Coverage report for ./frontend/taipy

Caution

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

St.
Category Percentage Covered / Total
🔴 Statements 51.87% 263/507
🔴 Branches 21.61% 67/310
🔴 Functions 14.66% 17/116
🔴 Lines 53.19% 242/455

Test suite run success

7 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 91c1864

Copy link
Contributor

github-actions bot commented Dec 16, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
19463 16967 87% 0% 🟢

New Files

No new covered files...

Modified Files

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

updated for commit: 91c1864 by action🐍

Copy link
Contributor

Coverage report for ./frontend/taipy-gui

Caution

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

St.
Category Percentage Covered / Total
🟢 Statements
87.49% (+0.03% 🔼)
3498/3998
🟡 Branches
69.15% (-0.02% 🔻)
2410/3485
🟢 Functions
83.4% (+0.04% 🔼)
648/777
🟢 Lines
87.94% (+0.03% 🔼)
3239/3683
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / Dialog.tsx
100%
82.86% (-8.45% 🔻)
100% 100%

Test suite run success

712 tests passing in 47 suites.

Report generated by 🧪jest coverage report action from 91c1864

@FredLL-Avaiga FredLL-Avaiga self-assigned this Dec 17, 2024
@FredLL-Avaiga FredLL-Avaiga added 🖰 GUI Related to GUI 🟧 Priority: High Must be addressed as soon ✨New feature 📝Release Notes Impacts the Release Notes or the Documentation in general labels Dec 17, 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.

👍 simple enough!
A little more work for popup placement.

taipy/gui/_renderers/factory.py Show resolved Hide resolved
taipy/gui/_renderers/factory.py Show resolved Hide resolved
@FredLL-Avaiga FredLL-Avaiga merged commit 0ce3c0d into develop Dec 17, 2024
133 checks passed
@FredLL-Avaiga FredLL-Avaiga deleted the feature/#2293-popup-dialog branch December 17, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI ✨New feature 🟧 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.

Have part or dialog centered to the element clicked
2 participants