-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
💄 style: add sorting functionality for disabled models and model providers with tooltip support #10000
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
base: next
Are you sure you want to change the base?
Conversation
|
@bbbugg is attempting to deploy a commit to the LobeHub Community Team on Vercel. A member of the Team first needs to authorize it. |
Reviewer's GuideAdds alphabetical and default sorting toggles with tooltip support for disabled models and model providers, updating UI components and localization entries to enhance discoverability. Entity relationship diagram for updated localization entrieserDiagram
MODEL_PROVIDER {
string list_disabled
string list_enabled
object list_disabledActions
}
DISABLED_ACTIONS {
string sortAlphabetical
string sortDefault
string showMore
}
MODEL_PROVIDER ||--o{ DISABLED_ACTIONS : contains
Class diagram for updated DisabledModels and ProviderList componentsclassDiagram
class DisabledModels {
- showMore: boolean
- sortType: SortType
+ toggleSortType()
+ getSortTooltip()
+ sortedDisabledModels: Model[]
}
class ProviderList {
- open: boolean
- sortType: SortType
+ toggleSortType()
+ getSortTooltip()
+ sortedDisabledProviders: Provider[]
}
class SortType {
<<enumeration>>
Alphabetical
Default
}
DisabledModels --> SortType
ProviderList --> SortType
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
👍 @bbbugg Thank you for raising your pull request and contributing to our Community |
TestGru AssignmentSummary
Tip You can |
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.
Hey there - I've reviewed your changes - here's some feedback:
- Extract SortType and the sorting logic into a shared utility or custom hook to avoid duplicating it in DisabledModels and ProviderList.
- Unify the i18n keys for the sort tooltips under a consistent namespace so both models and providers use the same translation paths.
- Since this PR adds new interactive sorting behavior, consider updating the commit/PR type from 'style' to 'feat' to better reflect the feature.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Extract SortType and the sorting logic into a shared utility or custom hook to avoid duplicating it in DisabledModels and ProviderList.
- Unify the i18n keys for the sort tooltips under a consistent namespace so both models and providers use the same translation paths.
- Since this PR adds new interactive sorting behavior, consider updating the commit/PR type from 'style' to 'feat' to better reflect the feature.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## next #10000 +/- ##
==========================================
+ Coverage 81.90% 81.96% +0.05%
==========================================
Files 879 881 +2
Lines 56224 56754 +530
Branches 7692 7507 -185
==========================================
+ Hits 46051 46517 +466
- Misses 10173 10237 +64
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
d28b756 to
a006140
Compare
|
The data from localStorage needs to be read in systemStatus. You can check the related implementation in globalStore for reference.
Original ContentlocalStorage 的数据需要放到 systemStatus 这个里读取。可以看下 globalStore 的这块相关实现 |
…ders with tooltip support
…ding/descending options
…/descending functionality
a006140 to
69d4b49
Compare
| ) as SortType) || SortType.Default, | ||
| ); | ||
|
|
||
| useEffect(() => { |
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.
const sortType = useGlobalStore(systemStatusSelectors.disabledModelProvidersSortType)
不需要再包一层 useState 和 useEffect
5246742 to
fc09cc8
Compare

💻 Change Type
🔗 Related Issue
🔀 Description of Change
给未开启的模型新增按字母排序、按发布时间排序功能。
给未开启的模型服务商新增按字母排序功能。
排序方式保存在浏览器缓存。
🧪 How to Test
📸 Screenshots / Videos
模型服务商列表
模型列表
📝 Additional Information
Summary by Sourcery
Add alphabetical sorting toggle for disabled models and providers with tooltip support.
Enhancements:
Documentation: