Skip to content

[Bugfix:HelpQueue] Fix non-toggling user ID in OHQ #12596

Closed
Akarshkushwaha wants to merge 9 commits into
Submitty:mainfrom
Akarshkushwaha:fix-ohq-id-toggle
Closed

[Bugfix:HelpQueue] Fix non-toggling user ID in OHQ #12596
Akarshkushwaha wants to merge 9 commits into
Submitty:mainfrom
Akarshkushwaha:fix-ohq-id-toggle

Conversation

@Akarshkushwaha

Copy link
Copy Markdown
Contributor

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:
Image

After:-
image

Automated Testing & Documentation

  • This change modifies existing UI templates (CurrentQueue.twig, QueueHistory.twig) and a JavaScript utility in QueueFooter.twig.
  • 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.

@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.67%. Comparing base (03a514b) to head (de45ecd).

Additional details and impacted files

Impacted file tree graph

@@            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           
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.02% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.73% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dagemcn
dagemcn self-requested a review March 24, 2026 19:16
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Mar 24, 2026
@dagemcn dagemcn changed the title [BUGFIX:HelpQueue] Fix non-toggling user ID in OHQ [Bugfix:HelpQueue] Fix non-toggling user ID in OHQ Mar 24, 2026

@dagemcn dagemcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Mar 24, 2026

@williamjallen williamjallen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Akarshkushwaha The code changes look pretty reasonable to me, but I'd like to see a Cypress test for this before it gets merged.

@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Work in Progress in Submitty Development Mar 29, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to In Review in Submitty Development Mar 30, 2026
Comment thread site/cypress/e2e/Cypress-Feature/office_hours_queue.spec.js Outdated
@github-project-automation github-project-automation Bot moved this from In Review to Work in Progress in Submitty Development Mar 30, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to In Review in Submitty Development Apr 5, 2026
@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Apr 26, 2026

@williamjallen williamjallen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new Cypress tests are failing. Once they're resolved, this is good to go.

@github-project-automation github-project-automation Bot moved this from In Review to Work in Progress in Submitty Development Apr 30, 2026
@bmcutler

bmcutler commented Jun 1, 2026

Copy link
Copy Markdown
Member

thank you for the contribution.
closing as replaced by PR #12838

@bmcutler bmcutler closed this Jun 1, 2026
@github-project-automation github-project-automation Bot moved this from Work in Progress to Done in Submitty Development Jun 1, 2026
bmcutler pushed a commit that referenced this pull request Jun 1, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Inability to toggle user ID back to name in Office Hours Queue

4 participants