Conversation
|
If you've previously used |
…y, and added a ToolTip for the PleasantDrawer close button + Smooth horizontal scrolling is implemented if the user presses the Shift key. + You can now specify the direction in which scrolling will occur using the mouse wheel. + Added link to original code
…f redundant functionality, and more
|
It appears that all code used for this project has been attributed according to the SPDX standard. If I've missed anything or formatted it incorrectly, please let me know. |
|
Thanks to the Composition renderer, I was able to implement smooth movement of elements PleasantUI.Example.Desktop_KPTHCrnkr3.mp4 |
|
The smoothed element movement looks great! :) Glad to see you're refining the NavigationView as well, it was a little strange the way it works. I take it the VGUI theme got deleted as part of the AI code cleanup? Don't get me wrong I'd probably never have used it, and it wasn't exactly in keeping with the rest of the themes, but it did look kinda cool I guess. |
Yes, I had to remove VGUI (PR #11) for several reasons:
These reasons are mainly due to the inability to customize this theme. Perhaps in the future, full editing of not only colors but also parameters will be implemented, but definitely not within the scope of this PR. There's still a lot of work to do before we can deliver a good library to developers (making it perfect is quite difficult, and sometimes even impossible) |
|
I would like to answer questions that customers may have regarding the source code generator and analyzer. How can I use localization keys?It's very simple. For convenience, create an using Avalonia.Metadata;
[assembly: XmlnsDefinition("https://github.com/avaloniaui", "PleasantUI.Core.Localization")]You can now use a key in AXAML files; the IDE will automatically suggest keys for you: <TextBlock Theme="{DynamicResource TitleTextBlockTheme}"
TextAlignment="Center"
TextWrapping="Wrap"
Text="{Localize {x:Static LocKey.WelcomeToPleasantUI}}"/> This will also be accessible through C# code by simply specifying an Enum. Does the generator support multiple resx files?Yes! For the example application, I specifically separated the localization files: one is for library strings only, and the other is used in the final application. How does the analyzer work?The analyzer searches the code for all references to localization keys, and it doesn't matter whether you use a string or insert it via Enum. The library contains localization strings. What happens to them if I include them in my application?The analyzer will have a built-in list of keys that are in the library by default. This means the analyzer will not consider these keys when searching for unused ones. |
|
I would like to thank contributor @pieckenst for adding localization strings—and doing so in various ways. This helped create an analyzer capable of handling even the most unusual and complex cases to check for the use of localization keys within the project. Added unit tests for over 25 cases to the analyzer |
…he analyzer and generator
…SearchableComboBox improvements, test for PleasantUI.
…ing content display in the logical tree.
What does this PR do?
This PR is the first part of a broader initiative to improve the overall quality of the PleasantUI codebase. The work includes cleaning up existing implementations, improving consistency across the library, fixing issues, and introducing new functionality where appropriate.
While AI-assisted code generation can be a valuable tool, generated code still requires careful review, testing, and refinement to ensure it meets the project's quality standards and remains consistent with the rest of the codebase.
This initiative is not the only one and there will be more PR.
Some changes may break some projects, but I can't call it version 6. In the future, I will try to minimize such critical changes.
What was added?
PleasantIcon- This control allows developers to use any icons. By default, it supports conversions fromGeometryandIImage, and you can add them yourself, as is done for the sample app.PleasantUI.Example.Desktop_KPTHCrnkr3.mp4
ColorPicker- This control allows you to change colors on the fly. This makes theme editing much more fun and color selection faster.chrome_AQF7GiIQkj.mp4
The code has been updated with comments for authorship according to the SPDX standard.
SearchableComboBox- This control allows you to search for items without creating additional search functionality. It's still experimental, but the results are satisfactory.explorer_CcdDo2G8Rx.mp4
What was removed?
MaterialIconssource generator - This project should initially be internal to insert icons, assigning Geometry. With the newIconControl, the internalMaterialIconshould be removed.SmoothScrollViewer(finally!) - This control is too complex to maintain in the next major version of Avalonia. Instead, it has been replaced with an attached property implementation.PleasantReDock- This control is unstable; for some reason, it's in the core library but listed as being from the ToolKit. But the main reason is that it uses Xaml.Interactions.Interactivity to get its behavior, which can introduce reflection, which can interfere with AOT compilation.What's planned next?
ReplaceNavigationView refinementNavigationViewwith a better solution. Honestly, I don't like the current implementation of this control.