-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
FR: #4048 - Add color customization to the chatbot #4885
FR: #4048 - Add color customization to the chatbot #4885
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. I've test it's functionality. LGTM, Although I have several comments:
- This configuration should limited to chatbot, chatflow, and agent, but it appears in the setting modal in workflow and text generation as well. I think it should be hidden for these two types from the frontend.
- The checkbox, since it's not a standard UI widget in our application, but it's ok, I will ask our UI to check it out, maybe open a follow up PR for this later.
Hi, @crazywoola. I agree. I'll check that out as soon as I'm free. |
12d54f0
to
5e1a0cb
Compare
@crazywoola I've pushed the changes:
|
a4c3d6d
to
d8592df
Compare
Hello, sorry for the late response, I have fixed the CI based on several changes in our code base. :) |
Hi @crazywoola. I took a look and the theme is not working because of the following reason: The commit The following:
the Main component use the following relevant components:
The EmbeddedChatbot use a different set of components:
Apparently the Main component and its children are obsolete. So the solution would be to implement the style logic on the new I can give it a try, when I'm free. But what would happen with those components(the obsolete ones)? Maybe I can mark those with a |
@dromerolovo Yes please mark those with a |
This PR #5125 is intended for all chat components to use the components under the This PR #4379 also refactored the So @dromerolovo you can implement the style logic in the new components to achieve this functionality when you are free. Thanks for your contribution. By the way, there is a major update being planned regarding theme colors, which will support dark mode and make it easier to support more theme colors in this release, expected in August. |
2201537
to
4f6f2f1
Compare
@JzoNgKVO @crazywoola I've applied the theme to the new components. Hopefully is working. I need to make a quick fix in migrations though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FYI, as we are working on some new components such as checkboxes. |
fd8d66a
to
f6eefc5
Compare
* commit '8d9a45908397b3f3c0d56e86160bb97b5611b79b': (240 commits) fix: remove obsoleted 'version' elements in compose files (langgenius#5553) chore: add a secondary confirmation dialog when the user delete the tool (langgenius#5634) fix: ro-RO is not a valid language (langgenius#5635) FR: langgenius#4048 - Add color customization to the chatbot (langgenius#4885) feat: tracing fe (langgenius#5487) feat: add ops trace (langgenius#5483) chore: cleanup test_delete_by_document_id method in opensearch vdb test (langgenius#5619) chore(pyproject.toml): Add Ruff formatter config. (langgenius#5627) Fix link to documentation of nodes (langgenius#5623) feat: undo/redo for workflow editor (langgenius#3927) fix: populate app configs to system environment variables (langgenius#5590) fix: DuckDuckGo image search tool error (langgenius#5606) delete the deprecated method (langgenius#5612) fix: context icon in chat (langgenius#5604) fix: Modify the incorrect configuration name for Google storage (langgenius#5595) feat: update issue template (langgenius#5592) chore: fix typo in config descriptions (langgenius#5585) fix: add support for FILE type in ToolParameterConverter (langgenius#5578) Fix/single run panel show parent scrollbar (langgenius#5574) refactor: extract cors configs into dify config and cleanup the config class (langgenius#5507) ... # Conflicts: # .github/workflows/build-push.yml # api/Dockerfile # api/core/helper/code_executor/code_executor.py # api/requirements.txt
* commit '17d2f0bb0d3c7618ed59968613175d2344fcbdc1': (145 commits) fix(api/configs): Ignore empty environment variables when loading config. (langgenius#5647) fix: type error in config (langgenius#5643) fix: remove obsoleted 'version' elements in compose files (langgenius#5553) chore: add a secondary confirmation dialog when the user delete the tool (langgenius#5634) fix: ro-RO is not a valid language (langgenius#5635) FR: langgenius#4048 - Add color customization to the chatbot (langgenius#4885) feat: tracing fe (langgenius#5487) feat: add ops trace (langgenius#5483) chore: cleanup test_delete_by_document_id method in opensearch vdb test (langgenius#5619) chore(pyproject.toml): Add Ruff formatter config. (langgenius#5627) Fix link to documentation of nodes (langgenius#5623) feat: undo/redo for workflow editor (langgenius#3927) fix: populate app configs to system environment variables (langgenius#5590) fix: DuckDuckGo image search tool error (langgenius#5606) delete the deprecated method (langgenius#5612) fix: context icon in chat (langgenius#5604) fix: Modify the incorrect configuration name for Google storage (langgenius#5595) feat: update issue template (langgenius#5592) chore: fix typo in config descriptions (langgenius#5585) fix: add support for FILE type in ToolParameterConverter (langgenius#5578) ... # Conflicts: # .github/workflows/build-push.yml # api/Dockerfile # api/requirements.txt
* refs/heads/main: (45 commits) fix: do not remove (#5682) Feature/add qwen llm (#5659) Fix docker command (#5681) feature: Add presence_penalty and frequency_penalty parameters to the … (#5637) Feat/fix ops trace (#5672) feat: xxo enhancement. (#5671) chore: rearrange python dependencies in groups (#5603) chore: delete unused resource (#5667) fix: knowledge retrieval score threshold setting (#5658) feat: add jina new pre-defined rerankers, include: jina-reranker-v2 (#5657) fix: tool call message role according to credentials (#5625) fix: HTTP request header is overwritten when user set Content-Type (#5628) chore: apply flake8-comprehensions Ruff rules to improve collection comprehensions (#5652) fix(api): language list (#5649) fix(api/configs): Ignore empty environment variables when loading config. (#5647) fix: type error in config (#5643) fix: remove obsoleted 'version' elements in compose files (#5553) chore: add a secondary confirmation dialog when the user delete the tool (#5634) fix: ro-RO is not a valid language (#5635) FR: #4048 - Add color customization to the chatbot (#4885) ... # Conflicts: # api/config.py # web/app/components/datasets/settings/form/index.tsx
Description
FR: Close #4048 - Add color customization to the chatbot
The scope of this PR is to apply customization only to the chatbot.
chatbot_color_theme
andchatbot_color_theme_inverted
to theSiteInfo
SettingsModal
to setchatbot_color_theme
andchatbot_color_theme_inverted
Because Tailwind doesn't support dynamic classes because of its JIT functionality I had to include styles
directly https://v2.tailwindcss.com/docs/just-in-time-mode#arbitrary-value-support It would've been nice to keep it with classes, but I think that It can't be done that way.
LIMITATIONS:
Fixes # (issue)
Type of Change
How Has This Been Tested?
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods (Kind of)optional
I have made corresponding changes to the documentationoptional
I have added tests that prove my fix is effective or that my feature worksoptional
New and existing unit tests pass locally with my changesI considered this change useful as stated in the Issue made previously:
How will this feature improve your workflow or experience?
It will improve the experience of developers and designers that want to include the embedded chatbot into a website that have clear or strict design requirements.
If you guys feel that this is not the way that you want to go, you can always let it fade into oblivion.