-
Notifications
You must be signed in to change notification settings - Fork 0
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: display settings in preferences #13
feat: display settings in preferences #13
Conversation
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.
Few changes required
/// <summary> | ||
/// Use to define custom tabbed menu | ||
/// </summary> | ||
/// <param name="tabsButtons"><see cref="ButtonStrip"/> buttons used to switch between tabs</param> | ||
/// <param name="tabsContainer"><see cref="ScrollView"/> the container that will display the contents of the tabs</param> | ||
public TabController(ButtonStrip tabsButtons, ScrollView tabsContainer) | ||
{ | ||
m_TabsButtons = tabsButtons; | ||
m_TabsContainer = tabsContainer; | ||
|
||
Init(); | ||
} |
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.
Let's avoid keeping unused constructor(all unused code). When it will be necessary it will be added as separated task
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.
Removed
if (!m_Tabs.Any()) | ||
{ | ||
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.
This part of code can be used before foreach (var tab in m_Tabs) to avoid additional foreach state check
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.
Moved
SettingsScope.User, | ||
new[] { "stan", "plugin", "dev", "kit" }) | ||
{ | ||
label = "About" |
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 guess it must be - Plugin Dev Kit
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.
Restructured
} | ||
|
||
var packageInfo = GetPackageInfo(); | ||
rootElement.Q<Label>("display-name").text = packageInfo.displayName.Remove(0, "Stans Assets - ".Length); |
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.
typos in Stans assets -> Stan's Assets
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.
Restructured
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.
Good work! But still needs some love.
Added the video + script below with all the details.
bandicam.2023-05-10.12-54-35-613.mp4
- Switching between Group and page
- Changes doesnt represent when 2 winows are open
- TabController mimics base PackageWindow
- Registration process (attribute)? Activator.CreateInstance?
3.1 GetPackageInfo should reused for registration (keywords, name etc) - PackagePreferencesWindow.cs line 31
- CONTRIBUTING.md meta spams (foundation package update from 1.0.16 to 1.0.27)
… with TabController
Fixed - Switching between Group and page Please take a look at #12 - I need these changes for other features too |
All the changes merged with newer PR, that's why this PR is going to be closed. |
Purpose of this PR
Implemented feature #11
Testing status
Manual testing status
Tested manually in using for the Package Manager plugin
Comments to reviewers
1. Added the About page in user preferences (screenshot), which will display "about us" info and at the same time I referenced its code as a simple example of implementing preferences window. What do you think about it?
2. Implemented public TabController that can be useful for developing other plugins, and StansAssets.Plugins.Editor.PackageSettingsWindow<> can use it too (instead of ButtonStrip+ScrollView). It would be better to add it in another PR but PackagePreferencesWindow is dependent on it.
About page
Reference example