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

[🐛 BUG] Table flickers and occupies a lot of space when updating to no rows #2275

Closed
1 of 7 tasks
arcanaxion opened this issue Nov 23, 2024 · 0 comments · Fixed by #2277
Closed
1 of 7 tasks

[🐛 BUG] Table flickers and occupies a lot of space when updating to no rows #2275

arcanaxion opened this issue Nov 23, 2024 · 0 comments · Fixed by #2277
Assignees
Labels
GUI: Front-End 💥Malfunction Addresses an identified problem. 🟩 Priority: Low Low priority and doesn't need to be rushed

Comments

@arcanaxion
Copy link

arcanaxion commented Nov 23, 2024

What went wrong? 🤔

When the table updates to show no rows, it briefly takes up a lot of space before properly rendering no rows:

empty_table

I think it only happens when switching from no rows to no rows.

Steps to Reproduce Issue

Example code:

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

n_rows = 5
base_df = np.random.random((100, 10)).tolist()
df = base_df[:n_rows]

with tgb.Page() as page:
    tgb.toggle(theme=True)
    tgb.text("# Flickering table", mode="md")
    tgb.slider(value="{n_rows}")
    tgb.button("Refresh", on_action=lambda state: state.assign("df", base_df[:state.n_rows]))
    tgb.table("{df}")

    for _ in range(5):
        with tgb.part():
            tgb.text("# Example text", mode="md")

Gui(page).run(dark_mode=False)

It may also be seen in this simulation demo: https://supply-chain-monitoring.taipy.cloud/. Steps:

  1. Set iteration to 0 and view the "Open Delayed Orders" table
  2. Click the play button to run the simulation
  3. Observe the table briefly enlarging every time it updates from empty to empty

Screenshots

Video:

flickering_table.mp4

Browsers

Chrome, Firefox

OS

Windows, Linux

Version of Taipy

4.0.1

Acceptance Criteria

  • A unit test reproducing the bug is added.
  • Any new code is covered by a unit tested.
  • Check code coverage is at least 90%.
  • The bug reporter validated the fix.
  • Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@arcanaxion arcanaxion added the 💥Malfunction Addresses an identified problem. label Nov 23, 2024
@FredLL-Avaiga FredLL-Avaiga self-assigned this Nov 25, 2024
@FredLL-Avaiga FredLL-Avaiga added 🟩 Priority: Low Low priority and doesn't need to be rushed GUI: Front-End labels Nov 25, 2024
FredLL-Avaiga pushed a commit that referenced this issue Nov 25, 2024
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: Low Low priority and doesn't need to be rushed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants