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

🐛 fix: user feedback for empty/long group names in create/edit group modals #6247

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

ramu-narasinga
Copy link
Contributor

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

To show an alert when the user submits an empty or long group name in Create Group and Rename Group Modals.

📝 补充信息 | Additional Information

  1. Removed the below if block in CreateModal
 onOk={async (e: MouseEvent<HTMLButtonElement>) => {
            if (!input) return;

To allow the input length check that shows an alert if the title does not meet the criteria.

  1. Removed the below if block in RenameGroupModal
 onOk={async (e: MouseEvent<HTMLButtonElement>) => {
            if (!input) return;

To allow the input length check that shows an alert if the title does not meet the criteria.

2.1 And this forced to ensure types are valid for input state variable, as a result input state is initialized to '' (empty string - following the same convention in CreateGroupModal)

const [input, setInput] = useState<string>('');

2.2 Added fallback to empty string in the onCancel, in case the group.name is empty.

onCancel={(e) => {
        setInput(group?.name ?? '');
        onCancel?.(e);
      }}

Copy link

vercel bot commented Feb 17, 2025

@ramu-narasinga is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 17, 2025
@lobehubbot
Copy link
Member

👍 @ramu-narasinga

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.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added the 🐛 Bug Something isn't working | 缺陷 label Feb 17, 2025
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.69%. Comparing base (a46eadf) to head (ca55204).
Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6247    +/-   ##
========================================
  Coverage   91.69%   91.69%            
========================================
  Files         681      681            
  Lines       62025    62113    +88     
  Branches     4288     4489   +201     
========================================
+ Hits        56872    56954    +82     
- Misses       5153     5159     +6     
Flag Coverage Δ
app 91.69% <ø> (+<0.01%) ⬆️
server 97.90% <ø> (ø)

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.

Copy link

vercel bot commented Feb 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2025 8:10am

@arvinxx arvinxx changed the title fix: user feedback for empty/long group names in create/edit group modals 🐛 fix: user feedback for empty/long group names in create/edit group modals Feb 17, 2025
@arvinxx arvinxx merged commit 25c80d1 into lobehub:main Feb 17, 2025
12 of 17 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @ramu-narasinga ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Feb 17, 2025
### [Version&nbsp;1.60.3](v1.60.2...v1.60.3)
<sup>Released on **2025-02-17**</sup>

#### 🐛 Bug Fixes

- **misc**: User feedback for empty/long group names in create/edit group modals.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: User feedback for empty/long group names in create/edit group modals, closes [#6247](#6247) ([25c80d1](25c80d1))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.60.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Feb 17, 2025
## [Version&nbsp;1.101.0](v1.100.0...v1.101.0)
<sup>Released on **2025-02-17**</sup>

#### ✨ Features

- **misc**: Add SambaNova provider support, add volcengine as a new provider.

#### 🐛 Bug Fixes

- **misc**: Fix agent config not load correctly, fix loading on not login for db, fix model list issue in client mode, user feedback for empty/long group names in create/edit group modals.

#### 💄 Styles

- **misc**: Add o1 vision metadata, update Jina AI Provider name & model info.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Add SambaNova provider support, closes [lobehub#6218](https://github.com/bentwnghk/lobe-chat/issues/6218) ([a46eadf](a46eadf))
* **misc**: Add volcengine as a new provider, closes [lobehub#6221](https://github.com/bentwnghk/lobe-chat/issues/6221) ([09bf8f0](09bf8f0))

#### What's fixed

* **misc**: Fix agent config not load correctly, closes [lobehub#6252](https://github.com/bentwnghk/lobe-chat/issues/6252) ([fe9bc16](fe9bc16))
* **misc**: Fix loading on not login for db, closes [lobehub#6258](https://github.com/bentwnghk/lobe-chat/issues/6258) ([61692b9](61692b9))
* **misc**: Fix model list issue in client mode, closes [lobehub#6240](https://github.com/bentwnghk/lobe-chat/issues/6240) ([d6c6cda](d6c6cda))
* **misc**: User feedback for empty/long group names in create/edit group modals, closes [lobehub#6247](https://github.com/bentwnghk/lobe-chat/issues/6247) ([25c80d1](25c80d1))

#### Styles

* **misc**: Add o1 vision metadata, closes [lobehub#6263](https://github.com/bentwnghk/lobe-chat/issues/6263) ([261d068](261d068))
* **misc**: Update Jina AI Provider name & model info, closes [lobehub#6243](https://github.com/bentwnghk/lobe-chat/issues/6243) ([ddbe482](ddbe482))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
likaiqiang pushed a commit to likaiqiang/lobe-chat that referenced this pull request Feb 26, 2025
likaiqiang pushed a commit to likaiqiang/lobe-chat that referenced this pull request Feb 26, 2025
### [Version&nbsp;1.60.3](lobehub/lobe-chat@v1.60.2...v1.60.3)
<sup>Released on **2025-02-17**</sup>

#### 🐛 Bug Fixes

- **misc**: User feedback for empty/long group names in create/edit group modals.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: User feedback for empty/long group names in create/edit group modals, closes [lobehub#6247](lobehub#6247) ([25c80d1](lobehub@25c80d1))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 released size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants