Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ts/hooks/usePanelState): add setTabMode API #2275

Merged
merged 7 commits into from
Nov 16, 2023

Conversation

firestack
Copy link
Member

@firestack firestack commented Nov 8, 2023

When working on #2273, I ended up breaking the MapPage feature which allowed opening the VPP to a specific page. I considered adding the first part of this PR in #2273, but I figured it was getting large enough it'd be easier to digest as a separate PR.

This "stores" the state of the active VPP Tab in the usePanelState* hooks because the initialTab prop was insufficient because switching pages wouldn't reset the state of tabMode, therefore initialState was only respected once. By pulling the state out into the panel state, the tab can now be remembered across pages, and each page has it's own tab mode.


Depends On: #2273
Asana Ticket: https://app.asana.com/0/1148853526253420/1205762199809559/f


@firestack firestack self-assigned this Nov 8, 2023
@firestack firestack requested a review from a team as a code owner November 8, 2023 17:23
@firestack firestack marked this pull request as draft November 8, 2023 17:24
@firestack firestack marked this pull request as ready for review November 8, 2023 17:29
Copy link

github-actions bot commented Nov 8, 2023

Coverage of commit 0fde39e

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Copy link

Coverage of commit 0ad7fb7

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Copy link

Coverage of commit 1188b62

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Copy link

Coverage of commit 4ec131b

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Base automatically changed from kf/asn/panel-behaviour-search-maps to master November 14, 2023 16:33
@firestack firestack force-pushed the kf/asn/panel-behaviour-search-maps-tab-mode branch from 4ec131b to 209a255 Compare November 14, 2023 16:37
Copy link

Coverage of commit 73b4aa6

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@firestack firestack force-pushed the kf/asn/panel-behaviour-search-maps-tab-mode branch from 73b4aa6 to 5a62bb3 Compare November 16, 2023 15:26
Copy link

Coverage of commit 5a62bb3

Summary coverage rate:
  lines......: 94.8% (3013 of 3177 lines)
  functions..: 74.6% (1259 of 1688 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@firestack firestack merged commit 5a7ba3a into master Nov 16, 2023
8 checks passed
@firestack firestack deleted the kf/asn/panel-behaviour-search-maps-tab-mode branch November 16, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants