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

Add toggle icon #6034

Merged
merged 15 commits into from
Dec 15, 2023
Merged

Add toggle icon #6034

merged 15 commits into from
Dec 15, 2023

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Dec 12, 2023

Closes #6022

To be used for ChatReactionIcons

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (3448cdd) 84.67% compared to head (98ebe5a) 84.70%.

Files Patch % Lines
panel/tests/ui/widgets/test_icon.py 94.23% 3 Missing ⚠️
panel/chat/icon.py 94.11% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6034      +/-   ##
==========================================
+ Coverage   84.67%   84.70%   +0.03%     
==========================================
  Files         291      295       +4     
  Lines       43816    43885      +69     
==========================================
+ Hits        37101    37173      +72     
+ Misses       6715     6712       -3     
Flag Coverage Δ
ui-tests 40.72% <58.43%> (+0.07%) ⬆️
unitexamples-tests 72.80% <68.67%> (-0.06%) ⬇️

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.

@philippjfr
Copy link
Member

Good start! Next we probably have to create and sync a bunch properties between this wrapper and the underlying icon model.

@ahuang11
Copy link
Contributor Author

ahuang11 commented Dec 14, 2023

Okay this is ready for the next release I think! Feel free to make changes directly as needed.

A couple notes for future enhancements: #6037

  1. if the icon does not exist, it shows absolutely nothing
  2. support SVG

ToggleIcon

Screen.Recording.2023-12-13.at.7.52.38.PM.mov

ChatMessage (made it more efficient!)

Screen.Recording.2023-12-13.at.7.54.56.PM.mov

@ahuang11 ahuang11 marked this pull request as ready for review December 14, 2023 04:02
panel/models/icon.ts Outdated Show resolved Hide resolved
panel/models/icon.ts Outdated Show resolved Hide resolved
panel/widgets/icon.py Outdated Show resolved Hide resolved
@philippjfr philippjfr merged commit 88b676b into main Dec 15, 2023
13 checks passed
@philippjfr philippjfr deleted the add_toggle_icon branch December 15, 2023 10:24
philippjfr pushed a commit that referenced this pull request Dec 15, 2023
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.

Tabler Icon no longer hosts static URLs for its icons so ChatReactionIcons is broken
2 participants