Skip to content

Introduce slim documents #3140

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
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Introduce slim documents #3140

wants to merge 4 commits into from

Conversation

gregberge
Copy link
Contributor

@gregberge gregberge commented Apr 11, 2025

We introduce slim documents, it's a lighter version of the document
computed in GitBook Open to lightweight to document stored in cache and
transferred to client. The idea is to store in this document only what
is needed to display a document in GitBook Open.

Fix RND-6822

Copy link

changeset-bot bot commented Apr 11, 2025

🦋 Changeset detected

Latest commit: 35dfe45

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
gitbook-v2 Patch
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

argos-ci bot commented Apr 11, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v1 (Inspect) ✅ No changes detected - Apr 12, 2025, 6:32 PM
customers-v2 (Inspect) ✅ No changes detected - Apr 12, 2025, 6:33 PM
default (Inspect) 👍 Changes approved 4 changed Apr 12, 2025, 6:34 PM
v2-vercel (Inspect) ✅ No changes detected - Apr 12, 2025, 6:36 PM

We introduce slim documents, it's a lighter version of the document
computed in GitBook Open to lightweight to document stored in cache and
transferred to client. The idea is to store in this document only what
is needed to display a document in GitBook Open.
Copy link
Contributor

@emmerich emmerich left a comment

Choose a reason for hiding this comment

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

My first thought is: why doesn't this live in the API?

@gregberge
Copy link
Contributor Author

@emmerich it's tight to GBO and what we display in it. I think it's easier to maintain here. @SamyPesse didn't want it in the API

Copy link

linear bot commented Apr 14, 2025

@SamyPesse
Copy link
Member

@emmerich It should not be done in the API, because the choice of what data is important or not to be stored in the cache is relative to what GBO needs to do.

Our API should always respond with "all" the properties needed for different use-cases (some properties are useless on revision pages for GBO, but needed for our users using the API).

GBO can then choose to pick only some properties to select and cache; depending on what is being used.

In the API, we should just get rid of some deprecated properties on Revision.

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.

3 participants