fix: improve editor UI#347
Conversation
📝 WalkthroughWalkthroughThis PR updates theme styling: the global Chakra theme's text-selection rule is changed from a ChangesTheme styling adjustments
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Poem 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 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 `@packages/app/src/features/NoteEditor/RichEditor/theme/RichEditor.css`:
- Line 105: The RichEditor theme is using color tokens that point at the parent
variables instead of the actual leaf values, so the text and link colors won’t
resolve correctly. Update the color references in the RichEditor CSS to use the
`-base` Chakra variables for the typography and link tokens, and verify the
affected styles in the RichEditor stylesheet still point to the correct token
names.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a178e3f1-68ce-4815-a0cd-12fef1dcdd63
📒 Files selected for processing (2)
packages/app/src/components/theme/base.tspackages/app/src/features/NoteEditor/RichEditor/theme/RichEditor.css
| .RichEditor__textCode { | ||
| background-color: var(--chakra-colors-dim-100); | ||
| color: var(--chakra-colors-typography-base); | ||
| color: var(--chakra-colors-typography); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify `typography` and `link` (non-base) color tokens are defined in the theme.
rg -n "typography:|link:" packages/app/src/components/theme/color-schemes -A3Repository: DeepinkApp/deepink
Length of output: 2751
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== theme files =="
git ls-files 'packages/app/src/components/theme/color-schemes/**/*.ts' \
'packages/app/src/components/theme/**/*.ts' \
'packages/app/src/features/NoteEditor/RichEditor/theme/RichEditor.css' | sed 's#^`#-` #'
echo
echo "== search for typography/link CSS var usage =="
rg -n --hidden --no-ignore -F -- '--chakra-colors-typography' packages/app/src || true
rg -n --hidden --no-ignore -F -- '--chakra-colors-link' packages/app/src || true
echo
echo "== theme/token config references =="
rg -n --hidden --no-ignore -F 'cssVarsPrefix' packages/app/src || true
rg -n --hidden --no-ignore -F 'semanticTokens' packages/app/src || true
rg -n --hidden --no-ignore -F 'typography:' packages/app/src/components/theme -A8 || true
rg -n --hidden --no-ignore -F 'link:' packages/app/src/components/theme -A8 || trueRepository: DeepinkApp/deepink
Length of output: 8739
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== packages/app/src/components/theme/base.ts (relevant ranges) =="
sed -n '1,180p' packages/app/src/components/theme/base.ts | cat -n
echo
echo "== packages/app/src/components/theme/color-schemes/generic/light.ts (relevant ranges) =="
sed -n '1,120p' packages/app/src/components/theme/color-schemes/generic/light.ts | cat -n
echo
echo "== packages/app/src/components/theme/color-schemes/generic/dark.ts (relevant ranges) =="
sed -n '1,120p' packages/app/src/components/theme/color-schemes/generic/dark.ts | cat -n
echo
echo "== packages/app/src/components/theme/color-schemes/zen.ts (relevant ranges) =="
sed -n '1,130p' packages/app/src/components/theme/color-schemes/zen.ts | cat -nRepository: DeepinkApp/deepink
Length of output: 19254
Use the -base color tokens here typography and link are defined with base leaves, so --chakra-colors-typography / --chakra-colors-link won’t resolve here; keep the -base variables for these text/link colors.
🤖 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 `@packages/app/src/features/NoteEditor/RichEditor/theme/RichEditor.css` at line
105, The RichEditor theme is using color tokens that point at the parent
variables instead of the actual leaf values, so the text and link colors won’t
resolve correctly. Update the color references in the RichEditor CSS to use the
`-base` Chakra variables for the typography and link tokens, and verify the
affected styles in the RichEditor stylesheet still point to the correct token
names.
Fix #327
We have problem with follows text
# Why Russian Classics Feel So Different I've noticed that after finishing a Russian novel I rarely want to start another book immediately. It's not because the stories are difficult. It's because they seem to leave unfinished conversations in my head. Instead of remembering the plot, I keep thinking about the questions the characters were asking themselves.It leaves empty line as a paragraph, so we have 3 paragraphs in result.
When we remove that paragraph, we have 2 paragraph in Lexical, but only one paragraph in Markdown, so when MD converts back into Lexical we have only one paragraph.
Summary by CodeRabbit