polish(api): finalize 4.0.0 public API + navigator/status fixes#475
Merged
Conversation
API freeze prep: - Stamp every "@SInCE TODO" as "@SInCE 4.0.0" - Document the compare-by-id equality contract on BuildWorldStatus and NavigatorCategory (the enum-era "==" no longer holds) - Add NavigatorCategory#getStyledName() to match BuildWorldStatus - Make WorldStatusRegistry#getStatus accept @nullable, matching getCategory - Remove the unused BuildWorldStatus#isVisibleInNavigator(); navigator visibility is decided by category membership - Correct the isBuiltIn / getCategoryForWorld docs to match real behaviour Fixes: - StatusMenu: lay the status grid out row by row so a large status count can no longer overflow the inventory and throw - NavigatorLayoutMenu: never hand out the settings slot as free, and don't strand a displaced category at slot -1 - Re-home a deleted category's folders to the default so they (and the worlds inside them) stay reachable - Resolve navigator category heads off-thread instead of blocking the main thread on profile lookups - PlaceholderAPI %status% keeps its colour again - Derive custom-status permissions from the full id so two ids cannot collide - Handle legacy hex colour formats when migrating status display names Cleanup: - Extract the duplicated slug generator to StringUtils#uniqueId - Use getStyledName() at the category render sites Adds the 4.0.0 CHANGELOG.
…y status grid - Extract the category default-texture choice into ItemBuilder#categoryTexture so the synchronous ItemBuilder#icon and the asynchronous MenuItems#renderCategoryIcon share one rule instead of duplicating it. - rehomeFolders: collect the re-homed folders and persist them in a single batch write instead of a full-file write per folder, fetching the storage once. - StatusMenu: make the content-row count the single source for both the grid capacity and the inventory size, dropping the +2/-2 border round-trip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #474 (the dynamic world statuses & navigator categories feature, already on
master). This is the 4.0.0 API-freeze polish plus the bug fixes and cleanup found while reviewing that work. It is exactly the delta on top ofmaster, so it merges cleanly.Public API (freezing in 4.0.0)
@since TODOas@since 4.0.0.BuildWorldStatus/NavigatorCategory(they are interfaces now, so the enum-era==no longer holds).NavigatorCategory#getStyledName()to matchBuildWorldStatus.WorldStatusRegistry#getStatusaccepts@Nullable, matchinggetCategory.BuildWorldStatus#isVisibleInNavigator()— navigator visibility is decided by category membership.BuildWorld#asProfileable()removal and correct theisBuiltIn/getCategoryForWorlddocs.Fixes
StatusMenu: lay the grid out row by row so a large status count can't overflow the inventory and throw.NavigatorLayoutMenu: never hand out the settings slot as free; don't strand a displaced category at slot -1.PlaceholderAPI%status%keeps its colour again.Cleanup
StringUtils#uniqueId(shared slug generator) andItemBuilder#categoryTexture(shared default-texture rule).StatusMenugrid math.Adds the 4.0.0
CHANGELOG.md. Build + core tests pass.