Skip to content

Conversation

@Dragon-Seeker
Copy link
Member

@Dragon-Seeker Dragon-Seeker commented Aug 2, 2025

Primarly this PR attempts to resolve various pain points found or head of when working with owo-config:

  • Better handling for various Data types that are commonly used (Supported Types below)
  • Adjust current builder functions that other users of the lib can use to remove the need for reflection on field directly
  • Add ability for different constraints for apply and input
  • Adjust sliders for changes that chyz desired
  • Config Sync
    • Inform server of changes that any client makes when connected to the server
    • Inform server of current connecting clients config values
  • Server Config Management
    • Ability to open server config if the given user has OP privilege's
    • Allow for the ability to reload server config from command
  • Multiple Configs under one given Mod
  • Pull changes from Chyz dealing with Sliders to allow for more customizability
  • UI Rework
    • Wrapping option labels to prevent them from being unreadable if too long
    • Adjust the slide out section selection to be an overlay instead of part of the primary config layout
    • Support Config switching similar to Create New World Screen top bar
  • Development Translation Key Utilities's
    • Print out the entire configs worth of translations with the current existing translations filled in
    • Ability to dump individual missing translations
      • Make custom font for better looking clipboard

Supported Types:

  • All Numbers (Integers and Floats)
  • String
  • Struct*
  • Record
  • Collections
    • List
      • String
      • Identifier
      • Numbers
      • Struct
      • Record
    • Set
      • String
      • Identifier
      • Numbers
      • Struct
      • Record
    • Map
      • Identifier - Identifier
      • Identifier - String
      • Identifier - Number
      • Identifier - Enum
      • String - Identifier
      • String - String
      • String - Number
      • String - Enum
      • Number - Identifier
      • Number - String
      • Number - Number
      • Number - Enum

- More supported types
- Better config Sync
- Server Config Management
- Ability to handle more than one config instance
- Slider Adjustments from Chyz
- Adjust how section headers are on the side
- Ability to switch between config instances
- Simple utility to copy translation key for missing translation in config
- Rework underling code to handle other types of objects and give better access to customize certain option calls without reflection

# Conflicts:
#	src/main/java/io/wispforest/owo/Owo.java
#	src/main/java/io/wispforest/owo/client/OwoClient.java
#	src/main/java/io/wispforest/owo/config/ConfigWrapper.java
#	src/main/java/io/wispforest/owo/config/ui/ConfigScreen.java
#	src/main/java/io/wispforest/owo/config/ui/ConfigScreenProviders.java
#	src/main/java/io/wispforest/owo/ui/base/BaseParentComponent.java
#	src/main/java/io/wispforest/owo/ui/component/LabelComponent.java
#	src/main/java/io/wispforest/owo/ui/container/Containers.java
#	src/main/java/io/wispforest/owo/ui/container/ScrollContainer.java
#	src/main/java/io/wispforest/owo/ui/core/OwoUIDrawContext.java
#	src/main/java/io/wispforest/owo/ui/core/Surface.java
#	src/main/java/io/wispforest/owo/ui/util/MatrixStackTransformer.java
#	src/main/resources/owo.accesswidener
#	src/testmod/java/io/wispforest/uwu/client/SelectUwuScreenScreen.java
…tation access

- Update Config Constraints to allow for different ones for input and apply
- Add proper way of dumping translation data using `ConfigTranslationHelper`
- Rework option annotation access around `AnnotatedElement`
…a `ToggleButton`

� Conflicts:
�	src/main/java/io/wispforest/owo/ui/component/ButtonComponent.java
�	src/main/java/io/wispforest/owo/ui/core/OwoUIDrawContext.java
@Noaaan
Copy link
Member

Noaaan commented Oct 21, 2025

Despite missing the last task (Make custom font for better looking clipboard), do you think this is ready for review? Might make the overall review process faster in case changes are needed

@Dragon-Seeker
Copy link
Member Author

Despite missing the last task (Make custom font for better looking clipboard), do you think this is ready for review? Might make the overall review process faster in case changes are needed

Overall, it's ready for initial reviews by people, as the reason for it being a draft is that when I opened the PR, I still needed to add some changes. I also planned to wait for glisco to do an initial review of the changes, as I felt they may have some issues with the changes.

- Adjust Constraints to have a type to indicate to users of the API what each predicate is used for
- Switch to only using endec for serialization and abstracting serialization of the given config wrapper to a ConfigSerializer allowing for other formats than just Jankson
- Update ModMenu annoation to use the modid of the config wrapper annotation
- Cleanup predicate handling for OptionComponents and use more statically defined methods
- Refactor location of code and remove commented out code combined with making code prettyer
@Dragon-Seeker Dragon-Seeker changed the base branch from 1.21.6 to 1.21.9 October 30, 2025 22:24
@Dragon-Seeker Dragon-Seeker changed the title [1.21.6] Configuration API Overhaul [1.21.10] Configuration API Overhaul Oct 30, 2025
@Dragon-Seeker Dragon-Seeker marked this pull request as ready for review October 30, 2025 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants