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

upgrade plate; add tailwind; refactor as needed #142

Merged
merged 1 commit into from
Jan 27, 2024
Merged

Conversation

cloverich
Copy link
Owner

@cloverich cloverich commented Jan 26, 2024

  • upgrade plate, slate, and supporting libraries
  • Add tailwind css, shadecn, and other (effectively transitive) dependencies
  • add pre-start script and build scripts
  • Remove image, link, and some other custom code (prefer plate)
  • Fix some txt in archive / un-archive

The tl;dr is, the newer versions of plate remove the built-in elements, and include only the "plugins" (headless components). To get the UI, you:

  • Install the associated dependencies
  • Copy paste example code (following tailwind style)

Most of the changes here are in support of the plate migration; I'm unclear at this point what the best practice is around using this library, directory organization, etc. I'm operating under the assumption that we'll use this library for at least some time leading to a proper 1.0 release.

Closes #141

@cloverich cloverich changed the title wip: upgrade plate upgrade plate; add tailwind; refactor as needed Jan 27, 2024
@cloverich
Copy link
Owner Author

review impact of plate (vs sub-packages) on build size; plate includes playground, etc

I think because these are all dev dependencies, the imported code will be not imported, or maybe tree shaken out. I don't have a bundle size measurement. Compressed package is ~5mb bigger (99 -> 104mb). Hopefully ok to defer size and performance evaluation to future sprint.

src/markdown/remark-slate-transformer/util.ts Outdated Show resolved Hide resolved
src/preload/client/files.ts Outdated Show resolved Hide resolved
src/preload/client/files.ts Show resolved Hide resolved
src/views/edit/editor/elements/Blockquote.tsx Outdated Show resolved Hide resolved
src/views/edit/editor/elements/List.tsx Outdated Show resolved Hide resolved
src/views/edit/editor/elements/Marks.tsx Outdated Show resolved Hide resolved
- migrate (many versions) to latest plate and slate versions
- extensive refactor to support plate changes
- add tailwind and numerous required dependencies to achieve parity with prior implementation
- improve link support; default plate version includes a hovering link edit menu similar to my prior link edit menu
- remove most of the custom image helpers (prefer plate versions)
- remove custom link plugin (prefer plate version)
@cloverich cloverich merged commit 8b503c9 into master Jan 27, 2024
1 check passed
@cloverich cloverich deleted the upgrade-plate branch January 27, 2024 16:35
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.

Update Slate and Plate libraries
1 participant