CustomizePlus icon indicating copy to clipboard operation
CustomizePlus copied to clipboard

[New Feature Implementation Details] Ability to keep current profile active while using template editor

Open RisaDev opened this issue 5 months ago • 3 comments

This is a quickly thrown together version of architecture/changes for feature which will allow users to edit template while currently used profile is being applied to the character. Something might be missing or overlooked.

The feature is up for grabs to anyone willing to work on it.

  • Add checkbox into template editor which allows choosing if currently active profile should be applied in editor
    • Checkbox value should be saved in configuration.
    • Changing the toggle should apply changes in realtime without losing current template edits.
    • When this toggle is enabled the entire right panel in "Profiles" menu should be locked, right now only "Enabled" checkbox is locked.
      • Unlocking of "Enabled" option can be considered instead to allow user to switch between profiles during editing but this should be thoroughly tested and needs to be handled by TemplateEditorManager (will likely need to listen to profile changes events and rebuild EditorProfile while not resetting CurrentlyEditedTemplate)
  • Checkbox changing should call TemplateChanged event with new types ActiveProfileApplicationEnabled and ActiveProfileApplicationDisabled based on the value of checkbox.
    • All of the code handling TemplateChanged events should be altered to handle those 2 new events properly.
  • When entering editor/enabling the toggle/changing editor character TemplateEditorManager should add all of the templates from profile currently affecting the editor character into the EditorProfile. CurrentlyEditedTemplate should be added at the end of the list to override any values provided by profile templates.
  • When disabling the toggle TemplateEditorManager should only keep CurrentlyEditedTemplate in the templates of EditorProfile.

RisaDev avatar Sep 07 '25 13:09 RisaDev

I gave it a shot, maybe you can use it? If not or if something is off let me know. I am not familiar with all the features, but I think I understood.

https://github.com/Aether-Tools/CustomizePlus/compare/main...jackandcarter:CustomizePlus:main

Sorry if this is not correct. I am not too familiar with contributing to other's projects in GitHub, but I like to help.

Edit: Also I did not build test yet, as im on Mac, and need to change deps so I didn't want to do that in the changelog, for obvious reasons. I will try to build on my end to make sure the UI behaves properly if someone on windows doesn't test first. I know its just a matter of removing the windows dotnet flag in project and leaving it without that.

jackandcarter avatar Sep 09 '25 14:09 jackandcarter

Yeah I tried building with dotnet sdk which won't build with windows specific sdk things, if it was written using a more open source type logic then I'd be able to build test, but someone else will have to using the windows desktop sdk since this strictly requires it.

anything with Microsoft.NET.Sdk.WindowsDesktop is tied to WinForms/WPF and just isn’t supported on macOS/Linux. You’d spend a lot of time fighting the SDK only to end up needing Windows anyway.

If someone could test this and let me know if there are any build issues I would help fix them if any.

Also, in the future, if you are interested, I could rework some of the requirements so they are not windows specific only and can be built in multiple platforms. Just putting that out there. Dalamud doesn't require this specific SDK ;)

Either way, I really do hope this helps you achieve the feature you are after.

jackandcarter avatar Sep 09 '25 14:09 jackandcarter

Hello, thank you for your attempt at working on this.

Unfortunately, unless someone else chimes in, your attempt will be stuck as I don't have time or resources to test other people's functionality thoroughly. As per contribution guidelines - things should be tested to run reasonably well by the contributor themselves before being considered to be merged. I've asked in our dev channel if anyone will be willing to help you test it but that's about all I can do.

In regards to your commentary about things being windows-centric - this is just the nature of how things are. Target build/run platform for most Dalamud plugins is Windows and there has been no one so far who is interested in maintaining multiplatform support for Customize+. If you are willing to make things more multiplatform-friendly you are free to do so, but I will be expecting it to be tested to not break our build process or any existing functionality while running on any platform. (including first and foremost Windows and then Linux)

RisaDev avatar Sep 12 '25 21:09 RisaDev