Repository navigation
feat: show shared pages and boards to guests - #86
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The last unbuilt part of Boards B1: guest links for pages and boards. Shared links used to show only the title.
CopyLinkmoved out of the event page intocomponents/CopyLink.tsxso both use it.GET /share/:codenow also returnscontent: a page's document state, or a board's elements. A shared page renders read-only with the same blocks as the editor (callouts, toggles, tables and so on); a shared board renders as a drawing.GET /share/:code/files/:fileIdserves a file only when the shared item links to it as an attachment (an image on the page or board); anything else is 404. Pages and boards load images through a small file-source context (components/file-source.ts), so the signed-in app keeps using/files/:id.pageContent()innote-extensions.tsx, shared by the editor and the guest view.BoardPreviewsplit into fetching andBoardDrawing.Checked in the browser (local stack): a shared board shows its shapes, notes and an image loaded through the guest file route; a shared page renders read-only with every block type.
Tests: guest page and board cases in
test/agenda.spec.tsx, share button case intest/notes.spec.tsx;test/integration/notes.spec.tscovers shared content and that guests only get the images on the shared item,invitations.spec.tsthe response shape (CI).