Skip to content

Simplified timetable check and used HTTPS for map tiles - #1828

Merged
david-yz-liu merged 2 commits into
Courseography:masterfrom
danielrafailov:fix-sessions-check-and-https
Nov 7, 2026
Merged

david-yz-liu merged 2 commits into
Courseography:masterfrom
danielrafailov:fix-sessions-check-and-https

Conversation

@danielrafailov

@danielrafailov danielrafailov commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

This PR makes two small improvements to the timetable and map components:

  1. Simplified timetable availability check in Description.tsx: Removed the redundant Object.keys(sessions).length !== 0 condition from the timetableUnavailable check (line 22). This condition was unnecessary because optional chaining handles the caee when all three session arrays (F, S, Y) are empty or undefined. The simplified logic is clearer and achieves the same result.

  2. Updated map tile URL to HTTPS in CampusMap.tsx: Changed the OpenStreetMap tile layer URL from HTTP to HTTPS (line 154). While HTTP currently works, using HTTPS is a security best practice and prevents potential mixed content warnings when the application is served over HTTPS.

These changes improve code clarity and follow security best practices without affecting functionality.

Type of Change

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
✨ New feature (non-breaking change that adds functionality)
🐛 Bug fix (non-breaking change that fixes an issue)
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality) X
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • If this is my first contribution, I have added myself to the list of contributors.
  • I have updated the project Changelog (this is required for all changes).

After opening your pull request:

  • I have verified that the CI checks have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

@danielrafailov danielrafailov changed the title simplified timetableUnavailable logic in Description.tsx and changed … Simplified timetable check and used HTTPS for map tiles Nov 6, 2026
@coveralls

coveralls commented Nov 6, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 42243619020

Coverage decreased (-0.03%) to 60.762%

Details

  • Coverage decreased (-0.03%) from the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4294
Covered Lines: 2668
Line Coverage: 62.13%
Relevant Branches: 1007
Covered Branches: 553
Branch Coverage: 54.92%
Branches in Coverage %: Yes
Coverage Strength: 158.61 hits per line

💛 - Coveralls

@david-yz-liu david-yz-liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work, @danielrafailov!

@david-yz-liu
david-yz-liu merged commit cac3074 into Courseography:master Nov 7, 2026
3 checks 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.

3 participants