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

Full support for collection views #23

Closed
8 of 10 tasks
transitive-bullshit opened this issue Jul 22, 2020 · 11 comments
Closed
8 of 10 tasks

Full support for collection views #23

transitive-bullshit opened this issue Jul 22, 2020 · 11 comments

Comments

@transitive-bullshit
Copy link
Contributor

transitive-bullshit commented Jul 22, 2020

Let's track progress in this issue. Higher priority items listed first.

Note that none of these items have been merged or released yet.

  • table view
  • gallery view
  • list view
  • board view
  • calendar view
  • formula support
  • ability to switch views
  • lazy loading for larger collections (e.g. pokedex)
  • ability to search / filter views
  • ability to sort views
@transitive-bullshit
Copy link
Contributor Author

I found a solid WIP implementation here by @logicalicy.

Here's what his version currently looks like:

Screen Shot 2020-07-22 at 6 51 02 AM

@logicalicy would you be open to joining a zoom call at some point to discuss collaborating and share knowledge?

@tobiaslins
Copy link
Member

Looks cool!

I think supporting all types of views would be cool and also switching between them. Filtering/search+ sorting is a nice to have

@transitive-bullshit
Copy link
Contributor Author

Here's a kitchen sink type test page for table views: https://www.notion.so/saasifysh/Collection-Tests-2fea615a97a7401c81be486e4eec2e94

@logicalicy
Copy link

logicalicy commented Jul 24, 2020

@logicalicy would you be open to joining a zoom call at some point to discuss collaborating and share knowledge?

Hey @transitive-bullshit I haven't been advertising the project so very cool that you've found it! Happy to join a zoom, sure. What's the best way? (Feel free to DM me on Twitter, same handle)

@transitive-bullshit
Copy link
Contributor Author

transitive-bullshit commented Jul 24, 2020

Awesome - it looks like your twitter DMs aren't open to the public, so would you mind pinging me on this open slack workspace? https://slack.saasify.sh

Tobias and Timo are also on there in the #react-notion channel, so it could be useful to discuss things going forwards.

@logicalicy
Copy link

in the #react-notion channel

Have joined!

@transitive-bullshit
Copy link
Contributor Author

transitive-bullshit commented Aug 19, 2020

Update

I've added support for 95% of collection views, but it required a lot of changes.

I've also refactored the Notion API and types into their own, isolated packages, notion-client and notion-types which you can find here: https://github.com/saasify-sh/notion-kit

One of the main changes is instead of changing the shape of the data that's returned from the API and injecting collection data into blocks, it's much, much easier to work with and debug these use cases if we retain the exact same structure as the original Notion API. So now NotionRenderer takes in an ExtendedRecordMap instead of a simple BlockMap.

Supported Views

  • table collection view
  • gallery collection view
  • list collection view
  • board collection view
  • collection view page

The only missing collection view at the moment is calendars.

Demo

Here's a quick side-by-side demo video of the progress.

@lukebennett
Copy link

What's the latest on this? I can't see a branch anywhere, how would I have a play with it? If it's mostly there, what's the possibility of pushing an alpha package or something?

@transitive-bullshit
Copy link
Contributor Author

transitive-bullshit commented Oct 7, 2020

@lukebennett you can check out a full working version of my fork at react-notion-x.

Due to the large amount of changes needed to support collections as well as many other block types and fixes, I decided to release it as a separate project for now. My hope is that react-notion and react-notion-x can eventually be merged back together, but either way I wanted to get all the work I've done improving react-notion over the past few months back in the land of open source. See #36 for more context.

@lukebennett
Copy link

Aha great, thanks for making that available! I'd already migrated to notion-client so hopefully react-notion-x will slot right in alongside it - collections is one of the key things I need. I'll take a gander at #36 as well, would be great to consolidate everything back together.

@transitive-bullshit
Copy link
Contributor Author

Yep; react-notion-x goes hand-in-hand with notion-client.

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

4 participants