Skip to content

fix(where): Places belongs in the nav, not the user menu - #736

Merged
hokiepokedad2 merged 4 commits into
developfrom
fix/places-in-nav
Aug 19, 2026
Merged

fix(where): Places belongs in the nav, not the user menu#736
hokiepokedad2 merged 4 commits into
developfrom
fix/places-in-nav

Conversation

@hokiepokedad2

Copy link
Copy Markdown
Contributor

Review feedback on #733. Places was a dialog in the user menu; it should be a page in the sidebar.

Why the original placement was wrong

It is data, not a preference. Alert Defaults is a localStorage preference, which is why it lives in a settings menu. Places is server-side CRUD — exactly like My Geofences, which has its own nav item and page.

The Areas page already frames this question. It opens with two method cards side by side, Areas and Location, and the Location card holds your pin and its Set/Change button. Named points are just more pins. Putting them behind a user menu split one idea across two surfaces and made the newer half hard to find.

Changes

  • The dialog becomes a page at /places, in the settings nav group beside Areas and My Geofences. The user-menu entry and its now-dead string are removed.
  • The route carries disabledFeatureGuard('disable_location'). The places endpoints hang off LocationController, which already carries [RequireFeatureEnabled], so the guard matches the server rather than decorating it — a nav item alone leaves the page reachable by URL, which CLAUDE.md is explicit about.
  • The Areas location card links to Places, so the two surfaces reference each other.

An i18n gap this turned up

NAV.PLACES was missing from all eleven locale files, English included, so the sidebar would have rendered the literal string NAV.PLACES. The build does not catch it and neither did my earlier parity check, because that compares each locale against English — and English was missing it too, so there was nothing to be missing from.

Added a check that works the other way round: collect the keys templates actually ask for (| translate and i18n.instant) and assert each exists in en.json. It found two more beyond mine — COMMON.ERROR and COMMON.SAVED, used by the invasion, max-battle and quest add dialogs. Both pre-date this work and I have left them alone rather than widen the PR, but they are live snackbars rendering raw keys and worth their own fix.

Build clean, 1031 tests passing.

Two remaining pieces of per-alarm scope.

Default place
- AlertDefaultsService remembers a place beside the mode and radius, and the
  nine add dialogs that lacked it gain the "measured from" selector Pokemon
  already had. All ten seed from the saved default.
- save() drops the place when the mode is areas. A place only means something
  alongside a radius, and the two are mutually exclusive upstream, so keeping
  one would seed every new alarm with a scope PoracleNG refuses.
- reconcilePlace() forgets a place that no longer exists, so deleting one
  cannot keep stamping a rejected label onto new alarms.

Mega PVP
- pvp_ranking_evolution on the Monster model, a Base / Mega / Mega X / Mega Y
  control in the add and edit dialogs, and a suffix on the card's PVP badge.
- Only sent when the rule has a league. Carrying it on a non-PVP alarm would
  be a filter nobody asked for on a field PoracleNG still reads.
- It works whatever include_mega_evolution is set to: that flag only decides
  the default for rules that do not state a mode. Confirmed against 5.1.0's
  matcher, where filterMega is gone and mega entries are split per evolution.

Translations for all new strings in the ten non-English locales.

Two rounds of build-only failures again, both invisible to tsc and jest:
mat-option unknown in three dialogs whose imports lacked MatSelectModule, and
a spec stub for AlertDefaultsService missing the new accessor.
Places was a dialog next to Alert Defaults. Wrong on two counts.

It is data, not a preference. Alert Defaults is localStorage; Places is
server-side CRUD, exactly like My Geofences, which has its own nav item.

And the Areas page already answers this question: it opens with two method
cards, Areas and Location, where the Location card holds the pin and its
Set/Change button. Named points are just more pins, so hiding them in a
settings menu split one idea across two surfaces.

- The dialog becomes a page at /places, in the settings nav group beside
  Areas and My Geofences. The user-menu entry and its string are gone.
- The route carries disabledFeatureGuard('disable_location'), matching
  LocationController, which already gates the endpoints it calls. A nav item
  alone would have left the page reachable by URL.
- The Areas location card links to it, so the two surfaces reference each
  other rather than one being hidden.

Also caught while doing it: NAV.PLACES was missing from all eleven locale
files, English included, so the sidebar would have rendered the literal key.
My earlier parity check could not see it, because it compares locales
against English and English was missing it too. Added a check that reads the
keys templates actually ask for and asserts each exists in en.json. It found
two more, COMMON.ERROR and COMMON.SAVED, both pre-existing in the invasion,
max-battle and quest add dialogs and left alone here.
@github-actions github-actions Bot added the fix label Aug 19, 2026
Both described the same unreleased feature and disagreed about where it
lives. Nothing has shipped, so the log should say where Places is rather
than record the route it took.
@hokiepokedad2
hokiepokedad2 merged commit 6846e07 into develop Aug 19, 2026
6 checks passed
@hokiepokedad2
hokiepokedad2 deleted the fix/places-in-nav branch August 19, 2026 13:14
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