kolibri: CoreTable: Do not render table data when data are loading

Follow-up to https://github.com/learningequality/kolibri/pull/10944#discussion_r1265694925

Observed behavior

In CoreTable.vue we show the circular loader when data are loading (that is when dataLoading prop truthy)

https://github.com/learningequality/kolibri/blob/0e408ee10250ef3f142352de90839328db01db75/kolibri/core/assets/src/views/CoreTable.vue#L96-L97

but there is no logic for hiding data in the table body when it is loading. That’d be fine under the assumption that whenever we’re loading data, we can be certain that there is no data yet. Generally, this might not always be true in reactive environments and when using cached data.

Expected behavior

We’d like to make CoreTable more robust by hiding table data when dataLoading prop is truthy.

User-facing consequences

Displaying two states at a time, e.g. cached data together with a loader, would be confusing.

Acceptance criteria

  • There is a condition that hides data in the table body if dataLoading prop is truthy
  • We can rely on exactly one state (of three - data loading, loaded but no data, loaded with data) being displayed at a time
  • All places where CoreTable is used are tested for regressions

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 26 (26 by maintainers)

Most upvoted comments

Thank you, @muditchoudhary. I am looking into it. Will reach out soon.

@muditchoudhary Ah yes, can you try yarn run devserver-hot core,coach? CoreTable is in core.

Sure, Let me try it

Update: Yeah it worked. I understood now. Thank you 😃

@muditchoudhary Please target develop branch

Hi, @muditchoudhary, thank you! I’m assigning you (and also myself just to keep an eye in case you needed anything). If you haven’t yet seen our contributing guidelines, please have a look.