nextcloud / nextcloud/calendar

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

Open
#6,621 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement Feature: Integration
Dominant language
JavaScript
Stars
1.2k
Forks
332
Avg merge
16h 13m
Merged PRs (30d)
137

Description

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 https://github.com/nextcloud/server/pull/49375

Nitpick deluxe: consider handling async callbacks, to allow actions to signal when they are done. E.g. the screencast at https://github.com/nextcloud/calendar/pull/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.
https://github.com/nextcloud/server/pull/49375#discussion_r1908845854

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the availability-modal actions exposed by NcAvatar and ContactsMenu, then inspect how their callbacks currently signal completion. Verify the loading-state behavior in the affected buttons; the work is done when each button stays loading until the modal is shown and existing frontend checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.