POI: hide Attributes for local geometry; All Tags header tap targets#8
Closed
tordans wants to merge 2 commits into
Closed
POI: hide Attributes for local geometry; All Tags header tap targets#8tordans wants to merge 2 commits into
tordans 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>
df995b3 to
e120126
Compare
Owner
Author
|
This is now handled at bryceco#959 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Hide Attributes for local / new geometry
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
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.