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

Persist resizable shell panel widths #8210

Open
2 of 9 tasks
nwhittaker opened this issue Nov 17, 2023 · 2 comments
Open
2 of 9 tasks

Persist resizable shell panel widths #8210

nwhittaker opened this issue Nov 17, 2023 · 2 comments
Labels
0 - new New issues that need assignment. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. blocked This issue is blocked by another issue. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone
Milestone

Comments

@nwhittaker
Copy link
Contributor

Check existing issues

Description

The width of a resizable <calcite-shell-panel> currently resets upon refreshing the browser window. The requested enhancement is that, if the user had resized the panel manually, the panel stays that width until the user changes it again -- even after refreshing the window and possibly extending across sessions.

While it's possible for the consuming app to implement this functionality using resize observers and setting Calcite CSS variables, there is enough room for variance in the requirements that we'd likely end up with an inconsistent UX across Esri apps.

Acceptance Criteria

  • The width of a manually resized shell panel is restored after refreshing the browser window.
  • The width of a manually resized shell panel is restored after expiring the browser session, and starting a new session(?).
  • Within a routing webapp, the width of a manually resized shell panel is restored after navigating away from, and back to, a view with the shell panel.
  • If the width of the viewport changes after navigating away, the restored width takes up the same percentage of the viewport, rather than the same pixel value(?).

Relevant Info

Other components provide a storageId prop for persisting state to local storage. Something similar might work well here.

Which Component

Shell panel

Example Use Case

Field Maps Designer is interested in using the <calcite-shell> and <calcite-shell-panel> elements to create several list/detail views across several different routes. If the user decides to give the detail view a little more room by resizing the shell panel, it'd be nice to maintain that width when visiting the other related list/detail routes.

Priority impact

p3 - want for upcoming milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Field Apps

@nwhittaker nwhittaker added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Nov 17, 2023
@github-actions github-actions bot added p3 - want for upcoming milestone calcite-components Issues specific to the @esri/calcite-components package. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. labels Nov 17, 2023
@macandcheese
Copy link
Contributor

macandcheese commented Nov 18, 2023

I agree with the desired end user experience here in most cases, although there could be times it is unexpected to persist, depending on workflow.

We did have a discussion issue about re-evaluating the two instances we do provide localStorage functionality (#8029).

This is just IMO, I am not sure from a design standpoint we’d always want this behavior. Some apps may want to provide settings to configure widths, or offer a user setting to save the width or not , that could conflict with this as a default behavior.

In variable width or percentage based shell panels, the width may also change based on viewport change, not just user resize, so observing changes to width as a user is definitely not the easiest - we haven’t to this point exposed events for resize start / stop, but it has come up a lot recently.

@geospatialem geospatialem added impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone and removed p3 - want for upcoming milestone labels May 21, 2024
@geospatialem
Copy link
Member

Blocked by #8029.

@geospatialem geospatialem added blocked This issue is blocked by another issue. and removed needs triage Planning workflow - pending design/dev review. labels Jun 25, 2024
@geospatialem geospatialem added this to the Stalled milestone Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. blocked This issue is blocked by another issue. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone
Projects
None yet
Development

No branches or pull requests

3 participants