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

enhancement: update thumbnail chat width option setting #4284

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Dec 17, 2024

Describe Your Changes

  1. Image Updates and Additions:

    • New image files compact-width-dark.png and full-width-dark.png are added to web/public/images/.
    • Existing images compact-width.png and full-width.png have been modified.
  2. Component Updates in index.tsx:

    • A new import for twMerge from tailwind-merge to handle Tailwind CSS class merging has been added.
    • The useTheme hook now also retrieves the theme variable, in addition to setTheme.
    • The chatWidthOption array is updated to include darkImg properties for each width option.
    • The src attribute of the <img> tag is now conditionally set based on the theme: it uses option.darkImg if the theme is 'dark', and option.img otherwise.
    • The <label> no longer contains a radio <input>. Instead, it directly triggers the setChatWidth(option.value) action using an onClick event.
    • Additional SVG rendering logic has been added to visually indicate the selected chat width, showing a checkmark icon when an option is selected.

These changes suggest updates to improve the theming capabilities of an application, specifically around handling light and dark themes more gracefully in the appearance settings UI.

Fixes Issues

CleanShot 2024-12-17 at 21 20 25

CleanShot 2024-12-17 at 21 20 32

CleanShot 2024-12-17 at 21 20 38

CleanShot 2024-12-17 at 21 20 46

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed
    Uploading CleanShot 2024-12-17 at 21.20.32.png…

@urmauur urmauur added the type: enhancement Improves a current feature label Dec 17, 2024
@urmauur urmauur added this to the v0.5.12 milestone Dec 17, 2024
@urmauur urmauur requested a review from louis-jan December 17, 2024 14:28
@urmauur urmauur self-assigned this Dec 17, 2024
Copy link
Contributor

Barecheck - Code coverage report

Total: 69.1%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@urmauur urmauur merged commit d12408c into dev Dec 19, 2024
21 checks passed
@urmauur urmauur deleted the enhancement/change-thumbail-chat-width branch December 19, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improves a current feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Add Chat Width settings option for Threads
2 participants