Skip to content

Add university events color picker to settings#95

Merged
Cattn merged 4 commits intomainfrom
233-uni-cal-colors
Feb 4, 2026
Merged

Add university events color picker to settings#95
Cattn merged 4 commits intomainfrom
233-uni-cal-colors

Conversation

@jaspermayone
Copy link
Member

Summary

  • Adds a color picker in Settings to customize the color of all university calendar events
  • Adds API methods for fetching and setting university calendar category preferences
  • Converts between Google Calendar color IDs (1-11) and hex values for display

Closes #233 (frontend companion to backend PR #249)

Test plan

  • Open Settings page
  • Verify "University Events Color" dropdown appears in the University Calendar Events section
  • Change the color and verify it saves (triggers API calls to set all uni_cal categories)
  • Refresh page and verify the selected color persists

- Add API methods for calendar preferences (getCalendarPreferences, setUniCalCategoryPreference, setAllUniCalCategoriesColor)
- Add color picker UI in Settings for university calendar events
- Convert between Google Calendar color IDs (1-11) and hex values
@miretskydatwit
Copy link
Member

@jaspermayone the state of the color dropdown is not saved when I exit out of the extension

@Cattn Cattn marked this pull request as draft January 12, 2026 17:24
@Cattn
Copy link
Contributor

Cattn commented Jan 12, 2026

you can convert this to a proper PR when it's fixed/resolved

Copy link
Contributor

@Cattn Cattn left a comment

Choose a reason for hiding this comment

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

@jaspermayone please look into this

@jaspermayone
Copy link
Member Author

@Cattn i think its good for review?

@jaspermayone jaspermayone marked this pull request as ready for review January 29, 2026 23:59
@jaspermayone jaspermayone requested review from Cattn and removed request for miretskydatwit January 29, 2026 23:59
@Cattn
Copy link
Contributor

Cattn commented Jan 30, 2026

@jaspermayone the state of the color dropdown is not saved when I exit out of the extension

this needs to be resolved

Copy link
Contributor

@Cattn Cattn left a comment

Choose a reason for hiding this comment

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

.

The university events color picker was not properly saving the selected
color because the async API call was not awaited. This caused the
extension popup to close before the preferences were saved to the backend.

Changes:
- Converted getter/setter pattern to async function handler
- Added proper await for API.setAllUniCalCategoriesColor()
- Added success/error snackbar notifications
- Added error handling and logging

Fixes the issue where color selection was lost on extension restart.
@jaspermayone jaspermayone requested a review from Cattn January 30, 2026 15:26
@jaspermayone
Copy link
Member Author

@Cattn this is good for re-review

@miretskydatwit
Copy link
Member

I want to test this before we merge

Copy link
Member

@miretskydatwit miretskydatwit left a comment

Choose a reason for hiding this comment

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

Image

@miretskydatwit miretskydatwit dismissed their stale review January 31, 2026 01:30

fixed myself

@Cattn Cattn added this pull request to the merge queue Feb 4, 2026
Merged via the queue into main with commit 74ffc90 Feb 4, 2026
@miretskydatwit miretskydatwit deleted the 233-uni-cal-colors branch February 4, 2026 21:10
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