Skip to content

Replace Markdown Editor with MDXEditor for Experiment Notes#2008

Merged
aliasaria merged 5 commits into
mainfrom
add/mdxeditor-experiment-notes
May 6, 2026
Merged

Replace Markdown Editor with MDXEditor for Experiment Notes#2008
aliasaria merged 5 commits into
mainfrom
add/mdxeditor-experiment-notes

Conversation

@aliasaria
Copy link
Copy Markdown
Member

@aliasaria aliasaria commented May 6, 2026

Summary

  • Swap the markdown editor in ExperimentNotes for MDXEditor, with a toolbar (headings, bold/italic, lists, links, images, thematic break) and a rich-text ↔ source toggle.
  • Wire up image uploads through MDXEditor's imagePlugin imageUploadHandler, which the toolbar's InsertImage button and paste/drop both go through. Removes the now-redundant external "Upload Image" button.

Test plan

  • Open an experiment, navigate to Notes — existing notes render with formatting (headings, lists, links, images).
  • Edit text — "Unsaved changes" chip appears, Save button enables.
  • Click Save — notes persist after reload.
  • Insert an image via the toolbar's image button — uploads, renders inline, saves correctly.
  • Paste an image from clipboard — uploads via imageUploadHandler.
  • Toggle Source view in toolbar — shows raw markdown; toggle back to Rich text preserves edits.
  • Asset URLs are deflated to notes/assets/<file> on save and re-inflated to fully-qualified URLs on load.

Swap out the TipTap-based editor in ExperimentNotes for MDXEditor, which
provides a built-in toolbar with rich-text/source view toggle and
handles image upload via a configurable handler. Removes the now-unused
@tiptap/* and tiptap-markdown dependencies.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for transformerlab canceled.

Name Link
🔨 Latest commit d821909
🔍 Latest deploy log https://app.netlify.com/projects/transformerlab/deploys/69fb924dbf2fd40008ab6184

@paragon-review
Copy link
Copy Markdown

paragon-review Bot commented May 6, 2026

Paragon Review Skipped

Hi @aliasaria! Your Polarity credit balance is insufficient to complete this review.

Please visit https://app.paragon.run to finish your review.

@aliasaria aliasaria changed the title Replace TipTap with MDXEditor for Experiment Notes Replace Markdown Editor with MDXEditor for Experiment Notes May 6, 2026
Copy link
Copy Markdown
Member

@deep1401 deep1401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding an image when I have remote storage enabled appears like this when I revisit notes:

Image

Copy link
Copy Markdown
Member

@deep1401 deep1401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I fixed the image upload issue. Also fixed the issue where uploading another image with the same name was overwriting the existing one

@sentry
Copy link
Copy Markdown

sentry Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/transformerlab/routers/experiment/notes.py 88.88% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@aliasaria aliasaria merged commit 24a92ef into main May 6, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants