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

feat: allow users to use the app icon as the answer icon #7888

Merged
merged 7 commits into from
Sep 2, 2024

Conversation

kurokobo
Copy link
Contributor

@kurokobo kurokobo commented Sep 2, 2024

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

This PR adds configurable flags to use the app icons as the answer icons:

Installed Apps:
image

Shared Apps:
image

Embedded Chat:
image

Users can toggle this flag on the Edit App Info modals for the installed apps:
image

Or on the WebApp Settings modals for the shared apps:
image

Fixes #7504

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

  • Create new apps with various modes (chat, advanced-chat, completion, agent-chat, workflow) without any errors
  • Modify app settings for the apps with various modes (chat, advanced-chat, completion, agent-chat, workflow)
    • The switches are visible only if the app is chat, advanced-chat, or agent
    • I can toggle the switchs for the apps and values are stored in the DB
    • The switches shows the current value of the flag for the apps
  • I can see the app icons and icon backgrounds, or images are used as the answer icons if the flags are enabled
  • The same tests can be completed for the sites over shared app screens
  • The apps can be exported as DSLs, and the DSL files can be imported without any errors
    • with use_icon_as_answer_icon
    • without use_icon_as_answer_icon

NOTE

  • I didn't add a switch to the app's new creation screen because it's better for users to have fewer things to set up when starting out. This setting is totally optional and not something everyone needs to worry about.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 💪 enhancement New feature or request labels Sep 2, 2024
@crazywoola crazywoola self-assigned this Sep 2, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 2, 2024
@crazywoola crazywoola merged commit 80aa7c4 into langgenius:main Sep 2, 2024
7 checks passed
@kurokobo kurokobo deleted the answericon branch September 2, 2024 12:11
ZhouhaoJiang added a commit that referenced this pull request Sep 4, 2024
* refs/heads/main: (219 commits)
  Revert "fix: an issue of keyword search feature in application log list" (#7949)
  chore: #7943 i18n (#7948)
  fix(api): Code-Based Extension cause error on position map sorting (#7934)
  Chore/add roadmap (#7943)
  Chore/add default step 1x url (#7933)
  fix rerank model value is empty string (#7937)
  chore: #7603 i18n (#7931)
  Fix/segment create with api (#7928)
  improve the notion table extract (#7925)
  fix: frontend handle sometimes server not generate the wrong follow up data struct (#7916)
  feat: support auto generate i18n translate (#6964)
  chore: Update versions to 0.7.3 (#7895)
  chore(Dockerfile): Bump expat to 2.6.2-2 (#7904)
  fix: correct typo in the setting screen (#7897)
  feat: allow users to use the app icon as the answer icon (#7888)
  ignore linked images when image id is none (#7890)
  Add Russian language (#7860)
  fix: fixed typo on loading reranking_mode (#7887)
  Add perplexity search as a new tool (#7861)
  fix: glm models prices and max_tokens correction (#7882)
  ...

# Conflicts:
#	api/core/workflow/nodes/question_classifier/question_classifier_node.py
mehrajagdish pushed a commit to Sbazar-GmbH/dify that referenced this pull request Sep 6, 2024
cuiks pushed a commit to cuiks/dify that referenced this pull request Sep 26, 2024
idonotknow pushed a commit to AceDataCloud/Dify that referenced this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

please add support change chatbot icon to app icon
2 participants