Repository navigation
feat(notebook): support text direction controls - #6293
Conversation
🚨 Preview Deployment Blocked - Security ProtectionYour pull request was blocked from triggering preview deployments Why was this blocked?
How to resolve this:Option 1: Get Collaborator Access (Recommended) Option 2: Request Permission Override For Repository Administrators:To disable this security check ( This security measure protects against malicious code execution in preview deployments. Only trusted collaborators should have the ability to trigger deployments. 🛡️ Learn more about this security featureThis protection prevents unauthorized users from:
Preview deployments are powerful but require trust. Only users with repository write access can trigger them. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe notebook now supports LTR and RTL text direction for headings and paragraphs, exposes toolbar controls with translated labels, tests direction persistence and updates, and reformats the notebook widget documentation. ChangesNotebook text direction
Sequence Diagram(s)sequenceDiagram
participant NotebookToolbar
participant setTextDirection
participant TipTapEditor
participant NotebookTextDirection
NotebookToolbar->>setTextDirection: Request LTR or RTL
setTextDirection->>TipTapEditor: Focus and update active node attributes
TipTapEditor->>NotebookTextDirection: Apply the dir attribute
NotebookTextDirection-->>TipTapEditor: Serialize dir in editor HTML
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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/docs/docs/widgets/notebook/index.mdx`:
- Line 47: Correct the spelling errors in the changed notebook documentation:
update “variaty” to “variety” and normalize “Alignement” and “alignement” to
“Alignment” and “alignment” respectively.
🪄 Autofix (Beta)
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: 8ec2390e-75c7-4534-b52c-45efe2344feb
📒 Files selected for processing (5)
apps/docs/docs/widgets/notebook/index.mdxpackages/translation/src/lang/en.jsonpackages/widgets/src/notebook/notebook.tsxpackages/widgets/src/notebook/text-direction.spec.tspackages/widgets/src/notebook/text-direction.ts
|
|
||
| ### Notebook toolbar functions | ||
|
|
||
| The notebook offers a variaty of functions to edit the text and more. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix spelling errors in changed documentation lines.
Three spelling errors are present on reformatted lines:
- Line 47: "variaty" → "variety"
- Line 67: "Alignement" → "Alignment"
- Line 69: "alignement" → "alignment"
📝 Proposed spelling fixes
-The notebook offers a variaty of functions to edit the text and more.
+The notebook offers a variety of functions to edit the text and more.-#### Text Alignement
+#### Text Alignment-Select the alignement on the line. Left, center or right.
+Select the alignment on the line. Left, center or right.Also applies to: 67-67, 69-69
🧰 Tools
🪛 LanguageTool
[grammar] ~47-~47: Ensure spelling is correct
Context: ...oolbar functions The notebook offers a variaty of functions to edit the text and more....
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for 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.
In `@apps/docs/docs/widgets/notebook/index.mdx` at line 47, Correct the spelling
errors in the changed notebook documentation: update “variaty” to “variety” and
normalize “Alignement” and “alignement” to “Alignment” and “alignment”
respectively.
Source: Linters/SAST tools
|
Thank you for this ;) |
Closes #3871.
What changed
dirattribute on paragraphs and headingsWhy
Text alignment alone does not set the Unicode bidirectional base direction. This made mixed RTL/LTR content render incorrectly when Homarr's interface language used the opposite direction.
Validation
pnpm exec vitest run packages/widgets/src/notebook/text-direction.spec.tspnpm --filter @homarr/widgets typecheckpnpm exec oxlint packages/widgets/src/notebook/notebook.tsx packages/widgets/src/notebook/text-direction.ts packages/widgets/src/notebook/text-direction.spec.ts(passes with pre-existing warnings innotebook.tsx)git diff --checkSummary by CodeRabbit