Skip to content

Conversation

@iosifidis
Copy link
Member

Description

This PR updates the MenuBox component to directly handle navigation for semester and exam schedules. By checking for these specific routes (/semesterschedule and /examschedule) and using window.open directly within the user-initiated click handler, we ensure that the schedule links open in a new tab reliably without triggering the browser's popup blocker.

Additionally, this PR includes some code reformatting (whitespace and indentation adjustments) in MenuBox.jsx.

Related Issue

Motivation and Context

Users were experiencing issues where clicking on "Course Schedules" or "Exam Schedules" buttons would be blocked by the browser's popup blocker. This prevented them from accessing the schedule directly, requiring manual intervention to allow popups. This change ensures a smoother user experience.

How Has This Been Tested?

Manually tested the application by:

  1. Selecting a department (e.g., Applied Informatics).
  2. Clicking on the "Course Schedules" card.
  3. Verified that the schedule page opens immediately in a new tab without any popup blocker warnings.
  4. Verified that other menu items still navigate correctly.
  5. Dockerized it (tag:latest): https://hub.docker.com/r/iosifidis/myuom

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant