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

chat: add a mode specific class to the messages #1812

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

FredLL-Avaiga
Copy link
Member

@FredLL-Avaiga FredLL-Avaiga commented Sep 20, 2024

resolves #1807

with tgb.Page() as page:
    tgb.toggle(theme=True)
    tgb.chat(
        "{conversation}",
        users=users,
        on_action=send_message,
        sender_id="Human",
        show_sender=True,
        height="80vh",
        mode="raw",
    )

@FredLL-Avaiga FredLL-Avaiga added 🟥 Priority: Critical Must be addressed as soon as possible 📈 Improvement Improvement of a feature. GUI: Front-End labels Sep 20, 2024
@FredLL-Avaiga FredLL-Avaiga self-assigned this Sep 20, 2024
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.22592825676526%

St.
Category Percentage Covered / Total
🟢 Statements
87.68% (+0.01% 🔼)
3196/3645
🟡 Branches
69.23% (+0.04% 🔼)
2200/3178
🟢 Functions
83% (+0.02% 🔼)
586/706
🟢 Lines
88.22% (+0.01% 🔼)
2958/3353

Test suite run success

647 tests passing in 43 suites.

Report generated by 🧪jest coverage report action from ca614ab

Copy link
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
19343 16287 84% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: ca614ab 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.

Let's talk before I approve/reject

<Paper
sx={sender ? senderPaperSx : otherPaperSx}
data-idx={index}
className={getSuffixedClassNames(className, "-" + mode)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have called these classes
taipy-chat-<mode>-[incoming|outgoing]-message
and probably add
taipy-chat-[incoming|outgoing]-message as well
and maybe add
taipy-chat-message

What say you?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a class earlier in the hierarchy taipy-chat-received taipy-chat-sent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that enough for you ? @FabienLelaquais

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is!

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.

👌

<Paper
sx={sender ? senderPaperSx : otherPaperSx}
data-idx={index}
className={getSuffixedClassNames(className, "-" + mode)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is!

@FredLL-Avaiga FredLL-Avaiga merged commit bd26501 into develop Sep 20, 2024
160 checks passed
@FredLL-Avaiga FredLL-Avaiga deleted the feature/chat-mode-class branch September 20, 2024 13:24
@FabienLelaquais FabienLelaquais added the 📝Release Notes Impacts the Release Notes or the Documentation in general label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI: Front-End 📈 Improvement Improvement of a feature. 🟥 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.

Chat controls support different rendering mode like Text
3 participants