[pull] develop from marktext:develop#101
Merged
Merged
Conversation
…es (#4721) The spell-checker custom dictionary table (shown on Windows/Linux) is an Element Plus el-table whose colours followed Element Plus's light defaults instead of the active theme, so on dark themes: - the cells used EP's grey --el-text-color-regular -> now the theme's --editorColor. - the hovered row used EP's light --el-table-row-hover-bg-color, a near-white bar that hid the text -> now the theme's --selectionColor. - the fixed "Options" column header used EP's white --el-table-header-bg-color, leaving a white block -> now the theme's --editorBgColor. CSS-only, scoped to .pref-spellchecker.
* feat(muya): apply typography options as --mu-* vars on the editor root Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(muya): consume --mu-* typography vars in editor styles * docs(muya): document the --mu-* typography contract * style(muya): wrap long --mu-code-font-family value to satisfy eslint prettier rule * fix(muya): apply code font to the <code> element so the family change reaches the text * fix(muya): re-measure code-block line numbers on code font/size/wrap change * test(muya): e2e regression for code-block font + line-number relayout * fix(muya): re-measure code-block line numbers on editor font/line-height change too * test(muya): cover editor-font line-number relayout and wrap effectiveness * fix(muya): relayout code-block line numbers via ResizeObserver instead of option triggers The gutter's per-line tops are measured; a one-shot rAF fired after an option change can run before a heavy document's reflow lands, leaving the numbers overlapping (spans sized for the new font but positioned at stale tops). A ResizeObserver on the code element re-measures after layout settles, and also covers window-resize-induced rewraps. * refactor(muya): trim verbose comments and drop an orphaned one in typography/line-number code * refactor(muya): remove unused setFont/setTabSize (callers use setOptions) * refactor(muya): line-number gutter relies solely on ResizeObserver (drop redundant rAF, self-disconnect) * test(muya): dedup thirdLineTop helper in code-font e2e --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ll style injection (#4726) * feat(desktop): pass editor typography to muya as options, drop wrapper inline font Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(desktop): route editor typography prefs through muya.setOptions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(desktop): scope addCommonStyle to source-mode .CodeMirror, drop setWrapCodeBlocks Muya now owns code-block font styling via --mu-code-* CSS vars (set at construction and updated via setOptions), so the desktop's injected common <style> no longer needs to target .mu-code-block or legacy span/code/td selectors. Narrow addCommonStyle to .CodeMirror only (source-mode editor). Delete setWrapCodeBlocks — muya handles code wrap natively. Update the unit spec to match the narrowed selector contract. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(desktop): route tabSize through muya.setOptions for consistency * docs(desktop): correct code-block-wrap e2e comments for the muya wrap mechanism * fix(desktop): re-sync source-mode CodeMirror font on code-font change; extract font-stack helpers --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )