-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tables loading #10944
Tables loading #10944
Conversation
to keep the logic related to lessons loading in one place
to keep the logic related to groups loading in one place
Build Artifacts
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual testing and code both look great! Cheers for the first of hopefully many shifts in Coach from Vuex to the composition API <3
@@ -19,7 +19,10 @@ | |||
/> | |||
</div> | |||
|
|||
<CoreTable> | |||
<CoreTable | |||
:dataLoading="groupsAreLoading" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a little strange that there are groups showing while the loader spins. Ideally, the table loading state would hide existing data (or at least "disable" it or otherwise indicate that it is currently part of the loading dataset)
Maybe a v-if="!groupsAreLoading"
on the tbody
here would do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In testing I'm not actually seeing the group while the loader is shown 🤷🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand, could you please elaborate a bit more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a v-if="!groupsAreLoading" on the tbody here would do it?
In any case, I think this won't harm anything so no problem to commit it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it'd make more sense to have this implemented rather in CoreTable
, though? Not only to have a condition to show the loader when dataLoading
is truthy but also to not show the table body in this case? I think that may prevent some glitches (maybe in regards to cached data?) by ensuring that table data is never displayed as long as dataLoading
is truthy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your screencast, when you go to the Group tab, "Group 1" is visible with the loader underneath it. I think the loader being there should hide the content on the table until it is done loading.
However, I was not able to replicate it and tried as best I could so I don't think it's a blocking issue at all.
Perhaps it'd make more sense to have this implemented rather in CoreTable, though?
Yeah I think you're right there for sure. That might be a good follow-up issue as it'd require regression testing across a bunch of tables and this is good to go otherwise. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your screencast, when you go to the Group tab, "Group 1" is visible with the loader underneath it. I think the loader being there should hide the content on the table until it is done loading.
However, I was not able to replicate it and tried as best I could so I don't think it's a blocking issue at all.
Ah yes, I see now. Yes, that's right. I think it might be related to the way I prepared the recording when I added a piece of code to delay loading - it's possible that I placed it in the wrong place as I couldn't reproduce it either right now. Or it could be related to some kind of cache - we can resolve that in a follow-up and do regression testing, yes. I will open the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Adds a circular loader to tables in
by
Includes related refactoring of handlers into composable functions to keep all related logic in one place + minor cleanup.
Comments
@nucleogenesis Note that this doesn't add the circular loader to tables to "Facility > Classes > Class > Enroll learners" and "Facility > Classes > Class > Assign coaches" as requested in #10785, since we don't only load tables but also other parts of the page so in these two particular cases, UX would be inconsistent with other places in Kolibri and perhaps confusing if I used just table loaders (see "Enroll learners into ''" and missing page title in the top bar):
In comparison, this is our current version with the linear loader:
I honestly don't know which version is better, neither looks ideal. From this and some recent discussions I noticed, I think we could improve page loaders in general however it'd be good to have input from the design team at first before refactoring so that we plan for something consistent in the whole app, and also in some cases like here, it might require changes to what data we load at what times.
Meanwhile, I'd suggest following the recommendation to use linear loaders https://design-system.learningequality.org/loaders/#linearloaders for the whole page load rather than spending time on something that we don't seem to be clear about yet, if there are no strong objections. Does that make sense?
References
Closes #10785
Reviewer guidance
Test all states of tables (with data, no data, filters) in
To see the table loader, you will likely need to throttle your network.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)