Skip to content

fix(alarms): repaint cards when names arrive late, and two controls that outgrew their space - #832

Merged
hokiepokedad2 merged 4 commits into
developfrom
fix/ui-polish
Aug 25, 2026
Merged

fix(alarms): repaint cards when names arrive late, and two controls that outgrew their space#832
hokiepokedad2 merged 4 commits into
developfrom
fix/ui-polish

Conversation

@hokiepokedad2

Copy link
Copy Markdown
Contributor

Three defects found by using the running application, not by any test. Each sits in a feature reaching users for the first time in this release, so each is a first impression. One commit per fix.

1. Alarm cards showed Pokemon #1 on a cold load — a8bb39d

Open /pokemon fresh and every card read Pokemon #1, Pokemon #133. Navigate away and back and they read correctly.

The cause was one level below where I'd have looked. MasterDataService held its name tables as plain Maps. Lists paint from the alarm rows, which return first, and resolve each species name through a template method call. When the maps filled, nothing marked the views dirty — so the first paint was the last one until a route change redrew them. ready$ was already the readiness signal, and the lists subscribed to it with an empty callback, which triggers no change detection.

The four name maps (pokemonMap, itemMap, moveMap, costumeMap) are now signals, rebuilt whole and published once. Every reader runs inside a template or a computed, so cards, the search box and the name-order sort all recover on their own. formsMap, typesMap and typeLabels were already signals — this makes the set consistent rather than half converted.

All ten alarm list components were checked, not just the one reported. (Ten lists, eleven types: raids holds raids and eggs.)

  • Affected, fixed: pokemon, raids/eggs, nests, max-battles — each resolves a species name and had the no-op subscribe.
  • Not affected: quests — it reloads its rows inside the readiness callback, which sets a signal, so it always repainted.
  • Resolve no species name: gyms, lures, invasions, fort-changes, pokestop-events.

One residual, noted rather than changed: PokemonNamePipe is a pure pipe, so it caches per input regardless of signals. It is used only in the nest and pokemon edit dialogs, which open after the list has loaded.

The test is the point. masterdata-late-arrival.spec.ts renders an OnPush host, asserts Pokemon #1, then flushes the responses — a test that seeds masterdata before creating the component passes against the broken code and proves nothing. Red before (Expected "Bulbasaur", Received "Pokemon #1"), green after, paired with a case asserting the number stays when names never arrive.

2. The sixth quest reward tab did not fit — 9b15624

PokéCoins clipped to "Pok" even when selected, and the strip paginated rather than scrolling the label into view.

The strip had already been trimmed twice to hold five. Widening the dialog fails at phone width; shortening labels fails in the locales that word these rewards longer than English (Poussière d'étoile, Mega-Energie) and the next trim would have taken Stardust with it.

Reward type is a single-choice question, so it is now a mat-select labelled "Reward type" with the chosen type's panel below. That matches how the Pokemon dialog already handles its crowded first tab, and drops a nested tab strip, which Material 3 discourages. Raid and max-battle nest two tabs each and fit fine — untouched.

Worth noting beyond the layout: each reward now declares the number save() switches on, so hiding PokéCoins on an older PoracleNG cannot shift the others. That replaces a hand-maintained "keep it last" rule.

Seven tests rewritten first and all seven failed against the tab markup. Verified on screen at 1280px and 360px.

3. Until labels truncated — 5394fcd

Confirmed on screen as Until (hou / Until (mir. The fields must stay narrow enough for an hour and a minute to sit side by side on a phone, and no width survives all eleven locales (Jusqu'à (minute)).

The qualifier moved out of the fields onto the pair: the row now reads STARTS AT over one hour-and-minute and UNTIL over the other, each field labelled by the short word it asks for. The two end selects keep the full wording as their aria-label, so nothing is lost to a screen reader. On mobile the pairs stack one per row rather than wrapping field by field.

The quest summary dialog opens this same shared editor, so both surfaces are fixed. Three tests, two red before the fix, the third the legitimate case — repeat off shows two fields and no captions.

Verification

npx jest --ci 119 suites / 1415 tests (was 118 / 1408). Production ng build clean. eslint and prettier --check clean. Three new locale keys present in all eleven files. No line-ending churn.

Browsing was read-only: dialogs opened and cancelled, nothing saved or deleted, production never touched.

…first render

Pokemon, raid, nest and max battle lists resolve a species name through
MasterDataService and paint before it has answered. The name maps were plain
Maps, so nothing marked the views dirty when they filled: the cards kept the
'Pokemon #1' fallback until an unrelated redraw -- a route change -- happened
along, which is why the second visit looked right.

The four name maps are signals now. Every reader runs inside a template or a
computed, so the read registers and the cards, the search box and the
name-order sort all recover on their own. Quest lists reloaded inside the
readiness callback and were already correct; gyms, lures, invasions, fort
changes and Pokestop events resolve no species name at all.

The spec flushes the responses after the first render, which is the only
ordering that fails against the old code, and pairs it with the case where the
names never arrive and the number must stay.
…ab strip

The PokeCoins tab arrived in a strip already trimmed twice to hold five, and
at dialog width its label clipped to 'Pok' whether or not it was selected --
the strip paginated rather than scrolling the selected label into view. Five
of the ten other locales word these rewards longer than English does, so the
next trim would have taken Stardust with it, and the dialog cannot be widened
without breaking at phone width, which is where it is worst.

Reward type is a single-choice question, so it is now a select: it fits at any
width in any language, and it drops a nested tab strip, which Material does
not want inside another one. The Pokemon dialog already handles its own
crowded first tab this way -- form fields under one tab rather than a second
strip. Raid and max battle nest two tabs each and are left alone.

Each reward now declares the number save() switches on, so hiding PokeCoins on
a PoracleNG that would refuse it cannot shift the others -- which is what the
old comment about keeping it last was guarding by hand.

Verified in the running app at 1280px and at 360px: the label reads in full,
all six rewards are reachable, and the PokeCoins panel is unchanged.
…inside each field

Turning on a repeat adds 'Until (hour)' and 'Until (minute)' to a row that
already held an hour, a minute and an interval. Both rendered clipped: the
field has to stay narrow enough for an hour and a minute to sit side by side
at phone width, and the qualifier does not fit in a floating label that
narrow -- less so in the ten other locales, where every one of these words is
longer than its English original.

The qualifier now sits above the pair it describes, so the row reads 'Starts
at' over one hour-and-minute and 'Until' over the other, and each field is
labelled by the short word it asks for. The two end selects keep the full
wording as their accessible name, so nothing is lost to a screen reader. On a
phone the pairs stack one per row instead of wrapping field by field, which
is what used to break an answer across two rows.

Quest summary schedules open the same editor, so both surfaces are fixed.

Verified in the running app at 1280px and at 360px, with a repeat turned on.

Also widens the interval field to hold the longest of the eleven
translations of 'Repeat every'.
@hokiepokedad2
hokiepokedad2 merged commit 470c1d3 into develop Aug 25, 2026
6 checks passed
@hokiepokedad2
hokiepokedad2 deleted the fix/ui-polish branch August 25, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant