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

refactor: rename page to doc #6290

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

AyushAgrawal-A2
Copy link
Contributor

@AyushAgrawal-A2 AyushAgrawal-A2 commented Feb 23, 2024

TOV-561
closes #6214

Before this pr, we have

  • Page (store),
  • PageBlock (having page and edgeless views)
  • pageMode (have page and edgeless mode)

To avoid any confusion due to name overlap, I have renamed:

  • Page (store) to Doc
  • PageBlock to RootBlock, (this is in line with syntax doc.root & doc.slots.rootAddedOn. flavour is still "affine:page")
  • pageMode to editorMode, having 2 modes - page, edgeless

So now -

  • "page" word is now used only when related to page editorMode.
  • "edgeless" word is now used only when related to edgeless editorMode.
  • doc refers to store object only.
  • root refers to root block only.

Exception -

  • pageId is renamed to docId, (everywhere, except in block props & snapshot payload)
  • pageVersion & pages properties in WorkspaceMetaState
  • page property in BlockModel (this is marked as deprecated and expected usage is via doc getter and setter)

Change log - https://app.affine.pro/share/63a1780d-ee20-4b7f-ac70-f254e4154120/rduRN-2fxFklR-nLSZVYe

Copy link

vercel bot commented Feb 23, 2024

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

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2024 7:53pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2024 7:53pm

@AyushAgrawal-A2 AyushAgrawal-A2 marked this pull request as draft February 23, 2024 17:52
@doodlewind doodlewind added the notable Major improvement worth emphasizing label Feb 24, 2024
Copy link
Member

@doodlewind doodlewind left a comment

Choose a reason for hiding this comment

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

Have double checked that this doesn't break data, we'll hand over and focus on the next step bumping AFFiNE.

@doodlewind doodlewind merged commit fb79e2f into toeverything:master Feb 27, 2024
19 checks passed
@AyushAgrawal-A2 AyushAgrawal-A2 deleted the ayush/6214 branch February 27, 2024 03:24
ununian pushed a commit to ununian/blocksuite that referenced this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Contains breaking change that must be addressed notable Major improvement worth emphasizing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Renaming page to doc
3 participants