tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

feat(table): make all table packages be in one package, add a new TableKit extension to configure them

Open nperez0111 opened this issue 1 year ago • 3 comments

Changes Overview

This represents a departure from our previous packaging approach. Instead of having a package for every single possible functionality that goes into the editor, we can reduce the number of packages by grouping them by functionality. We believe that Tiptap's strength comes from it's modularity and this is no exception, each extension can still be installed separately, just under a new package namespace. But, it will definitely clean up your package.json to not have each component of a table as a package.

Implementation Approach

Following the approach set forth by @tiptap/extension-starter-kit this groups and installs the extensions for table all in a single package and import, greatly reducing duplication and reducing error of forgetting to install a package.

Once we decide that we like this approach, I can move forward with grouping:

  • text formatting: (bold, code, highlight, italic, strike, subscript, superscript, underline)
  • lists: (bullet list, ordered list, list item, list item keymap, task list, task item)
  • text styles: (color, font-family, text-align, text-style)

And, any other groupings that seem obvious to make.

Testing Done

Verification Steps

Additional Notes

Checklist

  • [ ] I have created a changeset for this PR if necessary.
  • [ ] My changes do not break the library.
  • [ ] I have added tests where applicable.
  • [ ] I have followed the project guidelines.
  • [ ] I have fixed any lint issues.

Related Issues

nperez0111 avatar Aug 11 '24 17:08 nperez0111

🦋 Changeset detected

Latest commit: 6c0f8e89fda1ca2f375909d6b95759aace0307b9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 55 packages
Name Type
@tiptap/extension-table-header Minor
@tiptap/extension-table-cell Minor
@tiptap/extension-table-row Minor
@tiptap/extension-table Minor
@tiptap/core Minor
@tiptap/extension-blockquote Minor
@tiptap/extension-bold Minor
@tiptap/extension-bubble-menu Minor
@tiptap/extension-bullet-list Minor
@tiptap/extension-character-count Minor
@tiptap/extension-code-block-lowlight Minor
@tiptap/extension-code-block Minor
@tiptap/extension-code Minor
@tiptap/extension-collaboration-cursor Minor
@tiptap/extension-collaboration Minor
@tiptap/extension-color Minor
@tiptap/extension-document Minor
@tiptap/extension-dropcursor Minor
@tiptap/extension-floating-menu Minor
@tiptap/extension-focus Minor
@tiptap/extension-font-family Minor
@tiptap/extension-font-size Minor
@tiptap/extension-gapcursor Minor
@tiptap/extension-hard-break Minor
@tiptap/extension-heading Minor
@tiptap/extension-highlight Minor
@tiptap/extension-history Minor
@tiptap/extension-horizontal-rule Minor
@tiptap/extension-image Minor
@tiptap/extension-italic Minor
@tiptap/extension-link Minor
@tiptap/extension-list-item Minor
@tiptap/extension-list-keymap Minor
@tiptap/extension-mention Minor
@tiptap/extension-ordered-list Minor
@tiptap/extension-paragraph Minor
@tiptap/extension-placeholder Minor
@tiptap/extension-strike Minor
@tiptap/extension-subscript Minor
@tiptap/extension-superscript Minor
@tiptap/extension-task-item Minor
@tiptap/extension-task-list Minor
@tiptap/extension-text-align Minor
@tiptap/extension-text-style Minor
@tiptap/extension-text Minor
@tiptap/extension-typography Minor
@tiptap/extension-underline Minor
@tiptap/extension-youtube Minor
@tiptap/html Minor
@tiptap/pm Minor
@tiptap/react Minor
@tiptap/starter-kit Minor
@tiptap/suggestion Minor
@tiptap/vue-2 Minor
@tiptap/vue-3 Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Aug 11 '24 17:08 changeset-bot[bot]

Deploy Preview for tiptap-embed ready!

Name Link
Latest commit 6c0f8e89fda1ca2f375909d6b95759aace0307b9
Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/6777a1624a8c1f00080a76b8
Deploy Preview https://deploy-preview-5469--tiptap-embed.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Aug 11 '24 17:08 netlify[bot]

I've had a change of heart since implementing this, it may be worthwhile to keep the extraneous packages for at least one major version longer just to not break people on them changing their version. They should remove the packages but let's have a nicer upgrade experience. Also allows people to beta test

nperez0111 avatar Aug 20 '24 13:08 nperez0111

Open in Stackblitz

@tiptap/core

npm i https://pkg.pr.new/@tiptap/core@5469
@tiptap/extension-blockquote

npm i https://pkg.pr.new/@tiptap/extension-blockquote@5469
@tiptap/extension-bubble-menu

npm i https://pkg.pr.new/@tiptap/extension-bubble-menu@5469
@tiptap/extension-bold

npm i https://pkg.pr.new/@tiptap/extension-bold@5469
@tiptap/extension-bullet-list

npm i https://pkg.pr.new/@tiptap/extension-bullet-list@5469
@tiptap/extension-character-count

npm i https://pkg.pr.new/@tiptap/extension-character-count@5469
@tiptap/extension-code

npm i https://pkg.pr.new/@tiptap/extension-code@5469
@tiptap/extension-code-block

npm i https://pkg.pr.new/@tiptap/extension-code-block@5469
@tiptap/extension-code-block-lowlight

npm i https://pkg.pr.new/@tiptap/extension-code-block-lowlight@5469
@tiptap/extension-collaboration

npm i https://pkg.pr.new/@tiptap/extension-collaboration@5469
@tiptap/extension-collaboration-cursor

npm i https://pkg.pr.new/@tiptap/extension-collaboration-cursor@5469
@tiptap/extension-color

npm i https://pkg.pr.new/@tiptap/extension-color@5469
@tiptap/extension-document

npm i https://pkg.pr.new/@tiptap/extension-document@5469
@tiptap/extension-dropcursor

npm i https://pkg.pr.new/@tiptap/extension-dropcursor@5469
@tiptap/extension-focus

npm i https://pkg.pr.new/@tiptap/extension-focus@5469
@tiptap/extension-floating-menu

npm i https://pkg.pr.new/@tiptap/extension-floating-menu@5469
@tiptap/extension-font-family

npm i https://pkg.pr.new/@tiptap/extension-font-family@5469
@tiptap/extension-font-size

npm i https://pkg.pr.new/@tiptap/extension-font-size@5469
@tiptap/extension-gapcursor

npm i https://pkg.pr.new/@tiptap/extension-gapcursor@5469
@tiptap/extension-hard-break

npm i https://pkg.pr.new/@tiptap/extension-hard-break@5469
@tiptap/extension-heading

npm i https://pkg.pr.new/@tiptap/extension-heading@5469
@tiptap/extension-highlight

npm i https://pkg.pr.new/@tiptap/extension-highlight@5469
@tiptap/extension-history

npm i https://pkg.pr.new/@tiptap/extension-history@5469
@tiptap/extension-horizontal-rule

npm i https://pkg.pr.new/@tiptap/extension-horizontal-rule@5469
@tiptap/extension-image

npm i https://pkg.pr.new/@tiptap/extension-image@5469
@tiptap/extension-italic

npm i https://pkg.pr.new/@tiptap/extension-italic@5469
@tiptap/extension-link

npm i https://pkg.pr.new/@tiptap/extension-link@5469
@tiptap/extension-list-item

npm i https://pkg.pr.new/@tiptap/extension-list-item@5469
@tiptap/extension-list-keymap

npm i https://pkg.pr.new/@tiptap/extension-list-keymap@5469
@tiptap/extension-ordered-list

npm i https://pkg.pr.new/@tiptap/extension-ordered-list@5469
@tiptap/extension-paragraph

npm i https://pkg.pr.new/@tiptap/extension-paragraph@5469
@tiptap/extension-placeholder

npm i https://pkg.pr.new/@tiptap/extension-placeholder@5469
@tiptap/extension-mention

npm i https://pkg.pr.new/@tiptap/extension-mention@5469
@tiptap/extension-strike

npm i https://pkg.pr.new/@tiptap/extension-strike@5469
@tiptap/extension-subscript

npm i https://pkg.pr.new/@tiptap/extension-subscript@5469
@tiptap/extension-superscript

npm i https://pkg.pr.new/@tiptap/extension-superscript@5469
@tiptap/extension-table

npm i https://pkg.pr.new/@tiptap/extension-table@5469
@tiptap/extension-table-cell

npm i https://pkg.pr.new/@tiptap/extension-table-cell@5469
@tiptap/extension-table-header

npm i https://pkg.pr.new/@tiptap/extension-table-header@5469
@tiptap/extension-table-row

npm i https://pkg.pr.new/@tiptap/extension-table-row@5469
@tiptap/extension-task-item

npm i https://pkg.pr.new/@tiptap/extension-task-item@5469
@tiptap/extension-task-list

npm i https://pkg.pr.new/@tiptap/extension-task-list@5469
@tiptap/extension-text

npm i https://pkg.pr.new/@tiptap/extension-text@5469
@tiptap/extension-text-align

npm i https://pkg.pr.new/@tiptap/extension-text-align@5469
@tiptap/extension-text-style

npm i https://pkg.pr.new/@tiptap/extension-text-style@5469
@tiptap/extension-typography

npm i https://pkg.pr.new/@tiptap/extension-typography@5469
@tiptap/extension-underline

npm i https://pkg.pr.new/@tiptap/extension-underline@5469
@tiptap/extension-youtube

npm i https://pkg.pr.new/@tiptap/extension-youtube@5469
@tiptap/html

npm i https://pkg.pr.new/@tiptap/html@5469
@tiptap/pm

npm i https://pkg.pr.new/@tiptap/pm@5469
@tiptap/react

npm i https://pkg.pr.new/@tiptap/react@5469
@tiptap/starter-kit

npm i https://pkg.pr.new/@tiptap/starter-kit@5469
@tiptap/suggestion

npm i https://pkg.pr.new/@tiptap/suggestion@5469
@tiptap/vue-2

npm i https://pkg.pr.new/@tiptap/vue-2@5469
@tiptap/vue-3

npm i https://pkg.pr.new/@tiptap/vue-3@5469

commit: 6c0f8e8

pkg-pr-new[bot] avatar Dec 30 '24 08:12 pkg-pr-new[bot]

@bdbch & @svenadlung this is ready for review now.

I decided that this PR should only try to do the grouping for tables. It also keeps compatibility with the existing @tiptap/extension-table-cell package by doing a re-export of what @tiptap/extension-table has.

nperez0111 avatar Dec 30 '24 09:12 nperez0111