mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Add a live preview markdown editor for explorer (#50717)
## Context We've gotten some requests for a better markdown editing experience in the Explorer so this PR adds a proper live preview markdown editor, similar UX to how you'd edit notion or obsidian documents. Opting to use `lexical` as the main library to support this UI for its size and composability without going too low level like prose mirror <img width="933" height="452" alt="image" src="https://github.com/user-attachments/assets/7161ae6c-3dff-4b36-818f-01b5e573f121" /> Actual file changes are just this size excluding the package-lock <img width="150" height="39" alt="image" src="https://github.com/user-attachments/assets/bb01f2cf-8ef7-4daf-975b-614b2d817b54" /> ## Changes involved This adjusts the UX for markdown cells a little - Clicking on a markdown cell immediately allows you to edit - Instead of the existing behaviour which requires a double click to enter "Edit" state - Editing doesn't eject you into a monaco editor, but rather inline editor - Nicer transition - Clicking out of the cell persists the cell's content - No more "Cancel" or "Save" buttons ## To test - [ ] Verify that editing markdown cells are still working - [ ] Verify that tabs do get marked with unsaved changes if you edit a markdown cell <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Replaced the previous Markdown editing workflow with an always-visible inline editor. - Added rich Markdown editing for headings, lists, links, blockquotes, code blocks, inline code, and text formatting. - Changes are saved automatically when leaving the editor. - Markdown formatting shortcuts take precedence within the editor. - **Bug Fixes** - Avoids unnecessary saves when content has not changed. - **Tests** - Added coverage verifying Markdown formatting conversions remain consistent and repeatable. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 parent
ef7b2a5211
commit
c7880e328f
7 files changed
+922
-166
No files matched your search
@@ -53,6 +53,12 @@
|
||||
"@hcaptcha/react-hcaptcha": "^1.12.0",
|
||||
"@heroicons/react": "^2.1.3",
|
||||
"@hookform/resolvers": "^3.1.1",
|
||||
"@lexical/code": "0.51.0",
|
||||
"@lexical/link": "0.51.0",
|
||||
"@lexical/list": "0.51.0",
|
||||
"@lexical/markdown": "0.51.0",
|
||||
"@lexical/react": "0.51.0",
|
||||
"@lexical/rich-text": "0.51.0",
|
||||
"@mjackson/multipart-parser": "^0.10.1",
|
||||
"@modelcontextprotocol/sdk": "^1.29.0",
|
||||
"@modelcontextprotocol/server": "^2.0.0",
|
||||
@@ -116,6 +122,7 @@
|
||||
"idb": "^8.0.2",
|
||||
"ip-num": "^1.5.1",
|
||||
"json-logic-js": "^2.0.2",
|
||||
"lexical": "0.51.0",
|
||||
"libpg-query": "17.6.0",
|
||||
"lodash": "catalog:",
|
||||
"lodash-es": "catalog:",
|
||||
@@ -168,6 +175,7 @@
|
||||
"@faker-js/faker": "^9.9.0",
|
||||
"@graphql-codegen/cli": "5.0.5",
|
||||
"@graphql-typed-document-node/core": "^3.2.0",
|
||||
"@lexical/headless": "0.51.0",
|
||||
"@tailwindcss/postcss": "^4.2.4",
|
||||
"@tailwindcss/vite": "4.2.4",
|
||||
"@tanstack/devtools-vite": "^0.6.0",
|
||||
|
||||
Reference in new issue
Block a user