Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rich text editor (tiptap) #443

Merged
merged 50 commits into from
Nov 26, 2023
Merged

Add rich text editor (tiptap) #443

merged 50 commits into from
Nov 26, 2023

Conversation

floydnant
Copy link
Owner

@floydnant floydnant commented May 19, 2023

Changes/Additions

  • Add editor icons
  • Add a toolbar.component and keycombo.component
  • Extract common components, directives, etc. into modules
  • Add rich text editor + controls
  • Fix tooltip directive import
  • Integrate rt-editor into entity-description and task
  • Bump initial budget to 1.5mb

TODO

  • Fix heading sizes to not conflict with the main headings → maybe three individual font scales might be good
  • Fix diffing and updating (seemingly no empty content possible, editor always showing in entity view)
  • Fix indentation keybindings (codeBlock)
  • Look into dragging / switching lines → apparently not feasible
  • Formatting controls
    • Proper grouping
    • Display keybindings nicely
    • Add indentation controls
    • not updating responsibly ??
    • Blocking mouse interaction for entity-heading
    • Add drop downs
    • Fix "Redo" button tooltip overflowing
  • Add missing keyboard shortcut hints
  • Typography
  • Fix race condition, that descriptions get overwritten by previous, still focused descriptions
  • Edits must always be saved when
    • navigated to a different entity
    • editor is blurred
    • anything that destroys the editor
  • Component tests
  • Improve mobile support
    • Layout (wrapping controls cause the overlay to get way too big)
    • Fix controls in task getting scrolled out of view
  • Reset the editor state when navigating to a different entity: https://github.comueberdosis/tiptap/issues/491
  • .icon-btn needs to be aspect-square in some scenarios (entity-heading)
  • Fix link mark overlaying the strikethrough mark (priority of the extension might be related?)
  • Maybe we should add a little more spacing in between list items
  • Only non empty ~~<p>~~s should have the margin-bottom
  • Rule needs margins
  • When inserting a rule, the cursor stays inside it, overwriting it with the next typed character
  • Reduce overhead (redundant emissions and computation) → premature optimisation?
  • Extra toolbar items should integrate into the cdkMenu
  • Hacky manual focus state updates don't take changes into account (don't get emitted when blurred)
  • Decrease margin/padding-top from headings
  • Decrease spacing on editor bottom (only in ~~entity-description~~)
  • Fix bullet and ordered lists being fucked on first lines
  • close button needs to convey better that its not actually closing the editor view
    => sth like "Save", "Save & Leave", "Save & Blur" or simply "Done"

Inline Code

  • If <code> is inside an <a> inherit the text color
  • Less padding
  • Smaller font-size
  • Add back a keybinding: how bout Ctrl-e?

Markdown support

tiptap-markdown documentation

  • Export/Copy as markdown
  • Fix error when indenting with \t in code blocks
  • Fix CommonJS build warning → probably no other way than ignoring it
  • Can we specify that we want the output format to be the Github flavoured one? → otherwise we need some manual output modification
    • ~~&lt;~~ ~~&lt;~~ and ~~&gt;~~ ~~&gt;~~
    • ~~\\\\t~~ ~~\\t~~ (presumably all escaped characters like these in inline code)

Safari

  • Fix lists cursor overlap issue (taskList seems fine)
  • Fix toolbar hide-styles not getting applied
  • Fix spacing issue with lists (spacing gets added to bottom when item is empty)
  • Blocking mouse interaction for ~~entity-heading~~ might be an issue again
  • First control's tooltip (Bold) gets opened when a control with dropdown is clicked

@floydnant floydnant added the web Issue related to the front end label May 19, 2023
@railway-app
Copy link

railway-app bot commented May 19, 2023

This PR is being deployed to Railway 🚅

Server: 🚨 Build Failed

@netlify
Copy link

netlify bot commented May 19, 2023

Deploy Preview for rockket canceled.

Name Link
🔨 Latest commit f97018d
🔍 Latest deploy log https://app.netlify.com/sites/rockket/deploys/6563631569d1050008ff848c

@floydnant floydnant marked this pull request as ready for review September 26, 2023 12:23
@floydnant floydnant merged commit 575d815 into main Nov 26, 2023
8 checks passed
@floydnant floydnant deleted the dev/add-rt-editor branch November 26, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web Issue related to the front end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant