Skip to content

Conversation

@jonkafton
Copy link
Contributor

@jonkafton jonkafton commented Nov 10, 2025

What are the relevant tickets?

N/A

Description (What does it do?)

Adds a basic Tiptap editor component. See #2665 for POC/background.

  • New article edit page at /article/new. This PR feat: Implement the Article CRUD except listing #2686 adds /articles/new. This lives adjacent for the moment.
  • Editor is self contained in ol-components/TiptapEditor.
  • Tiptap's Simple Editor is installed. This eject's code to the project expecting import aliases for @/components, @/hooks and @/lib, which conflict with our main workspace existing. Some attempts were made to configure our TS and build config to avoid modifying vendor code, though fixes were not trivial - files are updated with relative imports and fixes applies for ESLint, Prettier and type checking.
  • Editor is not hooked up to the API to save.
  • Sibling article detail page not implemented.

Screenshots (if appropriate):

image

How can this be tested?

Navigate to /article/new

Additional Context

@jonkafton jonkafton marked this pull request as draft November 10, 2025 18:32
Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki left a comment

Choose a reason for hiding this comment

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

This worked for me locally in dev mode, but as on CI, the build is failing.

While I like the idea of minimizing the changes to the template, the alias imports may be more effort than they are worth... modifying the tsconfig and webpack config (and NextJS 16 very much wants you to use turbopack, so we'd probably want to change it soon.)

Claude wrote me this script to convert the absolute imports to relative. Seems to work pretty well: https://gist.github.com/ChristopherChudzicki/4b67b87e6eeb9789060821a79865b9d1 we could commit that script, and if need to run it again on a template update, no problem.

Regarding ol-components: I think putting TiptapEditor in its own workspace would make sense (rather than ol-components). Lots of deps there and isolate the linting exceptions.

@jonkafton jonkafton added the Needs Review An open Pull Request that is ready for review label Nov 10, 2025
@jonkafton jonkafton marked this pull request as ready for review November 10, 2025 23:08
merging with main branch
Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki left a comment

Choose a reason for hiding this comment

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

👍

@jonkafton
Copy link
Contributor Author

While I like the idea of minimizing the changes to the template, the alias imports may be more effort than they are worth...

Agree - in the end it does not seem possible to support conflicting aliases in a nested tsconfig without changing project config and adding not-so-nice workarounds. I've updated the ejected tiptap code to use relative imports.

@jonkafton jonkafton merged commit 46266a2 into main Nov 12, 2025
13 checks passed
@jonkafton jonkafton deleted the jk/tiptap-editor branch November 12, 2025 13:36
@jonkafton jonkafton removed the Needs Review An open Pull Request that is ready for review label Nov 12, 2025
@jonkafton jonkafton mentioned this pull request Nov 12, 2025
@odlbot odlbot mentioned this pull request Nov 12, 2025
6 tasks
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.

3 participants