POI: hide Attributes for local geometry; All Tags header tap targets#959
POI: hide Attributes for local geometry; All Tags header tap targets#959tordans wants to merge 2 commits into
Conversation
- Treat pending geometry (ident < 0) like new nodes when restoring poiTabIndex: strip Attributes tab and clamp saved index 2 to Common Tags. - All Tags preset header: title switches to Common Tags; chevron opens picker. Co-authored-by: Tobias <t@tobiasjordans.de>
Expose resolvedTabBar for tab index clamping; adopt in viewDidLoad. Supersedes duplicate Attributes-tab logic in draft PR #6. Co-Authored-By: Tobias <t@tobiasjordans.de>
|
Switching from All Tags to Common Tags when the keyboard is showing:
Attributes tab:
|
I agree this is not perfect. One thing that does not help is the animations, which I did not look into. There is some flicker and inconsistency that make this harder to understand. Unfortunately I have yet to come up with a better idea on how to solve this issue in an iOS like way. Idea: Maybe we can create a new floating UI that is similar to the 3-tab-switch that we see when the keyboard is down but only visible when the keyboard is up. It would have to be smaller in height though to not take up too much space…
The UI Guidelines actually help with this:
My thinking is:
=> We should align all geometry types with how nodes work now. |
Yes, thats what we should do. The toolbar you see in Slack is like what we use for telephone # input. |
Happy to update this. But might be a while until I can shift focus on this. |
|
I'm working on the keyboard helper with options to switch tabs, and that will be a different PR. This one is too mixed up with different goals, so I think it should be closed. New PRs with individual goals for what's left over are fine. |
FYI I extracted this part at tordans#19 – Once I have time to test it, I will propose a new PR for discussion. |



Problem
This changes two things at once because I mixed up my instructions. But they are related, so maybe they can stay in one PR.
Hide Attributes for local / new geometry
Issue 1: The 3rd tab "Attributes" was hidden for new nodes but not for new ways/areas
POITabBarControllerrestoresUserPrefs.poiTabIndexwhen the POI editor opens (0 = Common Tags, 1 = All Tags, 2 = Attributes).For a new standalone node (
selectedPrimary == nil), the Attributes tab is already removed and a saved index of 2 is clamped to 0.For a new way / area / relation in memory (
ident < 0until upload),selectedPrimaryis non-nil, so Attributes used to stay visible and index 2 could still be restored—inconsistent with the new-node experience.User story: After editing an uploaded object on Attributes, opening the editor for any not-yet-uploaded geometry (nil selection or local negative id) should match a new node: only Common Tags and All Tags; Attributes returns after the object has a positive server id.
All Tags preset header
Issue 2a: The "change/choose preset" arrow on the "All Tags" did not look that great
Issue 2b: When the keyboard was up (which happens automatically in some flows), there is no direct way to change from "All Tags" to "Common Tags" => This is now solved by making the Preset label clickable
On All Tags, the section header shows the matched preset name and a control to open the feature picker. When the keyboard hides the tab bar, users could not easily return to Common Tags preset fields. The trailing control was plain
">"text.User story: Tap the preset title → Common Tags; tap the chevron → change preset (unchanged behavior).
Implementation notes (Cursor)
POITabBarController.swiftshouldHideAttributesTab(for:)—truewhenselection == nilorident < 0.resolvedTabBar(savedIndex:selection:)— tab count 2 vs 3; clamps saved index 2 → 0 when Attributes hidden.viewDidLoadusesresolvedTabBar;removeAttributesTabFromViewControllers()strips the Attributes nav stack.POIAllTagsViewController.swift(SectionHeaderCell)slideTabTo(tabIndex: 0)+ updatespoiTabIndex; does not open feature picker.chevron.right, accessibility “Change preset”; pushesPOIFeaturePickerViewController.UIButton.Configurationon iOS 15+; fallback on older OS.Tests (from PR #6)
POITabBarControllerTestCase— matrix forsavedIndex∈ {0,1,2} × {nil, pending node, uploaded node, pending way}.Out of scope: Refreshing tabs if selection goes pending → uploaded while POI stays open.
Testing notes (@tordans)
POI tab / Attributes visibility
ident < 0) → POI → Attributes hidden; index 2 does not select a missing third tab.ident > 0) → three tabs; index 2 restores normally.All Tags header
tags-panels--hide-attributes--switcher--before.min.mov
tags-panels--hide-attributes--switcher--after.min.mov
Automated: Run
GoMapTests—POITabBarControllerTestCase.