Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
89619d5
Replace Monaco editor with CodeMirror 6
silverwind Feb 26, 2026
bf8f2b5
Remove shouldIgnoreError from bootstrap
silverwind Feb 26, 2026
3734024
Fix CodeMirror selection visibility over active line highlight
silverwind Feb 26, 2026
6aa7dab
Fix CodeMirror editor option handling and git hook highlighting
silverwind Feb 26, 2026
a1457e3
Fix CodeMirror selection visibility by disabling active line highlight
silverwind Feb 26, 2026
d4fe9aa
Fix CodeMirror selection visibility with faint active line highlight
silverwind Feb 26, 2026
484a561
Use faint dedicated colors for editor active line highlight
silverwind Feb 26, 2026
f8c12e2
Improve CodeMirror editor styling and UX
silverwind Feb 26, 2026
8180cdf
Consolidate chroma CSS into single file using syntax variables
silverwind Feb 26, 2026
7f79d7a
reorder imports
silverwind Feb 26, 2026
9faa9d9
remove comment
silverwind Feb 26, 2026
8f09499
Implement trim_trailing_whitespace from .editorconfig
silverwind Feb 26, 2026
fefe88e
Combine editor dispatches into single call in updateEditorLanguage
silverwind Feb 26, 2026
6f44bf6
Override remaining CodeMirror hardcoded colors with theme variables
silverwind Feb 26, 2026
6963ae9
Add word-based autocomplete and indentation markers to code editor
silverwind Feb 26, 2026
22c90f2
Add i18n support for CodeMirror editor UI phrases
silverwind Feb 26, 2026
713d2d8
tweak suggest
silverwind Feb 26, 2026
3e9a590
Add VS Code-style keyboard shortcuts to code editor
silverwind Feb 26, 2026
1dfc4e3
remove dotted focus outline
silverwind Feb 26, 2026
ecfe162
Remove redundant closeBracketsKeymap from code editor
silverwind Feb 26, 2026
f213e2c
Add additional Sublime-style keyboard shortcuts to code editor
silverwind Feb 26, 2026
7cc516c
Add clickable links, shared line-height variable, and URL utils to co…
silverwind Feb 26, 2026
0fa9318
Rename --code-line-height to --line-height-code and update comments
silverwind Feb 26, 2026
00a95ff
Merge branch 'main' into cm
silverwind Feb 26, 2026
4ce17e8
fix lint
silverwind Feb 26, 2026
1e4f184
Rename file_content_placeholder locale key to editor.code_editor.plac…
silverwind Feb 26, 2026
2ff09f1
Focus code editor instead of filename input when editing existing files
silverwind Feb 26, 2026
7abc7c3
Set IsNewFile on upload page to simplify autofocus condition
silverwind Feb 26, 2026
151d16a
Inline code editor phrases template and simplify data attribute name
silverwind Feb 26, 2026
65cff56
Remove unnecessary fallback for data-phrases attribute
silverwind Feb 26, 2026
26ea5da
Apply suggestion from @silverwind
silverwind Feb 26, 2026
7b8f4a1
fix lint
silverwind Feb 26, 2026
9f61ca6
Add CodeMirror language support for Elixir, Nix, and Svelte
silverwind Feb 27, 2026
adf3680
Simplify CodeMirror language load functions
silverwind Feb 27, 2026
2ad8fc5
Remove unnecessary IsNewFile from upload page
silverwind Feb 27, 2026
b18d38c
Improve code editor: add Find button, style native selects, and tweak…
silverwind Feb 27, 2026
ede4720
Restore default CodeMirror line padding and remove indent marker offset
silverwind Feb 27, 2026
000141a
Increase text selection opacity and make highlight background more vi…
silverwind Feb 27, 2026
d1ea8af
Add license overrides for codemirror-lang-elixir and lezer-elixir
silverwind Feb 27, 2026
7776896
Add legacy-modes, Makefile and JSON5/JSONC language support, tune sel…
silverwind Feb 27, 2026
923218e
Add command palette to CodeMirror editor
silverwind Feb 27, 2026
3e8f8b5
Remove CodeMirror translation infrastructure, keep English only
silverwind Feb 27, 2026
4bbe45e
Style autocomplete matches and vertically center line numbers
silverwind Feb 27, 2026
7fbdf4e
Restore Find locale key and ensure command palette overlaps find panel
silverwind Feb 27, 2026
80032d2
fix chrome selection color
silverwind Feb 27, 2026
d221c04
Refactor codeeditor into modules and fix shortcut visibility
silverwind Feb 27, 2026
6afae35
Simplify window.open args, extract kbd box-shadow variable, and fix p…
silverwind Feb 27, 2026
3013820
avoid closet
wxiaoguang Feb 27, 2026
11e14b8
fix typo
wxiaoguang Feb 27, 2026
3f547ce
fix filenameInput
wxiaoguang Feb 27, 2026
0a9101c
fix lint
wxiaoguang Feb 27, 2026
9b4f70d
Only show indent markers for the active block
silverwind Feb 27, 2026
38b3a9f
add issue refs
silverwind Feb 27, 2026
b371575
Use actual hook name for git hook editor syntax highlighting
silverwind Feb 27, 2026
a065324
Use non-null assertions for guaranteed DOM elements
silverwind Feb 27, 2026
a0524f8
fix lint
silverwind Feb 27, 2026
69d2e6e
Return focus to editor when closing command palette
silverwind Feb 27, 2026
afe8b01
Rename CodeEditorConfig to EditorConfig
silverwind Feb 27, 2026
e0cf54b
Merge branch 'main' into cm
silverwind Feb 27, 2026
ece6f83
Improve editor toolbar: icon buttons, command palette toggle, native …
silverwind Feb 27, 2026
22b9d68
Add "No matches" text to command palette when filter has no results
silverwind Feb 27, 2026
b3e09c9
Address review feedback from PR #36764
silverwind Feb 27, 2026
961fb0f
Simplify command palette: replace ViewPlugin with closures
silverwind Feb 27, 2026
d090b7c
Remove unnecessary requestAnimationFrame in command palette
silverwind Feb 27, 2026
7fa53cc
Allow code-editor-options to wrap on narrow viewports
silverwind Feb 27, 2026
b58cc55
Remove unnecessary null checks for guaranteed DOM elements
silverwind Feb 27, 2026
718826e
Clean up codeeditor: remove broken outline rule and unnecessary guard
silverwind Feb 27, 2026
50b2ffc
Fix command palette: use pointerover and move preventDefault after it…
silverwind Feb 27, 2026
fbaac8f
Remove window.codeEditors global
silverwind Feb 27, 2026
faa4248
Merge branch 'main' into cm
silverwind Feb 27, 2026
1993aa1
update codemirror-lang-elixir, remove license overrides
silverwind Feb 27, 2026
aa33cb8
Enable declaration-property-value-no-unknown stylelint rule
silverwind Feb 27, 2026
4a21558
Fix Makefile highlighting, dead code, and stuck modifier class
silverwind Feb 27, 2026
703234f
Merge branch 'main' into cm
silverwind Feb 27, 2026
60f8f50
Clean up editor config options: return full type instead of Partial
silverwind Feb 27, 2026
5e4b155
Add null check for match.index in findUrlAtPosition
silverwind Feb 27, 2026
1377c32
Move isMac and keySymbols to web_src/js/utils.ts
silverwind Feb 27, 2026
c60511c
Simplify code editor config: merge EditorOptions into CodeEditorConfig
silverwind Feb 27, 2026
59fb371
Simplify code editor config: use backend line_wrap, remove redundant …
silverwind Feb 27, 2026
a0193a4
Inline getFileBasedOptions
silverwind Feb 27, 2026
5702b1e
Move code editor config from filename input to textarea and consolida…
silverwind Feb 28, 2026
ae231eb
Inline getCodeEditorConfig
silverwind Feb 28, 2026
c96f89b
Rename editorOpts to config
silverwind Feb 28, 2026
dce802f
Simplify code editor config: rename is_new_file to autofocus, move fo…
silverwind Feb 28, 2026
b092da7
Simplify createCodeEditor: move file_path to config, remove union typ…
silverwind Feb 28, 2026
b2b8d1f
Simplify code editor: rename to file_name, move into getCodeEditorCon…
silverwind Feb 28, 2026
ebd518b
Remove redundant IndentStyle default in patch editor config
silverwind Feb 28, 2026
6e95b49
Merge createCodemirrorEditor into createCodeEditor and fix upload pag…
silverwind Feb 28, 2026
7a5566b
Merge branch 'main' into cm
silverwind Feb 28, 2026
04b4e6e
Fix upload page: move filename listeners before editArea guard
silverwind Feb 28, 2026
043de82
Apply suggestion from @silverwind
silverwind Feb 28, 2026
74efdf4
Reduce diff in repo-editor.ts by restoring IIFE structure
silverwind Feb 28, 2026
5da4d15
Move initial togglePreviewDisplay into createCodeEditor
silverwind Feb 28, 2026
af7f4a6
inline setupEditorOptionListeners to avoid importCodemirror()
silverwind Feb 28, 2026
1633f2c
refactor types
silverwind Feb 28, 2026
0726ba8
replace unicode escapes with actual characters
silverwind Feb 28, 2026
6d4e016
Simplify codeeditor e2e test by inlining setup/teardown
silverwind Feb 28, 2026
30f5b47
Simplify e2e test utilities
silverwind Feb 28, 2026
46e2c21
rename var
silverwind Feb 28, 2026
e61a03f
Fix code editor: debounce filename input and add noopener to window.open
silverwind Feb 28, 2026
82e711d
Merge remote-tracking branch 'origin/main' into cm
wxiaoguang Feb 28, 2026
ef4a7ef
use onInputDebounce
wxiaoguang Feb 28, 2026
a7ac11b
refactor code editor config
wxiaoguang Feb 28, 2026
e881d88
refactor struct name
wxiaoguang Feb 28, 2026
5943d00
fine tune comment, merge type & default
wxiaoguang Feb 28, 2026
70c44e2
fix space
wxiaoguang Feb 28, 2026
a6505dd
add comments
wxiaoguang Feb 28, 2026
af4fd67
Merge branch 'main' into cm
silverwind Mar 1, 2026
420c09f
Move data-placeholder to CodeEditorConfig
silverwind Mar 1, 2026
6cce4ff
Use textarea.defaultValue to ignore browser form restoration on refresh
silverwind Mar 1, 2026
5f6f847
improve hook editor
silverwind Mar 1, 2026
9da4061
remove unused translations
silverwind Mar 1, 2026
b57f0e0
Use native `placeholder` textarea attribute
silverwind Mar 1, 2026
44a2da9
Merge branch 'main' into cm
silverwind Mar 1, 2026
70abc91
Merge branch 'main' into cm
silverwind Mar 2, 2026
ed0ee70
Merge branch 'main' into cm
GiteaBot Mar 2, 2026
6811933
Merge branch 'main' into cm
GiteaBot Mar 2, 2026
6bca2bd
Add @codemirror/lint to code editor
silverwind Mar 2, 2026
60402be
Fix double reset on value
silverwind Mar 2, 2026
baf918e
Use static import for linter.ts
silverwind Mar 2, 2026
7c8762b
jsonc fix
silverwind Mar 2, 2026
5e515ac
tweak
silverwind Mar 2, 2026
35120c7
Merge branch 'main' into cm
lunny Mar 3, 2026
5c51003
Improve CodeMirror syntax highlighting to match Chroma rendered view
silverwind Mar 8, 2026
0661c99
Enable syntax highlighting in Markdown fenced code blocks
silverwind Mar 8, 2026
8df7e3f
Merge branch 'main' into cm
silverwind Mar 8, 2026
2764558
cleanup type
silverwind Mar 8, 2026
e74788b
Simplify: pass cm modules directly, use line-scoped URL search
silverwind Mar 8, 2026
e81761c
reduce comment
silverwind Mar 8, 2026
70eeae0
Use direct import for trimTrailingWhitespaceFromView
silverwind Mar 9, 2026
eac01f6
Merge branch 'main' into cm
silverwind Mar 10, 2026
2b13bac
Merge remote-tracking branch 'origin/main' into cm
silverwind Mar 30, 2026
934b9fc
Remove Monaco references, fix editor scroll shift
silverwind Mar 30, 2026
bc5c98b
Hide preview tab for non-previewable files on initial render
silverwind Mar 30, 2026
86e10aa
Address Copilot review feedback
silverwind Mar 30, 2026
72716f7
Merge branch 'main' into cm
silverwind Mar 30, 2026
2b5822f
Update CodeMirror dependencies to latest versions
silverwind Mar 30, 2026
3f96f95
Add context menu, go-to-definition, go-to-symbol, global kbd styling
silverwind Mar 30, 2026
e8b8e9d
Context menu: dismiss on page scroll, disable Change All Occurrences …
silverwind Mar 30, 2026
2ca5a7a
Unified syntax color theme with perceptual lightness matching
silverwind Mar 30, 2026
466e34f
Adjust --color-syntax-text-alt: +10% lighter dark, -10% darker light
silverwind Mar 30, 2026
e85cde5
Add F12 keyboard shortcut for Go to Definition
silverwind Mar 30, 2026
d2df69a
Merge branch 'main' into cm
silverwind Mar 30, 2026
3c68a38
Merge branch 'main' into cm
silverwind Mar 31, 2026
58cf6e8
Improve code editor fold gutter and text selection
silverwind Mar 31, 2026
666aec1
Fix editor loading flash by reserving space and atomic swap
silverwind Mar 31, 2026
74c8ba1
Hide lint gutter when no linter is active
silverwind Mar 31, 2026
bc2103d
Add shell syntax highlighting for .env files
silverwind Mar 31, 2026
5bbf069
Handle clipboard permission denial in context menu paste
silverwind Mar 31, 2026
ba3e5a2
Remove declaration-property-value-no-unknown from cm branch
silverwind Mar 31, 2026
1271fa7
Increase editor active line highlight opacity on dark theme
silverwind Mar 31, 2026
dce4df5
Support Go to Definition and Go to Symbol for Go and more languages
silverwind Mar 31, 2026
9b95ade
Fix context menu not dismissing on page scroll
silverwind Mar 31, 2026
5cd857c
Wrap around keyboard navigation in context menu and command palette
silverwind Mar 31, 2026
78e6f73
Use clippie for clipboard writes and remove redundant kbd font-size o…
silverwind Mar 31, 2026
3f18697
Merge branch 'main' into cm
silverwind Mar 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export default defineConfig([
'github/no-innerText': [2],
'github/no-then': [2],
'github/no-useless-passive': [2],
'github/prefer-observers': [2],
'github/prefer-observers': [0],
'github/require-passive-events': [2],
'github/unescaped-html-literal': [2],
'grouped-accessor-pairs': [2],
Expand Down Expand Up @@ -1013,7 +1013,7 @@ export default defineConfig([
},
},
{
files: ['*', 'tools/**/*'],
files: ['*', 'tools/**/*', 'tests/**/*'],
languageOptions: {globals: globals.nodeBuiltin},
},
{
Expand Down
5 changes: 3 additions & 2 deletions options/locale/locale_en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@
"editor.buttons.switch_to_legacy.tooltip": "Use the legacy editor instead",
"editor.buttons.enable_monospace_font": "Enable monospace font",
"editor.buttons.disable_monospace_font": "Disable monospace font",
"editor.code_editor.command_palette": "Command Palette",
"editor.code_editor.find": "Find",
"editor.code_editor.placeholder": "Enter file content here",
"filter.string.asc": "A–Z",
"filter.string.desc": "Z–A",
"error.occurred": "An error occurred",
Expand Down Expand Up @@ -2250,8 +2253,6 @@
"repo.settings.webhook.delivery.success": "An event has been added to the delivery queue. It may take few seconds before it shows up in the delivery history.",
"repo.settings.githooks_desc": "Git Hooks are powered by Git itself. You can edit hook files below to set up custom operations.",
"repo.settings.githook_edit_desc": "If the hook is inactive, sample content will be presented. Leaving content to an empty value will disable this hook.",
"repo.settings.githook_name": "Hook Name",
"repo.settings.githook_content": "Hook Content",
"repo.settings.update_githook": "Update Hook",
"repo.settings.add_webhook_desc": "Gitea will send <code>POST</code> requests with a specified content type to the target URL. Read more in the <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"%s\">webhooks guide</a>.",
"repo.settings.payload_url": "Target URL",
Expand Down
18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,28 @@
"@citation-js/plugin-bibtex": "0.7.21",
"@citation-js/plugin-csl": "0.7.22",
"@citation-js/plugin-software-formats": "0.6.2",
"@codemirror/autocomplete": "6.20.1",
"@codemirror/commands": "6.10.3",
"@codemirror/lang-json": "6.0.2",
"@codemirror/lang-markdown": "6.5.0",
"@codemirror/language": "6.12.3",
"@codemirror/language-data": "6.5.2",
"@codemirror/legacy-modes": "6.5.2",
"@codemirror/lint": "6.9.5",
"@codemirror/search": "6.6.0",
"@codemirror/state": "6.6.0",
"@codemirror/view": "6.40.0",
"@github/markdown-toolbar-element": "2.2.3",
"@github/paste-markdown": "1.5.3",
"@github/text-expander-element": "2.9.4",
"@lezer/highlight": "1.2.3",
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
"@mermaid-js/layout-elk": "0.2.1",
"@primer/octicons": "19.23.1",
"@replit/codemirror-indentation-markers": "6.5.3",
"@replit/codemirror-lang-nix": "6.0.1",
"@replit/codemirror-lang-svelte": "6.0.0",
"@replit/codemirror-vscode-keymap": "6.0.2",
"@resvg/resvg-wasm": "2.6.2",
"@silverwind/vue3-calendar-heatmap": "2.1.1",
"@vitejs/plugin-vue": "6.0.5",
Expand All @@ -25,6 +41,7 @@
"chartjs-adapter-dayjs-4": "1.0.4",
"chartjs-plugin-zoom": "2.2.0",
"clippie": "4.1.10",
"codemirror-lang-elixir": "4.0.1",
"colord": "2.9.3",
"compare-versions": "6.1.1",
"cropperjs": "1.6.2",
Expand All @@ -38,7 +55,6 @@
"js-yaml": "4.1.1",
"katex": "0.16.43",
"mermaid": "11.13.0",
"monaco-editor": "0.55.1",
"online-3d-viewer": "0.18.0",
"pdfobject": "2.3.1",
"perfect-debounce": "2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineConfig({
timeout,
},
use: {
baseURL: env.GITEA_TEST_E2E_URL?.replace?.(/\/$/g, ''),
baseURL: env.GITEA_TEST_E2E_URL?.replace?.(/\/$/, ''),
locale: 'en-US',
actionTimeout: timeout,
navigationTimeout: 2 * timeout,
Expand Down
Loading
Loading