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

scroll chat down when non user scroll action #2315

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

FredLL-Avaiga
Copy link
Member

resolves #2281

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

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

Description

scroll down on every data change if no user scroll action

Related Tickets & Documents

How to reproduce the issue

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

messages = []


def evaluate(state, var_name: str, payload: dict):
    args = payload.get("args", [])
    state.messages.append(
        [len(state.messages), args[2], args[3]]
    )
    state.messages.append(
        [len(state.messages), "The MP5 is pretty fun to shoot actually, virtually no recoil", "Robot"]
    )
    state.messages = state.messages


with tgb.Page() as page_home:
    tgb.chat(
        messages="{messages}",
        on_action=evaluate,
        height="80vh",
    )

if __name__ == "__main__":
    Gui(page=page_home).run(title="2281 [🐛 BUG] Chat control should automatically scroll down when a new message is added")

@FredLL-Avaiga FredLL-Avaiga added 🟥 Priority: Critical Must be addressed as soon as possible 💥Malfunction Addresses an identified problem. 📝Release Notes Impacts the Release Notes or the Documentation in general GUI: Front-End labels Dec 10, 2024
@FredLL-Avaiga FredLL-Avaiga self-assigned this Dec 10, 2024
Copy link
Contributor

github-actions bot commented Dec 10, 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 454c263

Copy link
Contributor

github-actions bot commented Dec 10, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
19486 16952 87% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 454c263 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 2e8c6ba into develop Dec 12, 2024
135 checks passed
@FredLL-Avaiga FredLL-Avaiga deleted the bug/#2281-scroll-chat-down-when-no-user-action branch December 12, 2024 08:07
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 📝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] Chat control should automatically scroll down when a new message is added
2 participants