Skip to content

Calendar#1437

Open
Fingel wants to merge 41 commits intodevfrom
calendar
Open

Calendar#1437
Fingel wants to merge 41 commits intodevfrom
calendar

Conversation

@Fingel
Copy link
Copy Markdown
Contributor

@Fingel Fingel commented Mar 1, 2026

Basic calendar application as a base to build TOM/Astronomical specific functionality on top of. Just a simple month view for now, with the standard CRUD actions for events. Event model can be extended. Event model can be created elsewhere in the TOM as an easy way to add items to the calendar.

Uses HTMX, no third party dependencies.

Closes #1436 #1442 #1443 #1444

Screencast-2026-02-28-21.16.mp4

@Fingel Fingel requested review from jchate6 and phycodurus March 1, 2026 05:30
@Fingel Fingel self-assigned this Mar 1, 2026
@Fingel Fingel linked an issue Mar 1, 2026 that may be closed by this pull request
@jchate6 jchate6 moved this to Needs Review in TOM Toolkit Mar 1, 2026
@phycodurus phycodurus requested a review from rachel3834 March 2, 2026 17:59
@Fingel Fingel linked an issue Mar 5, 2026 that may be closed by this pull request
@Fingel Fingel linked an issue Mar 5, 2026 that may be closed by this pull request
@Fingel Fingel linked an issue Mar 6, 2026 that may be closed by this pull request
@rachel3834
Copy link
Copy Markdown
Contributor

rachel3834 commented Mar 11, 2026

Bug:

  • Clicking on an event with an URL redirects to that URL; this should bring up the edit popup
  • Clicking on a random day with no event brings up the last-created event or nearest-event edit box.

Feedback on initial implementation of calendar from TOM Hack Session:

  • When creating an event entry in the calendar, it would be great to have another string field for the instrument as well as the telescope.
  • In the event create popup box, datetime fields should indicate the timezone they refer to. Having UTC as the default is ideal, but most users would also consider setting this to the telecsope's local time (though UTC is the only thing that works for space telescopes). Also, the field should indicate the expected format for each of the components of the fields.
  • It would be great to be able to add "to dos" when creating the event and not just when editing an existing one
  • It would be great to be able to reorder to the to-dos, or edit the list to insert ones.
  • It would be great to support different types of events with different parameters. The current one is great for observing runs, but users would also like to add, e.g.:
  • Meetings with location fields rather than telescope and instrument
  • Deadline
  • A direct link to the Target List rather than just the name of the list would be helpful. (We did notice the little vertical bar on the calender block but we think this is a big subtle)
  • Is it possible to have day and week displays for the calendar as well as monthly? Alternatively clicking on a day to bring up an overview of all events on that day would be useful.
  • Is it possible to query the calendar via API or to add events to the calendar?

For future calendar in target page:

  • Days to indicate angular separation of target from Moon.

@rachel3834
Copy link
Copy Markdown
Contributor

I recommend that we review this list of updates with a view to what can get completed and released this sprint versus what we can add later. Overall users were excited to have the new functionality asap.

@jchate6 jchate6 assigned phycodurus and unassigned Fingel Mar 27, 2026
@jchate6 jchate6 self-assigned this Apr 8, 2026
Copy link
Copy Markdown
Contributor

@jchate6 jchate6 left a comment

Choose a reason for hiding this comment

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

When clicking on an empty day, it should bring up the new event pop up rather than the most recently selected event.

This appears to be caused by a value error:
ValueError: time data 'April 16, 2026' does not match format '%Y-%m-%d'

There are also a bunch of codacy concerns.

@Fingel
Copy link
Copy Markdown
Contributor Author

Fingel commented Apr 11, 2026

When clicking on an empty day, it should bring up the new event pop up rather than the most recently selected event.

This appears to be caused by a value error: ValueError: time data 'April 16, 2026' does not match format '%Y-%m-%d'

I can't reproduce this in Firefox or Chromium. Create new event, close. Click blank area on calendar and it's a fresh form. Same for viewing another event. Is there a specific sequence I need to follow to trigger this?

There are also a bunch of codacy concerns.

These are awful! "Missing docstring for magic method str"? Really? It also wants a docstring for the Meta class on the Event model... just no.

There's a few others, all related to docstrings, about various missing newlines or whatever. I tried fixing a few but this seems like mostly a waste of time.

@jchate6
Copy link
Copy Markdown
Contributor

jchate6 commented Apr 11, 2026

I can't reproduce this in Firefox or Chromium. Create new event, close. Click blank area on calendar and it's a fresh form. Same for viewing another event. Is there a specific sequence I need to follow to trigger this?

Yeah, I'm not sure what's going on, I didn't look too closely into it.
@rachel3834 seemed to mention a similar issue above. I'll take a more thorough look next week.

These are awful! "Missing docstring for magic method str"? Really? It also wants a docstring for the Meta class on the Event model... just no.

There's a few others, all related to docstrings, about various missing newlines or whatever. I tried fixing a few but this seems like mostly a waste of time.

I think we must have added the pydocstyle linter or something.
I didn't really look at the issues when I made that comment. Since then, I've taken a closer look and we should figure out how to disable this. It triggered on 2 contradictory style formats (see slack) so something is definitely not configured correctly.

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

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

Calendar - todo list Calendar - more fields Associate target lists with calendar events Basic calendar functionality

4 participants