[Bugfix:HelpQueue] Fix non-toggling user ID in OHQ #12596
[Bugfix:HelpQueue] Fix non-toggling user ID in OHQ #12596Akarshkushwaha wants to merge 9 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12596 +/- ##
=========================================
Coverage 21.67% 21.67%
Complexity 9801 9801
=========================================
Files 268 268
Lines 36722 36722
Branches 489 489
=========================================
Hits 7960 7960
Misses 28277 28277
Partials 485 485
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
dagemcn
left a comment
There was a problem hiding this comment.
Great work here! I mostly did a functionality review, although the code looks good from my brief overview. The changes work as described, greatly improving quality of life.
williamjallen
left a comment
There was a problem hiding this comment.
@Akarshkushwaha The code changes look pretty reasonable to me, but I'd like to see a Cypress test for this before it gets merged.
b360926 to
915aa3e
Compare
williamjallen
left a comment
There was a problem hiding this comment.
The new Cypress tests are failing. Once they're resolved, this is good to go.
|
thank you for the contribution. |
This is a duplicate of [PR#12596](#12596) with the added cypress tests fixed. Refer to [PR#12596](#12596) for info and credit to @Akarshkushwaha for the implementation. ### Why is this Change Important & Necessary? Fixes #12595 In the Office Hours Queue interface, the "Show user id" feature was destructive. Clicking the eye icon would overwrite the student's name and remove the toggle button from the DOM, requiring a full page refresh to see student names again. This PR implements a non-destructive toggle that follows standard UI patterns, allowing Instructors to switch back and forth efficiently. ### What is the New Behavior? - Clicking the "eye" icon reveals the student's User ID while hiding their name. - The icon changes to a "slashed eye" (`fa-eye-slash`) when the ID is visible. - Clicking the "slashed eye" icon hides the ID and restores the student's name. - This is achieved using CSS visibility toggling (`display: inline` / `display: none`) rather than DOM manipulation/removal. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Navigate to the **Office Hours Queue** page (viewing as a Instructor). 2. Click the "Show user id" (**eye icon**) next to their name. 3. Verify that the name is replaced by the ID and the icon changes to a slashed eye. 4. Click the slashed eye icon. 5. Verify that the student's name is restored and the icon returns to the original state. Before: <img width="1916" height="947" alt="Image" src="https://github.com/user-attachments/assets/c5bb2107-f5c4-4cc7-a031-1b2133cf9a02" /> After:- <img width="1916" height="947" alt="image" src="https://github.com/user-attachments/assets/9a1654eb-0b7a-490c-8dec-40f67c1bac0b" /> ### Automated Testing & Documentation - This change modifies existing UI templates ([CurrentQueue.twig](cci:7://file:///home/akarsh/opensource/Submitty/site/app/templates/officeHoursQueue/CurrentQueue.twig:0:0-0:0), [QueueHistory.twig](cci:7://file:///home/akarsh/opensource/Submitty/site/app/templates/officeHoursQueue/QueueHistory.twig:0:0-0:0)) and a JavaScript utility in [QueueFooter.twig](cci:7://file:///home/akarsh/opensource/Submitty/site/app/templates/officeHoursQueue/QueueFooter.twig:0:0-0:0). - No new automated tests were added as this is a minor UI logic fix, but manual verification ensures compatibility with existing queue interactions. - No update to submitty.org documentation is required as this is a fix to existing behavior. ### Other information - **Breaking Change?** No. - **Migrations needed?** No. - **Security concerns?** No. --------- Co-authored-by: Akarsh Kushwaha <[email protected]> Co-authored-by: Akarsh Kushwaha <[email protected]>
Why is this Change Important & Necessary?
Fixes #12595
In the Office Hours Queue interface, the "Show user id" feature was destructive. Clicking the eye icon would overwrite the student's name and remove the toggle button from the DOM, requiring a full page refresh to see student names again. This PR implements a non-destructive toggle that follows standard UI patterns, allowing Instructors to switch back and forth efficiently.
What is the New Behavior?
fa-eye-slash) when the ID is visible.display: inline/display: none) rather than DOM manipulation/removal.What steps should a reviewer take to reproduce or test the bug or new feature?
Before:

After:-

Automated Testing & Documentation
Other information