Self-hosted: Journal, the first layout-level theme - #1446
Conversation
Ink on paper: one measure-width column, an author block as the masthead, entries as date, large serif title and excerpt separated by hairline rules. No cards, no sidebar, no counters on the archive; warm paper light mode and warm charcoal dark mode, with accent inks matching exactly what the correction module chooses for the same fills, so static CSS and runtime preview agree (guard-tested). The structural half exercises the manifest platform end to end: journal overrides the Shell and PostCard seams and everything else falls back to the shared defaults. The manifest gains unsupportedOptions, the explicit declaration the contract demanded for toggles a theme's components do not consume: the editor hides the sidebar section and the list-type select under Journal through the first real visibleWhen predicates, reading the EDITED document so the panel reacts to an unsaved template switch, while stored values stay untouched and apply again on switching back. Search results now resolve their entry card through the registry, so search wears the active theme's look. The roster, catalog card, editor label and CSS registry all extend through their existing forcing functions (satisfies maps, the roster-to-CSS guard suite, the token-contract sweep with its counts bumped for a sixth template). Closes #1420
PR Summary by QodoAdd Journal layout-level theme with manifest-gated layout options
AI Description
Diagram
High-Level Assessment
Files changed (14)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 186c8cb6b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <span className="ml-auto flex items-center gap-3"> | ||
| <SearchInput /> | ||
| <UserMenu /> | ||
| </span> |
There was a problem hiding this comment.
Preserve the create-post entry point in Journal
When Journal is active, this action area renders only search and the user menu, while the shell replaces BlogNavigation, the only component found in the SPA that mounts CreatePostButton. Consequently, authenticated community members and blog owners lose the visible route to the internal publisher or configured external create-post URL and can publish only by already knowing the destination; render CreatePostButton from the Journal shell as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 6d44b32: JournalShell now mounts CreatePostButton, and the commit records this as the standing contract for any theme shell. Good catch, this was the one real functional loss in the redesign.
|
Warning Review limit reached
Next review available in: 41 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR adds the Journal style template with dedicated metadata, styling, layout, post-card rendering, theme registration, search integration, and configuration controls that hide unsupported sidebar and list options. ChangesJournal theme
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant JournalShell
participant SearchResults
participant ThemeRegistry
participant JournalPostCard
Browser->>JournalShell: Render Journal page
JournalShell->>SearchResults: Render page children
SearchResults->>ThemeRegistry: Resolve PostCard
ThemeRegistry-->>SearchResults: Return JournalPostCard
SearchResults->>JournalPostCard: Render entry data
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/self-hosted/src/styles/themes/journal.css`:
- Around line 15-17: Update the --theme-font-ui declaration to use lowercase
font-family keyword values for BlinkMacSystemFont and Arial, while preserving
the existing font fallback order and other values.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 67978e6b-3fac-421c-90d6-3bececc43685
📒 Files selected for processing (14)
apps/self-hosted/hosting/api/src/style-template-display.tsapps/self-hosted/hosting/api/src/style-templates.tsapps/self-hosted/src/core/i18n-strings.tsapps/self-hosted/src/features/blog/components/search-results.tsxapps/self-hosted/src/features/floating-menu/config-fields.test.tsapps/self-hosted/src/features/floating-menu/config-fields.tsapps/self-hosted/src/styles/theme-appearance-tokens.test.tsapps/self-hosted/src/styles/themes/index.cssapps/self-hosted/src/styles/themes/journal.cssapps/self-hosted/src/themes/journal/journal-post-card.tsxapps/self-hosted/src/themes/journal/journal-shell.tsxapps/self-hosted/src/themes/manifest.tsapps/self-hosted/src/themes/registry.test.tsapps/self-hosted/src/themes/registry.ts
Code Review by Qodo
1.
|
Code Review by Qodo
1. Publishing control disappears
|
The real catch: the default navigation is what mounts CreatePostButton, so a shell that replaces it silently cost owners and community members the way into the composer. JournalShell now mounts it, and that is the standing contract for any theme shell. Also from review: the filter state and label logic is extracted into a shared usePostsFilterState hook consumed by both BlogNavigation and JournalShell, so no shell can drift from the navigation's behavior; the masthead action row wraps at narrow viewports instead of overflowing the measure-width column; light-mode muted text rises to ~4.7:1 AA over the paper background; and the visibility test walks the section tree through a typed helper instead of an any cast.
No lint gate in this repo requires it today (verified: no stylelint config exists), but two reviewers flagged the casing independently and quoted strings are exempt from keyword-case rules, so a future stylelint adoption cannot flag this file either.
Closes #1420.
The first layout-level design on the theme manifest platform (#1442): Journal, ink on paper. One measure-width column, an author block as the masthead (avatar, title, description, a quiet filter row with search and the user menu), entries as date, large serif title and excerpt separated by hairline rules. No cards, no sidebar, no counters on the archive; stats and actions live on the post page. Warm paper light mode, warm charcoal dark mode; both accent inks are exactly what the correction module chooses for the same fills, so static CSS and the runtime preview agree, and the token-contract guard suite enforces it.
Platform pieces this exercises for the first time:
unsupportedOptions, the explicit declaration the contract demanded for config toggles a theme's components do not consume. The editor hides the sidebar section and the list-type select under Journal through the first realvisibleWhenpredicates (Self-hosted: per-theme option visibility in the Configuration Editor #1443), reading the EDITED document so the panel reacts to an unsaved template switch. Stored values are untouched and apply again the moment the owner switches back.satisfiesmaps, the roster-to-CSS guard suite, the token sweep with its template counts bumped to six).Verified: SPA 906 tests, hosting API 419 (the catalog test now covers six cards), typecheck, production build with the node-globals guard, lint clean. Visual pass: the theme activates only when chosen, so it ships dormant; preview it live on any instance through the Configuration Editor (pick Journal, Preview) and iterate from there.
Summary by CodeRabbit
New Features
Improvements