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

Introduce pattern to notify on resource loading (to support skeleton state designs) #5162

Open
jcfranco opened this issue Aug 16, 2022 · 3 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - design - lg Large design effort; 10-20 days of design work p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@jcfranco
Copy link
Member

jcfranco commented Aug 16, 2022

Description

calcite-avatar, calcite-tip and other resource loading components, lack a way to notify developers that the component has fully loaded and ready to be displayed.

Acceptance Criteria

An events or some other mechanism to allow consumers to know when resources have loaded and the component can be displayed.

Relevant Info

Ideas

  • emit a general event for all components that captures all resources have been loaded
  • refactor components to leverage async lifecycle hooks to defer readiness
  • tweak Stencil config to emit events for all lifecycle hooks (less desired option as it could still not cover the original use case)

Related issue: #1088
Blocked issues: #7520

Which Component

  • calcite-avatar (loads image)
  • calcite-tip (loads image)
  • For consideration, any component that loads a resource

Example Use Case

A wrapping component with skeleton state that is waiting for calcite-avatar's image to load before displaying it.

@jcfranco jcfranco 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 Aug 16, 2022
@jcfranco jcfranco changed the title Introduce pattern to support skeleton state designs (notify on resource loading) Introduce pattern to notify on resource loading (to support skeleton state designs) Aug 16, 2022
@geospatialem geospatialem added design Issues that need design consultation prior to development. p - medium Issue is non core or affecting less that 60% of people using the library figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists labels Nov 6, 2023
@geospatialem
Copy link
Member

geospatialem commented Nov 6, 2023

There is a similar component available as part of Hub, we should consider some discussions with team members as we move forward with the effort. refer to #1088 (comment)

Virtualization effort for #7384 is dependent on the skeleton state.

@jcfranco
Copy link
Member Author

Automated testing would also benefit from this (e.g., icon done fetching icon path data).

@brittneytewks brittneytewks added estimate - design - lg Large design effort; 10-20 days of design work and removed needs triage Planning workflow - pending design/dev review. labels Nov 16, 2023
@brittneytewks brittneytewks added this to the Design Backlog milestone Nov 16, 2023
@brittneytewks brittneytewks removed the figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists label Dec 11, 2023
@dmartini-zrh
Copy link

dmartini-zrh commented Mar 20, 2024

Example of use case from Scene Viewer:
Our welcome screen is currently displayed as soon as recent/featured scene details are loaded.
This results in a significant delay / diminished value: users figure out where to start before it appears.

So, we'd like to:

  1. display a skeleton state
  2. load all resources

Draft:
skeleton-loading

Please note:

  • scene cards aren't Calcite-based (yet)
  • animated skeleton items would be nice to have
Our draft in SVG here
<style><![CDATA[
#sk-loader5_to {animation: sk-loader5_to__to 1000ms linear infinite normal forwards}@keyframes sk-loader5_to__to { 0% {transform: translate(-242.114325px,-77.468px)} 100% {transform: translate(144.885675px,-77.468px)}}
]]></style>
<defs><linearGradient id="sk-loader5-fill" x1="96.954" y1="246" x2="-0.104" y2="245.858" spreadMethod="pad" gradientUnits="userSpaceOnUse" gradientTransform="translate(0 0)"><stop id="sk-loader5-fill-0" offset="0%" stop-color="rgba(255,255,255,0)"/><stop id="sk-loader5-fill-1" offset="51.5%" stop-color="rgba(255,255,255,0.87)"/><stop id="sk-loader5-fill-2" offset="100%" stop-color="rgba(255,255,255,0)"/></linearGradient></defs><g clip-path="url(#sk-loader6)"><g><rect width="179" height="131" rx="0" ry="0" fill="#eaeaea"/><g id="sk-loader5_to" transform="translate(-242.114325,-77.468)"><rect width="115" height="371" rx="0" ry="0" transform="rotate(30.000012) translate(133.5,-80)" fill="url(#sk-loader5-fill)"/></g></g><clipPath id="sk-loader6"><rect width="179" height="131" rx="0" ry="0" fill="#fff"/></clipPath></g></svg>

@geospatialem geospatialem added the ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members label Mar 20, 2024
@ashetland ashetland added p - high Issue should be addressed in the current milestone, impacts component or core functionality and removed p - medium Issue is non core or affecting less that 60% of people using the library labels Jan 7, 2025
@ashetland ashetland added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Jan 11, 2025
@ashetland ashetland removed this from the Design Backlog milestone Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - design - lg Large design effort; 10-20 days of design work p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

7 participants