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] Chat control should automatically scroll down when a new message is added #2281

Open
1 of 7 tasks
AlexandreSajus opened this issue Nov 26, 2024 · 0 comments
Open
1 of 7 tasks
Labels
GUI: Front-End 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon

Comments

@AlexandreSajus
Copy link
Contributor

AlexandreSajus commented Nov 26, 2024

What went wrong? 🤔

This issue comes from a customer who needs to solve this in December.

When a new message is added in the chat control, the chat should (or should at least have the option to) automatically scroll down to see the new message, even if the chat is not scrolled all the way down.

Steps to Reproduce Issue

Using the following:

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

messages = []


def evaluate(state, var_name: str, payload: dict):
    state.messages.append(
        [10, "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",
    )

gui = Gui(page=page_home)
gui.run()

Type a bunch of messages until there is no more space left in the chat control. The newer messages won't be visible unless you scroll.

Browsers

Chrome

OS

Windows

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)
@AlexandreSajus AlexandreSajus added 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon GUI: Front-End labels Nov 26, 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: High Must be addressed as soon
Projects
None yet
Development

No branches or pull requests

1 participant