-
-
Notifications
You must be signed in to change notification settings - Fork 247
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: New Setting UI. #955
Conversation
Tailwind PR is merged! This one can rebase master now. |
Thanks for integrating with the latest tokens! Before I dive into the implementation, I have a few pieces of feedback on the UI
I built an alternative version with V0. Please feel free to use it as a reference. https://v0.dev/chat/F2dDiCZXeX2?b=b_1x2gOAr4gtO
|
@Emt-lin This is a major milestone, very nice and clean! Congrats! Once this gets released I will bump the version to v2.8 🚀 ! +1 for everything @zeroliu said. Here are some of my own initial observations:
|
d4a8623
to
0e6efaf
Compare
Very close to the finishing line! This is the biggest change we have before the official launch. It would be awesome if we can ship this in less than a week. Thanks for your hard work on this!! @Emt-lin Some more comments:
Just some reorganization, overall looks great and 100x better than what I have now! 👍 |
@@ -73,6 +73,17 @@ export interface CustomModel { | |||
isBuiltIn?: boolean; | |||
enableCors?: boolean; | |||
core?: boolean; | |||
stream?: boolean; | |||
temperature?: number; | |||
context?: number; |
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.
What is context
? I assume you mean maxToken
?
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.
What is
context
? I assume you meanmaxToken
?
yeah, I will remove it in this PR. The next PR will implement the single model edit feature.
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.
Great, single model parameters is a first step to the "project" feature next. Each project has its own:
- Model key
- Model params
- User system prompt
- Subset of the index with inclusions filter
src/settings/SettingsPage.tsx
Outdated
if (!Platform.isMobile) { | ||
sections.render(<SettingsMainV2 plugin={this.plugin} />); | ||
return; | ||
} |
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.
Does this mean mobile is still using the old settings? Do we plan to update mobile too in the future?
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.
Does this mean mobile is still using the old settings?
yes, maybe some componments will adopt new implementations in mobile devices.
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.
What's the reason why mobile can't work with the new settings? It will add overhead for us to maintain two versions of settings. I would highly recommend us to keep one version if possible
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.
@zeroliu Model list will continue to use old layout in mobile device.
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.
I will remove the old settings.
src/contexts/TabContext.tsx
Outdated
useEffect(() => { | ||
// fix | ||
if (!modalContainer) { | ||
const modal = document.querySelector(".modal-container") as HTMLElement; | ||
setModalContainer(modal); | ||
} | ||
}, []); |
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.
there is an eslint error here. Also what's the reason for this effect?
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.
Portal component need container arg. eg: select、dialog、popover
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.
Is there any reason why we need to specify the modal container as the portal container? I suggest using body directly like the current tooltip if possible. Radix uses body by default and because of obsidian special requirement, we need to attach the activeDocument body to it as containers. It will simplify the implementation a lot.
src/settings/SettingsPage.tsx
Outdated
if (!Platform.isMobile) { | ||
sections.render(<SettingsMainV2 plugin={this.plugin} />); | ||
return; | ||
} |
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.
What's the reason why mobile can't work with the new settings? It will add overhead for us to maintain two versions of settings. I would highly recommend us to keep one version if possible
e3409fa
to
ee2ea06
Compare
@zeroliu @logancyang Embedding Model title has already modified, but I don't want to modify the implementation of the dialog. If there is a lot of feedback after launching the |
I think this is lgtm generally. One potential caveat: we actually do not allow deleting core models at the moment (the code was lost from before), but that's actually a good thing because we allow deleting the "default chat model" with this new UI. Since gpt 4o is the top chat model in our builtin models, deleting a default chat model automatically sets the default to gpt 4o which is not deletable. This is an acceptable behavior now. Just wanted to point it out. |
@zeroliu let me know when you think this is ready to merge and I'll merge it. |
Merging now. Will follow up with minor updates in the future according to user feedback. Huge congrats @Emt-lin !!! 🚀🚀🚀 |
New Setting UI.
I tested some popular themes. It's work well in light/dark mode.