Repository navigation
fix(bbb-learning-dashboard): Poll/Quiz sorting - #23595
Conversation
- Sort poll/quizzes by creation time in descendant order so users see the latest polls/quizzes first
WalkthroughThe changes update the ordering of items in two components: PollsTable and QuizzesTable. Both components now sort their respective data objects—polls and quizzes—by the Estimated code review effort2 (~15 minutes) Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
bbb-learning-dashboard/src/components/PollsTable.jsx (1)
301-301: Sorting implementation looks correct, but consider the impact on default poll naming.The descending sort by
createdOntimestamp is correctly implemented and achieves the PR objective. However, the default poll naming logic (Poll ${i + 1}) now uses the sorted index rather than the original creation order, which may cause confusion if polls don't have custom questions.Consider updating the default naming to use a more stable identifier:
- const headerName = v?.question?.length > 0 ? v?.question : `Poll ${i + 1}`; + const headerName = v?.question?.length > 0 ? v?.question : `Poll ${v?.pollId}`;bbb-learning-dashboard/src/components/QuizzesTable.jsx (1)
304-304: Consistent sorting implementation - well done!The sorting logic matches the implementation in PollsTable.jsx, providing a consistent user experience across both components. The descending sort by
createdOncorrectly displays the most recent quizzes first.Same consideration as PollsTable regarding default naming - consider using quiz ID instead of sorted index:
- const headerName = v?.question?.length > 0 ? v?.question : `Quiz ${i + 1}`; + const headerName = v?.question?.length > 0 ? v?.question : `Quiz ${v?.pollId}`;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
bbb-learning-dashboard/src/components/PollsTable.jsx(1 hunks)bbb-learning-dashboard/src/components/QuizzesTable.jsx(1 hunks)
🧠 Learnings (1)
📓 Common learnings
Learnt from: gustavotrott
PR: bigbluebutton/bigbluebutton#23137
File: bbb-graphql-server/bbb_schema.sql:2022-2027
Timestamp: 2025-05-09T14:36:13.418Z
Learning: User acknowledged that adding an ORDER BY clause to the DISTINCT ON query in v_breakoutRoom_commonProperties view makes sense but deferred implementation since "startedAt" values are mostly the same for all rooms.
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: gustavotrott
PR: bigbluebutton/bigbluebutton#23137
File: bbb-graphql-server/bbb_schema.sql:2022-2027
Timestamp: 2025-05-09T14:36:13.418Z
Learning: User acknowledged that adding an ORDER BY clause to the DISTINCT ON query in v_breakoutRoom_commonProperties view makes sense but deferred implementation since "startedAt" values are mostly the same for all rooms.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build-package (bbb-playback-record)
- GitHub Check: build-package (others)
- GitHub Check: build-package (bbb-graphql-server)
- GitHub Check: build-package (bbb-learning-dashboard)
- GitHub Check: plugin-sdk-version-check
|
Automated tests Summary🚨 Test workflow has failedClick here to check the action test reports (to view the report locally, see the docs) |



What does this PR do?
Closes Issue(s)
Closes none
More
This PR tags the Learning A. Dashboard poll testing as
flakybecause it changes the behavior of the Polls table.