Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add calendar feature #178

Open
wants to merge 66 commits into
base: dev
Choose a base branch
from
Open

Add calendar feature #178

wants to merge 66 commits into from

Conversation

KevinTriplett
Copy link
Contributor

@KevinTriplett KevinTriplett commented Jan 30, 2025

closes #57

Ready for review - complete for now

@KevinTriplett
Copy link
Contributor Author

KevinTriplett commented Jan 30, 2025

sloppy git rebase of dev branch ... agh

@KevinTriplett KevinTriplett marked this pull request as draft January 30, 2025 03:48
@thomasgwatson
Copy link
Collaborator

So, unclear to me if the existence of the new calendar view is actually utilized by stuff in the context menu.

Not until we get a Calendar widget. Ironically, I wouldn't recommend it as a default view at this time. Even Mighty Networks has the calendar view for events as an option, not the default. A context menu Calendar widget, yeah, should default to calendar viewmode (maybe the only viewmode).

Ok, lets touch on this in product and see what the crew thinks. Any changes that comes out of a product discussion we'd cover in a separate, probably pretty small, ticket.

@thomasgwatson
Copy link
Collaborator

Thank you so much, for this! So awesome to have a plush calendar view!

Copy link
Collaborator

@thomasgwatson thomasgwatson left a comment

Choose a reason for hiding this comment

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

lgtm

@tibetsprague
Copy link
Collaborator

is this still a Draft Kevin, or is it really ready for review and testing?

@tibetsprague
Copy link
Collaborator

a Draft PR means its not really ready for review

@KevinTriplett
Copy link
Contributor Author

KevinTriplett commented Feb 6, 2025

Ready for review -- although still working on some things like multiple days (interval) posts.

@KevinTriplett KevinTriplett marked this pull request as ready for review February 6, 2025 18:48
@KevinTriplett
Copy link
Contributor Author

KevinTriplett commented Feb 6, 2025

To be clear, this version of the calendar is good enough for now, to test and potentially merge into dev.

Currently:

  • TODO: A "Calendar" widget button in the context menu would default viewmode to calendar with all posts that have start and end dates with a postTypes = ['event', 'project', 'request', 'offer', 'proposal']. This Calendar widget can be added or removed from the context menu like the other widgets.

  • The calendar viewmode button is shown for post types that have start and end dates post.type in ['event', 'project', 'request', 'offer', 'proposal'].

  • The "sort order" or "upcoming events / past events" shows one choice "All" in Calendar viewmode.

  • Colors now follow our global web colors. Maybe not theme, need to discuss at the next product meeting.

  • Width of the calendar now expands to fill the available space in the main view area, like the map feature

  • File are organized in a "src/components/Calendar" folder, no more "EventCalendar" folder.

  • TODO: display multi-day posts, that span more than one day. How to display this needs to be discussed. Currently, multi-day posts are shown on the start date only.

@thomasgwatson
Copy link
Collaborator

"The "sort order" or "upcoming events / past events" shows one choice "All" in Calendar viewmode."

I think, ok to just hide this when viewMode === 'calendar'

postTypes = ['event', 'project', 'request', 'offer']

proposal type posts also can have start and end times.

@KevinTriplett
Copy link
Contributor Author

KevinTriplett commented Feb 6, 2025

"The "sort order" or "upcoming events / past events" shows one choice "All" in Calendar viewmode."

I think, ok to just hide this when viewMode === 'calendar'

I agree, and tried this, but the viewmode buttons would move all the way to the left, which can be annoying if the calendar button is hit by accident or someone is wanting to see what the different viewmodes do. There may be some way to nail down the position of the viewmode buttons so they don't move laterally.

postTypes = ['event', 'project', 'request', 'offer']

proposal type posts also can have start and end times.

Good point, I also show calendar viewmode option for proposals, so all good there.

@KevinTriplett
Copy link
Contributor Author

"The "sort order" or "upcoming events / past events" shows one choice "All" in Calendar viewmode."

I think, ok to just hide this when viewMode === 'calendar'

I'm hiding it now -- I think it looks okay now that the calendar fills the main view space. 👍🏼

@tibetsprague
Copy link
Collaborator

doing some testing.
bug 1: opening an event and then closing it changes the view mode back to cards so the calendar disappears

@tibetsprague
Copy link
Collaborator

bug 2: it seems that no events appear on the calendar unless I first select "past" events and then switch to the calendar. it should ignore the timeframe param when on calendar view mode

@tibetsprague
Copy link
Collaborator

feature desire: it feels moderately important to show events that span multiple days as doing that. is that possible with this component?

@tibetsprague
Copy link
Collaborator

other than that its looking good!

@KevinTriplett
Copy link
Contributor Author

KevinTriplett commented Feb 7, 2025

bug 1: opening an event and then closing it changes the view mode back to cards so the calendar disappears

I'll be happy to be assigned this as a separate ticket, since this happens for ALL views when using "esc" to close the event. Clicking the "X" works as expected, so this is not related to the calendar feature.

bug 2: it seems that no events appear on the calendar unless I first select "past" events and then switch to the calendar. it should ignore the timeframe param when on calendar view mode

Oooh ... good one. I'll fix this.

feature desire: show events that span multiple days

Agreed, and I'd like to do this after fixing bug 2 and merging into dev. For now, I'll find an elegant way to show multi-day events. I also need to show "more ..." when there's more events than can be displayed in the calendar.

@KevinTriplett
Copy link
Contributor Author

KevinTriplett commented Feb 7, 2025

@tibetsprague

Bug 2 is fixed and I'm exploring different ways to show multi-day events. I'll commit to adding this feature asap.

Another bug I'm working on now is when adding a new event, it doesn't show on the calendar until refreshing the browser. I'll fix this one next. [Update: I may need help with this one, as the other viewmodes are showing the new event without refresh, but not calendar viewmode
¯\(ツ)

May I merge now and work on that feature over the next two weeks?

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.

Create calendar view for events
3 participants