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

feat: offer a week-view #25

Open
gunnartorfis opened this issue Mar 7, 2024 · 2 comments
Open

feat: offer a week-view #25

gunnartorfis opened this issue Mar 7, 2024 · 2 comments

Comments

@gunnartorfis
Copy link

Similar to Wix's Agenda component and my current calendar component, there's a possibility to show a week view strip that is expandable to a month view.

Here's a demo of how it works in my app at the moment:
https://github.com/MarceloPrado/flash-calendar/assets/5333875/90bf0dd1-db03-4483-b735-3a231fad1b42

The way I implemented it is that we render both the month view and the week view, then animate the height & opacity for each, depending on which view is visible. That is a very simple approach but I'm not sure how Wix's implementation is with the Agenda component - that seems more advanced, like they're reusing the week/rows when toggling between the week & month view.

Anyways, I'd be happy to contribute and help with such an implementation. I just wanted to open this issue so we can discuss if this is something this library would want to add support for, and if so, go into implementation planning together.

@MarceloPrado
Copy link
Owner

Hi @gunnartorfis, thanks for reporting it!

I noticed your example follows a "page-base" style. If we were to build something similar, I believe we'd also need to support an infinite-scroll mode, where you could endlessly scroll the days without them snapping into each week.

I'm not opposed to Flash Calendar offer such component. I'd be happy to review contributions and offer guidance.

When it comes to your demo, I agree with your take: we're discussing two different things here:

  1. A horizontal-scrollable calendar (similar to Docs: horizontal swiping #24), but with all days in a single row and optional snap-to-week mode.
  2. A regular month-based calendar, already supported by Flash Calendar.

The toggle between each should live in consumer land

@gunnartorfis
Copy link
Author

gunnartorfis commented May 20, 2024

Somehow the notification was lost, sorry about the late reply @MarceloPrado

I believe we'd also need to support an infinite-scroll mode, where you could endlessly scroll the days without them snapping into each week.

Tbh I don't think an infinite scroll mode would be necessary for a week-view, since the nature of the usage is most likely a bit different than in a month one - it would mimic iOS's native calendar app week strip.

The toggle between each should live in consumer land

We'd lose control over animations between the two, right?

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

No branches or pull requests

2 participants