Commit graph halkyon/halkyon_learn_flutter/test/feature/geo_map
Author SHA1 Message Date
4eb2640be6
fix(study): a map question names none of Japan's parts before it is answered
The chips above Japan's map (Hokkaidō, Tōhoku, Kantō …) showed while a
prefecture's question was answered: Hokkaidō's and Okinawa's chip was
the answer itself, and the others named the region the prefecture lies
in. A study card now offers them only once checked; tapping the map
still opens the part tapped. The world's continents keep their chips:
shortcuts no question asks for. Writing a question offers them all, as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-14 18:23:51 +02:00
3181223940
fix(map): a region is picked on a screen of its own, and a country's map offered once it is picked
The composer showed the map inside its scrolling page, so zooming and
scrolling fought over the wheel. A map question's answer is now a field
that opens the map in the whole window, as a studyset's description is
written, with Save in the app bar; nothing scrolls there, so the wheel
alone zooms. The Prefectures chip stood beside East Asia's countries
before Japan was picked; it now shows once Japan, or a prefecture, is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-13 21:21:42 +02:00
f99caebcd9
fix(map): the map fits the screen in a page that scrolls, and every layer zooms
In the composer the map was 4:3 of the page's width, on a wide window
taller than the window: zooming with Ctrl and the wheel then showed only
part of it, and the page scrolled under it. It is now never taller than
60 % of the screen.

Whole maps (the world, Japan) didn't zoom, only their parts did, since a
tap there opens a part. Pinching and Ctrl with the wheel now zoom every
layer; a tap still opens the part it is in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-13 21:21:41 +02:00
1df60c8830
feat(map): one map, Japan's prefectures within Japan
A map question is picked on one map: the world's countries in layers
(Europe, East Asia, ...), and within Japan its prefectures, in layers too
(Kantō, Kansai, ...); Back goes up one. The composer's choice between two
maps is gone. A card still names the map its answer is a region of
(`japan`, `world`), as versions up to v0.11.0 did, so they still show it.

In the composer a tap on Japan picks the country, and the "Prefectures"
chip opens its prefectures. Studying, the card decides: a prefecture's
question opens Japan at a tap, a country's picks it.

The map opens on the deepest layer the map questions share (studying, the
round's; writing, the studyset's): Japan for prefectures all over it,
Kantō for Tokyo and Chiba, Europe for European countries.

A tap no longer zooms in when it could mean several regions: it picks the
ring it is on (the nearest of several), else the region under it, else the
nearest ring or outline within reach. Zooming is pinching, or Ctrl (⌘ on a
Mac) and the wheel, as maps on web pages do; the wheel alone scrolls the
page, and a note over the map says how to zoom.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-12 13:59:56 +02:00
e5e0de62b3
feat(map): every country on earth, picked continent first
All checks were successful
CI / check (push) Successful in 14m52s
CI / deploy (push) Successful in 19s
Map questions can now be on the world's countries besides Japan's
prefectures: a new question chooses its map above it.

The world is Natural Earth's 1:50m countries (public domain), as they are
on the ground, one region per ISO 3166-1 code (239; Gibraltar and the US
Outlying Islands from the 1:10m layer, which has them), named in every
language a studyset can be in from the Unicode CLDR (Unicode License v3,
its notice in the licence list). tool/maps/world_countries.py builds it;
the outline code it shares with the Japan script moved to outlines.py,
which still writes Japan's file byte for byte. The 1.8 MB file is parsed
off the screen's isolate.

Picking goes in layers on both maps: on the whole map one taps a group
(a continent, or Kantō, Kansai …; chips name them too) and the map flies
there, then one taps the region; Back returns. A group of one (Hokkaidō,
Okinawa) and what is in none (Antarctica) are picked at once. A country
in two groups (Russia, Türkiye, Cyprus) opens the one nearer the tap.
Oceania's frame runs past 180° so the Pacific stays in one piece.

What is still too small to hit gets a ring, 48 dp of reach as Material's
touch target: on the ring it is picked; near it, where the tap could mean
it or its neighbours, the map zooms in rather than guess. Pinching and a
mouse's wheel zoom as before.

Names show in the app's language, beside them the map's own (Japanese for
Japan) or the studyset's (キプロス beside Cyprus in a Japanese studyset).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-12 07:51:15 +02:00
5a5b2feead
feat(app): map questions on Japan's prefectures
A map question is a multiple-choice card drawn on a map: the composer's
Map kind takes the region tapped as its answer, and studying it means
tapping a region and checking, the right one green and a wrong pick red,
each named. The map of Japan's 47 prefectures comes from Natural Earth
(public domain), built by tool/maps/japan_prefectures.py from release
v5.1.2 (its download checked by hash): simplified, small islands
dropped, rounded; about 107 KB. Maps are drawn to fit, tappable and
zoomable for small regions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-01 21:10:07 +02:00