Skip to content

Add Documents portal - #1738

Open
abbra wants to merge 7 commits into
FreeFeed:stablefrom
abbra:documents
Open

abbra wants to merge 7 commits into
FreeFeed:stablefrom
abbra:documents

Conversation

@abbra

@abbra abbra commented Aug 25, 2026

Copy link
Copy Markdown

Implement UI for Documents management (FreeFeed/freefeed-server#702 and FreeFeed/freefeed-server#703) and Documents browsing.

Alexander Bokovoy added 7 commits August 24, 2026 22:58
…x highlighting

Pure TypeScript, zero runtime dependencies. Supports:
- GFM tables, task lists, definition lists, blockquotes
- Fenced code blocks with syntax highlighting
- Mermaid diagrams (flowchart, sequence, gantt, pie, state, class, ER, git, mindmap, journey, quadrant, timeline, C4, sankey, xychart)
- Math rendering (189484 ... 189484)
- Footnotes, link references
- Injection-safe HTML output

Signed-off-by: Alexander Bokovoy <ab@vda.li>
- listDocuments, getDocumentTree, getDocument
- createDocument, updateDocument, deleteDocument
- getPublicDocument
- Uses v5 API prefix separate from the default apiVersion

Signed-off-by: Alexander Bokovoy <ab@vda.li>
Six action types for documents: LIST, TREE, GET, CREATE, UPDATE, DELETE
Action creators with apiRequest pattern matching existing Freefeed conventions
Reducers for async states and response data carriers

Signed-off-by: Alexander Bokovoy <ab@vda.li>
- DocumentView: rendered markdown with per-block inline editing (click to
  edit, blur to save locally); toolbar with copy/export/import/slug/visibility
- DocumentList: top bar with Browse dropdown showing user's document tree
- DocumentsPage: orchestrates state, handles save/delete with tree refresh
- PublicDocumentView: read-only public view at /docs/:user/:slug
- Inline slug editing and visibility selector with default from user feed

Signed-off-by: Alexander Bokovoy <ab@vda.li>
- Add /documents and /docs/:slug routes with lazy-loaded components
- Add Documents nav link to the authenticated sidebar

Signed-off-by: Alexander Bokovoy <ab@vda.li>
Replace hardcoded light-theme color fallbacks (--box-bg: #fff,
--box-border: #ddd, etc.) with document-scoped CSS custom properties
(--doc-bg, --doc-border, etc.) that are overridden in .dark-theme
context using the app's dark-vars.scss SCSS variables.

Light defaults stay as CSS var fallbacks for runtime theme switching
without redefining every property.

Signed-off-by: Alexander Bokovoy <ab@vda.li>
…ing styles

Scope CSS custom properties at :root instead of .documents-page so
PublicDocumentView inherits them too. Add dark-theme overrides for
mermaid diagram SVG variables (--surface, --accent, --border, etc.)
via SCSS dark-vars import.

Add code block styling with --doc-code-bg that adapts to theme.
Add syntax highlighting token colors (hl-kw, hl-str, hl-com, etc.)
with GitHub-inspired light and dark variants.

Signed-off-by: Alexander Bokovoy <ab@vda.li>
@abbra

abbra commented Aug 25, 2026

Copy link
Copy Markdown
Author

Demo of how it looks like: https://youtu.be/GS7K76kAdq8

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.

1 participant