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

Page key should integrate functions #1855

Merged
merged 4 commits into from
Sep 30, 2024
Merged

Conversation

FredLL-Avaiga
Copy link
Member

to allow to tables differentiated only by their style function for example

from random import randrange

import taipy.gui.builder as tgb
from taipy.gui import Gui

x_range = range(0, 11)
data = {"x": [randrange(6) for _ in x_range]}

def x_style(_, value):
    return f"colfn{value}"

with tgb.Page(
    style={
        ".colfn0": {"background-color": "#d0d0d0"},
        ".colfn1": {"background-color": "#a4a0cf"},
        ".colfn2": {"background-color": "#7970cf"},
        ".colfn3": {"background-color": "#4e40cf", "color": "white"},
        ".colfn4": {"background-color": "#2410cf", "color": "white"},
        ".colfn5": {"background-color": "#1b02a8", "color": "white"},
        ".colldb5": {"background-color": "#d0d0d0"},
        ".colldb4": {"background-color": "#a4a0cf"},
        ".colldb3": {"background-color": "#7970cf"},
        ".colldb2": {"background-color": "#4e40cf", "color": "white"},
        ".colldb1": {"background-color": "#2410cf", "color": "white"},
        ".colldb0": {"background-color": "#1b02a8", "color": "white"},
    }
) as page:
    tgb.table("{data}", style__x=x_style, show_all=True, height="40vh")
    # Using a lambda function instead of x_style:
    tgb.table("{data}", style__x=lambda _, v: f"colldb{v}", show_all=True, height="40vh")

Gui(page).run(title="BUG?")

@FredLL-Avaiga FredLL-Avaiga added 🟥 Priority: Critical Must be addressed as soon as possible 💥Malfunction Addresses an identified problem. GUI: Front-End labels Sep 29, 2024
@FredLL-Avaiga FredLL-Avaiga self-assigned this Sep 29, 2024
Copy link
Contributor

github-actions bot commented Sep 29, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
18851 16335 87% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 137522c by action🐍

Fred Lefévère-Laoide added 3 commits September 29, 2024 18:57
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.04613466334165%

St.
Category Percentage Covered / Total
🟢 Statements
87.75% (+0.12% 🔼)
3223/3673
🟡 Branches
69.05% (-0.03% 🔻)
2215/3208
🟢 Functions
83.45% (+0.38% 🔼)
595/713
🟢 Lines
88.28% (+0.12% 🔼)
2983/3379
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / tableUtils.tsx
79.49% (-0.84% 🔻)
64.92% (-1.37% 🔻)
70.83% (+0.83% 🔼)
80.81% (-1.17% 🔻)

Test suite run success

645 tests passing in 43 suites.

Report generated by 🧪jest coverage report action from 137522c

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.

Looks like 🪄 to me

@FredLL-Avaiga FredLL-Avaiga merged commit 9a5a6c5 into develop Sep 30, 2024
132 checks passed
@FredLL-Avaiga FredLL-Avaiga deleted the bug/table-page-key branch September 30, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI: Front-End 💥Malfunction Addresses an identified problem. 🟥 Priority: Critical Must be addressed as soon as possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants