microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

Add new template that's used when the user is not signed in

Open waldekmastykarz opened this issue 1 year ago • 1 comments

Proposal: Add new template that's used when the user is not signed in

Description

To all components, add a new template that's used when the user is not signed in.

Rationale

Currently, when defined, the no-data template is used, even when the user has not signed in to the app yet. This leads to situations like:

image

Ideally, we'd be able to say: "Sign in to view your upcoming meetings" and after signing in and retrieving data, either showing meetings or the message that there are no upcoming meetings. Today, we could implement this by checking the provider state, but it gets pretty complex pretty quickly for something that should've be easy.

Preferred Solution

To all components introduce a new template named not-signed-in which renders when the user is not signed in to the app.

Update

One caveat to consider in the design is the provider state change and the fact that signing in might take a moment. Eg. when you load the page, the first state is Loading. After the auth information has been rehydrated it will change either to SignedIn or SignedOut. This is why we recommend to use Providers.onProviderUpdated(providerStateChanged); to monitor provider state changes. If we provide a not-signed-in template, it should be attached to the state changed event and cause the component to re-render if the state has changed.

waldekmastykarz avatar Oct 14 '22 13:10 waldekmastykarz

Hello waldekmastykarz, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

ghost avatar Oct 14 '22 13:10 ghost