-
-
Notifications
You must be signed in to change notification settings - Fork 391
Show 'About this version' for CivitAI models #1243
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: main
Are you sure you want to change the base?
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.
Hello @DenAbr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request adds a new feature to the StabilityMatrix application that displays the 'About this version' block from CivitAI models. This block often contains useful information specific to a particular model version. The changes include adding a new label to the resources file, a new property to the ModelVersionViewModel
to hold the version description, and an expander in the SelectModelVersionDialog
to display the description using a MarkdownViewer
control.
Highlights
- New Feature: Adds an expander to display the 'About this version' block from CivitAI models in the model version dialog.
- UI Enhancement: Improves the user interface by providing additional information about specific model versions.
- Localization: Adds a new localized string for 'Model Version Description'.
Changelog
Click here to see the changelog
- StabilityMatrix.Avalonia/Languages/Resources.Designer.cs
- Added a new resource string
Label_ModelVersionDescription
for localization.
- Added a new resource string
- StabilityMatrix.Avalonia/Languages/Resources.resx
- Added a new resource entry for
Label_ModelVersionDescription
with the value 'About this version'.
- Added a new resource entry for
- StabilityMatrix.Avalonia/ViewModels/Dialogs/ModelVersionViewModel.cs
- Added a
VersionDescription
property to store the HTML formatted version description. - Initialized the
VersionDescription
property with the model version's description, wrapped in HTML and a markdown-body class.
- Added a
- StabilityMatrix.Avalonia/Views/Dialogs/SelectModelVersionDialog.axaml
- Increased the number of rows in the main Grid to accommodate the new expander.
- Added an expander to display the
VersionDescription
using aMarkdownViewer
control. The expander is placed below the Model Description expander. - Moved the StackPanel containing the buttons to the next row to accommodate the new expander.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A version's tale,
In markdown's gentle embrace,
Knowledge now unfolds.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
CLA Assistant Lite bot CLA Assistant bot All Contributors have signed the CLA. |
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.
Code Review
This pull request introduces a new feature to display the 'About this version' block from CivitAI models within the Stability Matrix application. The changes involve adding a new UI element (Expander) to display the version description, along with corresponding resource strings and view model properties. Overall, the implementation seems reasonable, but there are a few areas that could be improved for clarity and maintainability.
Summary of Findings
- HTML formatting in ViewModel: The VersionDescription property in ModelVersionViewModel includes HTML formatting directly in the code. This approach mixes UI concerns with the ViewModel and could be improved by using a more flexible data structure or a dedicated formatting method.
- Resource string usage: The new resource string
Label_ModelVersionDescription
is used consistently across the application. This is good for localization and maintainability. - UI layout adjustments: The addition of the new Expander requires adjustments to the Grid's RowDefinitions. Ensure that the layout remains responsive and visually appealing across different screen sizes.
Merge Readiness
The pull request introduces a useful feature and is generally well-structured. However, the HTML formatting within the ViewModel should be addressed before merging to improve separation of concerns and maintainability. I am unable to directly approve this pull request, and other reviewers should review this code before merging.
I have read the CLA Document and I hereby sign the CLA |
Added an expander under the Model Description section to display the contents of the 'About this version' block from CivitAI.
This block often includes useful information for this specific version.