Skip to content

Avatar Availability Integration: Leverage async callback to implement a loading state #6621

@st3iny

Description

@st3iny

Is your feature request related to a problem? Please describe.

Opening the availability modal from either the NcAvatar or ContactsMenu action might take some time to load. During the loading phase there is no feedback to the user. The modal will simply pop up after some time.

Describe the solution you'd like

We should leverage an async callback to implement a loading state. Render the button in a loading state while the Promise is being resolved until the modal is shown.

Describe alternatives you've considered

None

Additional context

Follow-up to nextcloud/server#49375

Nitpick deluxe: consider handling async callbacks, to allow actions to signal when they are done. E.g. the screencast at #6502 shows that there is a brief moment of no visual feedback before the modal opens. During that time the action button could switch to a loading state. On a technical level the callback would return a promise, and here you would go into loading state as long as the promise hasn't resolved.
nextcloud/server#49375 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developAccepted and waiting to be taken care ofFeature: IntegrationAn integration with another app in the ecosystemenhancementNew feature request

    Projects

    Status

    📄 To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions