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

💄 style : Add an "Assistant and Conversation" icon #2357

Closed
wants to merge 14 commits into from

Conversation

RubuJam
Copy link
Contributor

@RubuJam RubuJam commented May 3, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • ⚡️ perf
  • 📝 docs

🔀 变更说明 | Description of Change

Add an "Assistant and Conversation" icon
添加一个 “助手与对话” 的图标

📝 补充信息 | Additional Information

Copy link

vercel bot commented May 3, 2024

@RubuJam is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

👍 @RubuJam

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@RubuJam
Copy link
Contributor Author

RubuJam commented May 3, 2024

@arvinxx Could you tell me which part of the code controls the display and hiding of this component? I couldn't find this part of the code, so I've put in onClick={} // Click event to be added,I haven't added the click event yet. I want to get it perfect.
photo

@arvinxx 想请教一下,这个部件的展示和隐藏是哪部分代码控制的,我没找到这部分代码,以至于onClick={} // 点击事件待添加这一行代码还空着,我想去完善它
photo

@arvinxx
Copy link
Contributor

arvinxx commented May 3, 2024

这个助手与会话的图标是哪来干什么的?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Where do these assistant and session icons come from?

@RubuJam
Copy link
Contributor Author

RubuJam commented May 3, 2024

这个助手与会话的图标是哪来干什么的?

控制图中整体的展示与隐藏,类似于右上角的角色与纪录按钮,主要是当前的点击方式,在iPad设备上不好触发
photo

The display and hiding of the controls in the control chart is similar to the "Roles and Records" button in the upper right corner, which is mainly the current click mode, which is not easy to trigger on iPad devices.

@arvinxx
Copy link
Contributor

arvinxx commented May 4, 2024

实现在这里:https://github.com/lobehub/lobe-chat/blob/main/src/features/FolderPanel/index.tsx#L37

使用这个方法:

 updatePreference({
          sessionsWidth: expand ? 320 : 0,
          showSessionPanel: expand,
        });

@arvinxx
Copy link
Contributor

arvinxx commented May 4, 2024

另外我不建议放侧边栏哈,因为这个 session 是 /chat 页面才有的,比较合适的位置应该是收起 session 后在 header 左侧展示。这样的话是可以做到和右侧的收起完全对称的逻辑。

image

很多 macOS 的应用都是这么搞的

Copy link

codecov bot commented May 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.97%. Comparing base (44b29a9) to head (42d4e0d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2357   +/-   ##
=======================================
  Coverage   92.97%   92.97%           
=======================================
  Files         301      301           
  Lines       17401    17401           
  Branches     1256     1255    -1     
=======================================
  Hits        16178    16178           
  Misses       1223     1223           

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

@RubuJam RubuJam marked this pull request as ready for review May 4, 2024 07:36
@RubuJam
Copy link
Contributor Author

RubuJam commented May 4, 2024

另外我不建议放侧边栏哈,因为这个 session 是 /chat 页面才有的,比较合适的位置应该是收起 session 后在 header 左侧展示。这样的话是可以做到和右侧的收起完全对称的逻辑。

image 很多 macOS 的应用都是这么搞的

@arvinxx 这个图标只有在 /chat 页面才会显示,其余情况都不会显示,如果放在图中位置,收缩的时候会显得很突兀。另外我只更新了common文件,但我使用i18n翻译后,同一文件夹下的其余文件的末尾都产生了一个修改,或许是一个bug?(使用的是@lobehub/seo-cli@1.4.1)

This icon will only be displayed on the /chat page, and will not be displayed in other situations. If the position shown in the picture, it will appear very abrupt when it shrinks. In addition, I only updated the common file, but after I translated it using i18n, there was a modification at the end of the other files in the same folder. Maybe it is a bug?(Using @lobehub/seo-cli@1.4.1)

@arvinxx
Copy link
Contributor

arvinxx commented May 5, 2024

commit 走一下 commit 的 lint,应该就能移除空格。另外切换的按钮我建议还是放在 header 左侧。如果觉得突兀加个滑动的动效应该就行。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Commit the lint of commit and you should be able to remove the spaces. In addition, I recommend that the switching button be placed on the left side of the header. If it feels awkward, just add a sliding animation.

@RubuJam
Copy link
Contributor Author

RubuJam commented May 6, 2024

commit 走一下 commit 的 lint,应该就能移除空格。另外切换的按钮我建议还是放在 header 左侧。如果觉得突兀加个滑动的动效应该就行。

@arvinxx 切换的按钮已经改为在 header 左侧

The switching button has been changed to the left side of the header

@RubuJam RubuJam closed this May 7, 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.

3 participants