Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Calendar collection view #369

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

Open
MichaelCasaDev wants to merge 25 commits into NotionX:master
base: master
Choose a base branch
Loading
from MichaelCasaDev:collection-view-calendar

Conversation

@MichaelCasaDev
Copy link
Contributor

@MichaelCasaDev MichaelCasaDev commented Sep 8, 2022
edited
Loading

New Features

  • Sun-Sat or Mon-Sun week view
  • Show or hide calendar controls (showCalendarControls: boolean)
  • Decide to start the weeks on Monday or Sunday (startWeekOnMonday: boolean )
  • Automatic query from Notion's calendar collection
  • Automatic full-width for database pages with calendar collection views

Description

Adding full support to the Notion calendar collection view, which lacks support in react-notion-x

Notion Test Page ID

Page with a calendar view component

transitive-bullshit, normdoow, 9oelM, AngCosmin, liqun98, MichaelCasaDev, mj-jess, kantorcodes, and jotapepinheiro reacted with heart emoji
- Added calendar view to Collection view exports
- Base calendar, CSS inline from Notion
- Pages render in the correct days
- Sun-Sat week view
Copy link

vercel bot commented Sep 8, 2022
edited
Loading

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-notion-x ❌ Failed (Inspect) 💬 Add feedback Oct 10, 2024 4:15pm
react-notion-x-minimal-demo ❌ Failed (Inspect) 💬 Add feedback Oct 10, 2024 4:15pm

- New custom Collection card for the calendar view
- Show correctly the month
Improved card title, now more like the Notion one
- Now calendar controls (next month, prev month and today) works
- Correctly mark current month day numbers
- Display the current month correctly (top left)
- Display the month in the calendar view in the first day of each month
- Show full month in every view
- Edit text component to show long months names
- New method "getPagePropertyFromId" to retrive a page property by a given property ID, used to get the query date used by Notion calendar's view
@MichaelCasaDev MichaelCasaDev changed the title (削除) WIP: Calendar view basis (削除ここまで) (追記) WIP: Calendar collection view (追記ここまで) Sep 9, 2022
New property for the renderer "showCalendarControls" to show or not the calendar controls (next month, prev month, today) ̇
TODO: add calendar dark mode theme
- Added dark-mode css for the new calendar view
- Updated background of dark-mode to the new Notion one
- Moved hover states from React to CSS
- Removed all dynamic styles and used with classes
Copy link

vercel bot commented Sep 11, 2022

Deployment failed with the following error:

The most recent charge for your active payment method has failed. Please update it here: https://vercel.com/teams/saasify/settings/billing.
MichaelCasaDev reacted with confused emoji

Full width for full page collection view
- Added the ability to start weeks on Monday via `startWeekOnMonday`
- Made proper icons components for calendar controls
@MichaelCasaDev MichaelCasaDev changed the title (削除) WIP: Calendar collection view (削除ここまで) (追記) Calendar collection view (追記ここまで) Sep 23, 2022
@MichaelCasaDev MichaelCasaDev marked this pull request as ready for review September 23, 2022 14:11
Copy link
Contributor Author

MichaelCasaDev commented Sep 23, 2022
edited
Loading

@transitive-bullshit @normdoow

Everything on my to-do list is checked, and ready for PR review!
With this PR, calendar collection view is fully integrated into react-notion-x.

normdoow reacted with thumbs up emoji

Copy link
Contributor Author

MichaelCasaDev commented Feb 3, 2023
edited
Loading

Hey @transitive-bullshit and @normdoow I have been away for a long time from this repo and from this PR but I'm happy to say that I have made some new commits that fix your reviews and also set some features:

  • Now support all types of page icons
  • Can have multiple blocks per day
  • New method to generate weeks in month (simpler and faster)

Edit: It doesn't currently support date range and include time functions of Notion, it wouldn't render the page block or the displayed data will be something strange.

The today date indicator now check also the correct now year
Copy link

Is there anything outstanding to merge this one in?

- More comments
- Fixed first day of month red background circle to not show the month name (it's shown up in the calendar controls)
WIP: The October 2023 has a strange bug (probably in the algo) that shows the 1st October as Saturday and not Sunday (only on the view that has Sunday as first week day (by using `startWeekOnMonday` it doesn't appear))
Copy link
Contributor Author

Is there anything outstanding to merge this one in?

Hey @kantorcodes thanks for commenting, I've to say that I've let this PR open and didn't actually take care of.
The calendar view is one of the most complex that Notion has, and for the moment it's working very well on my test deployment. I will let this be reviewed in some weeks (at the moment it doesn't support all the features that it has on Notion or on Super.so but it's working quite well)

More infos about the calendar view and what it can handle and what it can't
Copy link

Is there anything outstanding to merge this one in?

Hey @kantorcodes thanks for commenting, I've to say that I've let this PR open and didn't actually take care of. The calendar view is one of the most complex that Notion has, and for the moment it's working very well on my test deployment. I will let this be reviewed in some weeks (at the moment it doesn't support all the features that it has on Notion or on Super.so but it's working quite well)

Thanks @MichaelCasaDev it'll be suburb to have this added in :)

Copy link

MichaelCasaDev, jigs1996, and spashii reacted with eyes emoji

Copy link

Hey @transitive-bullshit would love to see this one approved! :)

MichaelCasaDev, jigs1996, and kych0912 reacted with heart emoji

Copy link

Hey @transitive-bullshit Could you pelase merge this one this is the 1 which remain from notion block

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

Reviewers

@transitive-bullshit transitive-bullshit Awaiting requested review from transitive-bullshit

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /