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

Tweak Chat Message CSS to center text #6135

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Dec 27, 2023

Before this PR, integer objects were not centered:

import panel as pn
pn.extension()

pn.Column(*[pn.chat.ChatMessage(i) for i in range(100)], height=500).show()
image

After:
image

Strings align properly with/without the change:

import panel as pn
pn.extension()

pn.Column(*[pn.chat.ChatMessage(f"{i}") for i in range(100)], height=500).show()
image

@ahuang11 ahuang11 changed the title Tweak center alignment Tweak Chat Message CSS to center text Dec 27, 2023
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5b5dda6) 84.66% compared to head (852cc2a) 84.67%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6135      +/-   ##
==========================================
+ Coverage   84.66%   84.67%   +0.01%     
==========================================
  Files         296      296              
  Lines       44160    44160              
==========================================
+ Hits        37388    37394       +6     
+ Misses       6772     6766       -6     
Flag Coverage Δ
ui-tests 40.74% <ø> (+<0.01%) ⬆️
unitexamples-tests 72.58% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

Makes total sense to me but can you confirm that this doesn't cause any issues with other content, markdown, images, etc.?

@ahuang11
Copy link
Contributor Author

Since message class only gets added to Markdown, I think it doesn't cause issues:

image image image image image

@philippjfr philippjfr merged commit 46e0639 into main Dec 27, 2023
11 of 13 checks passed
@philippjfr philippjfr deleted the tweak_message_alignment branch December 27, 2023 23:45
philippjfr pushed a commit that referenced this pull request Jan 17, 2024
This was referenced Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants