fix: pin Add button to top of angle list so it is always visible; 0.9.9+mc26.3 #7

Open
mc-mod-bot wants to merge 1 commit from bot/add-button-persistently-visible into main
Collaborator

What changed

The + row (AddAngleEntry) was appended as the last entry of the angle list. With enough saved angles to fill the list viewport it scrolls out of view, making it hard to find the button to add a new marker (you had to scroll to the very bottom of a long list). It is not lost from the code — it just falls off the bottom edge of the scroll area.

Fix

  • AddAngleEntry is now inserted with addEntryToTop() — the + button is the first row of the list and always visible, however many angles exist. New angles are added below it.
  • add() no longer removes and re-adds the + row; it keeps the + row pinned and scrolls to the newly created entry instead.
  • Bumped mod_version to 0.9.9+mc26.3 (repo convention: mod_version == tag without v, so a future v0.9.9+mc26.3 release will be accepted by release.yml).

Verification

  • Local ./gradlew build green (fabric-loom 26.3, JDK 25).
  • Built jar inspected: AngleSnapListWidget constructor calls addEntryToTop, add() no longer calls removeEntry on the AddAngleEntry, fabric.mod.json version = 0.9.9+mc26.3.
  • addEntryToTop/scrollToEntry/setFocused semantics verified against the 26.3 AbstractSelectionList bytecode (addFirst + reposition + scroll clamping; setFocused sets selection without scrolling).

Client-only mod — CI does not boot a server; please smoke-test F6 in-game (add a couple of angles, confirm the + stays at the top and new entries appear below it).

Fixes the "where did the + button go?" dead end. (Routing when a world has zero angles was double-checked and is fine: F6 opens the angle list with the + row; the config screen is only reached via the Configure button / ModMenu.)

## What changed The + row (AddAngleEntry) was appended as the **last** entry of the angle list. With enough saved angles to fill the list viewport it scrolls out of view, making it hard to find the button to add a new marker (you had to scroll to the very bottom of a long list). It is not lost from the code — it just falls off the bottom edge of the scroll area. ## Fix - AddAngleEntry is now inserted with `addEntryToTop()` — the + button is the first row of the list and always visible, however many angles exist. New angles are added below it. - `add()` no longer removes and re-adds the + row; it keeps the + row pinned and scrolls to the newly created entry instead. - Bumped `mod_version` to 0.9.9+mc26.3 (repo convention: mod_version == tag without `v`, so a future `v0.9.9+mc26.3` release will be accepted by release.yml). ## Verification - Local `./gradlew build` green (fabric-loom 26.3, JDK 25). - Built jar inspected: `AngleSnapListWidget` constructor calls `addEntryToTop`, `add()` no longer calls `removeEntry` on the AddAngleEntry, `fabric.mod.json` version = 0.9.9+mc26.3. - `addEntryToTop`/`scrollToEntry`/`setFocused` semantics verified against the 26.3 `AbstractSelectionList` bytecode (addFirst + reposition + scroll clamping; setFocused sets selection without scrolling). Client-only mod — CI does not boot a server; please smoke-test F6 in-game (add a couple of angles, confirm the + stays at the top and new entries appear below it). Fixes the "where did the + button go?" dead end. (Routing when a world has zero angles was double-checked and is fine: F6 opens the angle list with the + row; the config screen is only reached via the Configure button / ModMenu.)
fix: pin Add button to top of angle list so it is always visible; 0.9.9+mc26.3
All checks were successful
Mod CI / verify (pull_request) Successful in 26s
1918a5281c
The + row was appended as the last entry of the angle list, so once a
world/server had enough saved angles to fill the list viewport it
scrolled out of view and adding a new marker became nearly impossible
(you had to scroll to the very bottom of a long list to find it).

- AddAngleEntry is now inserted with addEntryToTop() so the + button is
  the first row and always visible; new angles are added below it.
- add() no longer removes/re-adds the + row; it scrolls to the new
  entry instead, keeping the + button pinned.
- Bumped mod_version to 0.9.9+mc26.3.
All checks were successful
Mod CI / verify (pull_request) Successful in 26s
Required
Details
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin bot/add-button-persistently-visible:bot/add-button-persistently-visible
git switch bot/add-button-persistently-visible
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tral/anglesnap!7
No description provided.