-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Corrected output for filtered Quizzes and Lessons #11313
Corrected output for filtered Quizzes and Lessons #11313
Conversation
Build Artifacts
|
LGTM - let's further discuss and report separately any additional improvements which can be made such as the brief flash of 'No results' and the correct position of the Status filter :)! |
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.
Kudos @radinamatic :)! Changes are looking good to me.
This is not blocking, just a suggestion how we could tweak naming and organization of conditions to improve readability. It took me some time to make all the connections due to unclear naming, the number of negations and having conditions at various places. This was something present before your update though - it's up to you if you'd like make these changes.
Template:
<p v-if="showNoResultsLabel">{{ coreString('noResultsLabel') }}</p>
JavaScript:
hasVisibleLessons() {
return this.activeLessonCounts.true
},
hasNonVisibleLessons() {
return this.activeLessonCounts.false
},
showNoResultsLabel() {
if (!this.lessons.length) {
return false
}
if (this.filterSelection.value === 'filterLessonVisible') {
return !this.hasVisibleLessons
}
if (this.filterSelection.value === 'filterLessonNotVisible') {
return !this.hasNonVisibleLessons
}
},
Thank you @MisRob for suggestions on naming improvements (and @marcellamaki for last mile support), all done! 🙏🏽 |
Summary
'No results' string for filtered Quizzes displays properly:
string-fix-quizzes.mp4
There is probably a more elegant way of fixing the second reported issue, but seems to be working OK now 🙂
On top of the 'No results' not being displayed for not visible lessons, it was displaying for visible ones even when there are no lessons at all, below the 'You do not have any lessons' message.
There may still be an underlying loading issue (brief flash of 'No results' until the lesson is loaded and appears in the table), but is probably out of the scope of this PR and definitely above my pay grade 😅
References
Fixes #11310
…
Reviewer guidance
Change the status of the quizzes (start/end) and lessons (visible/not visible), and check if the 'No results' message is displayed properly for all filtered cases.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)