microsoft / Viva-Connections-Extensibility-Beta

38 stars 6 forks source link

QuickViews should be able to fetch data on demand #16

Closed vman closed 2 years ago

vman commented 3 years ago

Versions

[Windows 10] Operating System [v12.22.1] Node version [4.0.2] Gulp version [1.13.0-beta.5] SPFx Generator version (npm list -g @microsoft/generator-sharepoint)

Expected or Desired Behavior

Continuing on from this discussion in Teams

QuickViews should be able to fetch data on demand with Promises instead on data having to be passed down to them from the ACE.

Observed Behavior

Currently only the BaseAdaptiveCardExtension class contains and OnInit method which returns a Promise and can be used to fetch data asynchronously.

This effectively translates to getting all the data on first load instead of fetching it on demand when the user invokes the QuickView. If there are a large number of ACEs on the dashboard then all of them are going to eagerly load all the data also for the QuickViews even if the user never invokes the quick view.

johnguy0 commented 3 years ago

Thanks for the enhancement idea. Can folks upvote this if they think it's something we should investigate adding?

vman commented 3 years ago

@johnguy0 Do you think there are enough upvotes to pursue investigating this?

johnguy0 commented 3 years ago

It's certainly going to be on our backlog for consideration.

anoopt commented 2 years ago

@vman - In a recent demo Patrick Rodgers showed how to get the content of a news article on demand in a quickview. Is that related to/answer your question?

Link to the code

The related part of the demo

vman commented 2 years ago

Thanks @anoopt! That is certainly a workaround to make async calls in a Quick View. However, if there was an OnInit method for the quick view as well, it would make things a lot easier.

johnguy0 commented 2 years ago

Thanks for providing this feedback during the public Beta. We'll consider this functionality in a future release.