Alessio Gravili
8895f6420f
chore: fix all esm test suite imports
2024-03-08 14:42:24 -05:00
Alessio Gravili
c49fd66922
feat(richtext-lexical)!: rename TreeviewFeature into TreeViewFeature ( #4520 )
...
Breaking: If you import TreeviewFeature in your project, you have to rename the import to use TreeViewFeature (capitalized "V")
2023-12-15 18:33:16 +01:00
Alessio Gravili
fff377ad22
fix(richtext-lexical): Blocks: unnecessary saving node value when initially opening a document & new lexical tests ( #4059 )
...
* chore: new lexical int tests and working test structure
* chore: more int tests, and better lexical collection structure
* fix(richtext-lexical): Blocks: unnecessary saving node value when initially opening a document
2023-11-08 21:32:43 +01:00
Alessio Gravili
17f7b94555
chore: improve test suites, upgrade jest and playwright, add debug utilities for lexical ( #4011 )
...
* feat(richtext-lexical): 'bottom' position value for plugins
* feat: TestRecorderFeature
* chore: restructuring to seed and clear db before each test
* chore: make sure all tests pass
* chore: make sure indexes are created in seed.ts - this fixes one erroring test
* chore: speed up test runs through db snapshots
* chore: support drizzle when resetting db
* chore: simplify seeding process, by moving boilerplate db reset / snapshot logic into a wrapper function
* chore: add new seeding process to admin test suite
* chore(deps): upgrade jest and playwright
* chore: make sure mongoose-specific tests are not skipped
* chore: fix point test, which was depending on another test (that's bad!)
* chore: fix incorrect import
* chore: remove unnecessary comments
* chore: clearly label lexicalE2E test file as todo
* chore: simplify seed logic
* chore: move versions test suite to new seed system
2023-11-06 16:38:40 +01:00
Alessio Gravili
b5c7bbed93
fix(richtext-lexical): defaultValue property didn't fit into field schema
2023-10-21 14:52:26 +02:00
Alessio Gravili
0af36af16c
feat(richtext-lexical): HTML Serializer ( #3685 )
...
* chore(richtext-lexical): add jsdocs for afterReadPromise in GraphQL
* feat(richtext-lexical): HTML Serializer
* chore(richtext-lexical): adjust comment
* chore(richtext-lexical): change the way the html serializer works
* chore: working html converter field, improve various exports
* feat: link and heading html serializers
* fix: populationPromises not being added properly
* feat: allow html serializers to be async
* feat: upload html serializer
* feat: text format => html
* feat: lists => html
* feat: Quote => html
* chore: improve Checklist => html conversion, by passing in the full parent to converters
2023-10-21 14:37:59 +02:00
Alessio Gravili
e41899cd27
fix(richtext-lexical): missing properties passed into validation functions
2023-10-10 16:06:39 +02:00
Alessio Gravili
5d1444e1bd
fix(richtext-lexical): incorrect stacking of block's fields
2023-10-07 18:35:59 +02:00
Alessio Gravili
acfda5d8d4
chore(richtext-lexical): updated lexical incoming config API
2023-10-07 00:22:13 +02:00
Alessio Gravili
b545f62574
chore: richtext-lexical: various styling and validation improvements
2023-10-06 12:39:22 +02:00
Alessio Gravili
76c2fad94f
chore(richtext-lexical): fields test default value
2023-10-04 22:31:23 +02:00
Elliot DeNolf
1107a1d7d1
chore: rename editors
2023-10-04 13:27:19 -04:00
Alessio Gravili
9308c792e1
feat: Lexical richtext editor ( #3359 )
...
* chore: move slate stuff into packages/richtext-slate
* chore: fieldTypes stuff
* chore: fix richtext-slate tsconfig
* chore: add clean:unix command
* chore: fix up things
* chore: undo subpath imports being hoisted up
* chore: fix incorrect imports
* chore: improve AdapterArguments type
* chore: remove unused richTextToHTML and stringifyRichText files
* fix: core-dev scss imports
* chore: fix publishConfig exports for richtext-slate
* chore: adjust joi schema for richtext field
* chore: various fixes
* chore: handle afterRead population in richText adapter
* chore: handle more after-read promise stuff
* chore: fix joi validation
* chore: add richtext adapter to tests
* chore: merge adapter props with field props
* chore: index.tsx => index.ts
* chore: rename `adapter` to `editor`
* chore: fix e2e tests not running due to importing a constant from a file (`Tabs`) which imports createSlate.
This fails because createSlate imports React components.
* chore: remove unnecessary import
* chore: improve various typings
* chore: improve typings for List view Cell components
* feat: richText adapter cell component
* chore: add missing types packages for packages/richtext-slate
* chore: add new adapter interface properties to joi schema
* chore: withMergedProps utility which replaces getSlateCellComponent and getSlateFieldComponent
* feat: added config.defaultEditor property which is now required. field.editor is no longer required and overrides config.defaultEditor
* docs: mention editor and defaultEditor property in the docs
* chore: fix incorrectly formatted JSX in docs files breaking mdx parser
* feat: create base structure for lexical adapter
* chore: upgrade dependencies
* chore: improve package.json property order
* chore: undo unnecessary changes in core
* chore: initial, working lexical editor
* chore: utils
* chore: add license.md
* chore: work on Floating toolbar
* chore: floatingSelectToolbar extensibility
* chore: FloatingSelectToolbar format buttons
* chore: add functionality to format buttons
* chore: caret handling improvements
* chore: keep toolbar hidden during mousedown
* chore: keep carat centered unless at edge of container
* chore: placeholder, style improvements
* chore: DraggableBlock Handle
* chore: limit cell preview length
* chore: fix drag handle styling in light mode
* chore: remove unnecessary listener
* feat: add block handle
* chore: handle removal of handles properly
* chore: add HistoryPlugin
* chore: improve naming of format button properties
* chore: fix incorrect position of HistoryPlugin
* chore: serif font
* chore: improve opacity handling of FloatingSelectToolbar
* feat: slash menu
* feat: slash menu interface
* chore: fix mixed-up icon
* chore: add missing editorConfig?.feature dependency
* feat: sanitizedEditorConfig, slash menu grouping
* feat: interface for nodes
* feat: Plugin interface
* feat: working AddBlockHandlePlugin
* feat: headings
* chore: improve editor focus handling for add block handle's slash menu
* chore: improve handling of slash menu filtering
* fix: cloneDeep function not handling all data types well
* feat: markdown transformers for headings
* feat: proper dependency system
* feat: add remaining markdown transformers
* feat: order system for floating toolbar format buttons
* chore: customizable floating select toolbar sections system
* feat: WIP floatingSelectToolbar dropdown sections
* feat: working dropdown & misc improvements
* chore: fix dropdown top positioning after scrolling down
* chore: downgrade @types/react
* feat: treeview debug feature, & misc improvements
* feat: add TabIndentationPlugin by default
* fix: wrong key for treeviewfeature
* chore: handle plugin keys
* chore: simplify Heading Feature
* feat: Text Align
* feat: Indent
* chore: floating text toolbar section dividers
* feat: isEnabled for floating select toolbar, and isEnabled handling for decreaseIndent
* chore: add all missing icons
* feat: checklist, orderedlist, unorderedlist
* chore: improve lists by using lexical/react's ListPlugin
* chore: lists markdown transformers
* chore: improve key generation for plugins
* fix: add missing payload scss import
* fix: make default editorConfig null instead of defaultSanitizedEditorConfig for EditorConfigProvider. This fixes a bug where the editor would crash if some feature was using this EditorConfigProvider, as EditorConfigProvider needs the feature (due to the serialization process) and the Feature needing EditorConfigProvider (circular dependency)
* chore: allow positioning plugins under floatingAnchorElem
* feat: WIP: Link Feature
* chore: add box shadow to slash menu in light mode
* chore: CheckList => Check List
* chore: respect admin.readOnly setting
* chore: Simplify Link Feature
* chore: restructuring
* chore: prettier
* chore: scss-ify
* feat: wip: nicer draggable blocks
* chore: lots of block drag improvements
* helllll yea
* chore: just pure niceness
* fix: drag handle not working when scrolling down
* fix: "add" drag handle not working when scrolling down
* chore: remove unnecessary console log
* chore: fix slash menu positioning if there is not enough space below
* chore: increase animation speed of floating select toolbar
* chore: expect transforms for top-level editor nodes
* chore: move css rule to correct position
* chore: slightly animate target drag line
* chore: do not indicate drag-ability in un-dragable positions
* chore: explanatory comment
* chore: link editor styling
* chore: lots of link-related improvements
* chore: a lot of floating toolbar improvements
* chore: adjust link colors to be the same as in the website
* chore: prep work link extensibility
* chore: work on link plugin
* feat: fully-working link feature 🎉
* chore: add upload icon
* chore: merge in useful changes from playground & misc stuff
* feat: WIP relationship feature
* feat: Relationship Feature
* feat: BlockQuote Feature
* chore: base structure for Upload feature
* chore: fix types
* chore: WIP work on population and upload nodes
* chore: stuff
* fix: ensure uuid is only generated once
* chore: remove console.log's
* feat: link and relationship population
* fix: populate relationships at correct position
* chore: bunch of progress on upload node
* chore: working upload node!
* chore: various upload feature improvements
* chore: misc
* feat: working upload feature fields customization
* feat: WIP Blocks feature
* chore: fix incorrectly registered editor commands
* chore: get Block fields to render
* feat: functional blocks feature
* chore: improve functionality of blocks feature component (styling, collapsing)
* chore: disable console logs
2023-10-01 21:03:44 +02:00
James
4df19cbdf6
chore: converts anything that awaits many promises to sequential execution
2023-09-24 16:31:23 -07:00
Alessio Gravili
a81401cf77
feat: breaking: richtext adapter ( #3311 )
...
BREAKING: requires user to install @payloacms-richtext-slate and specify a `config.editor` property
* chore: move slate stuff into packages/richtext-slate
* chore: fieldTypes stuff
* chore: fix richtext-slate tsconfig
* chore: add clean:unix command
* chore: fix up things
* chore: undo subpath imports being hoisted up
* chore: fix incorrect imports
* chore: improve AdapterArguments type
* chore: remove unused richTextToHTML and stringifyRichText files
* fix: core-dev scss imports
* chore: fix publishConfig exports for richtext-slate
* chore: adjust joi schema for richtext field
* chore: various fixes
* chore: handle afterRead population in richText adapter
* chore: handle more after-read promise stuff
* chore: fix joi validation
* chore: add richtext adapter to tests
* chore: merge adapter props with field props
* chore: index.tsx => index.ts
* chore: rename `adapter` to `editor`
* chore: fix e2e tests not running due to importing a constant from a file (`Tabs`) which imports createSlate.
This fails because createSlate imports React components.
* chore: remove unnecessary import
* chore: improve various typings
* chore: improve typings for List view Cell components
* feat: richText adapter cell component
* chore: add missing types packages for packages/richtext-slate
* chore: add new adapter interface properties to joi schema
* chore: withMergedProps utility which replaces getSlateCellComponent and getSlateFieldComponent
* feat: added config.defaultEditor property which is now required. field.editor is no longer required and overrides config.defaultEditor
* docs: mention editor and defaultEditor property in the docs
* chore: fix incorrectly formatted JSX in docs files breaking mdx parser
* chore: fix various errors
* chore: auto-generated pointer files
2023-09-19 11:03:31 +02:00
James
0f3b364e46
chore: hoists tests out of payload package
2023-09-01 14:45:41 -04:00
Alessio Gravili
a67278b29f
chore: move to monorepo structure
2023-08-23 12:20:30 +02:00
Mark Barton
a0b13a5b01
feat: text alignment for richtext editor ( #2803 )
...
* Update isActive.tsx
This change allows us to define toggling of custom types in Slate. Specifically, this fixes the ability to toggle Alignment on nodes that use other active elements.
isElementActive(editor, format, TEXT_ALIGN_TYPES.includes(format) ? 'align' : 'type');
Type is the default for elements, allowing us to use a custom field lets us greater extend the functionality of Slate in Payload without causing any breaking changes
* Update toggle.tsx
Added to toggleElement public function
* Update isActive.tsx
* Update toggle.tsx
Added Rich Text Alignment, updated toggle function, added tests and doc updates
* added margin to void elements
* fix: list alignment
* removed textAlign from elements and added docs
* chore: fix typo
---------
Co-authored-by: Alessio Gravili <alessio@gravili.de >
2023-08-14 17:08:50 +02:00
Jessica Chowdhury
801f60939b
fix: nested richtext bug and test ( #2966 )
...
* fix: nested richtext bug and test
* chore: fix accidentally deleted character
2023-07-05 09:06:02 -04:00
Alessio Gravili
23be263dd2
fix: RichText link custom fields ( #2756 )
...
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com >
2023-06-02 13:55:46 -04:00
Michel v. Varendorff
bf6522898d
feat: allow customizing the link fields ( #2559 )
2023-04-26 11:08:47 -04:00
Jacob Fletcher
0dbc4fa213
feat: enables document drawers from read-only fields ( #1989 )
2023-02-04 10:42:51 -05:00
Jacob Fletcher
baf5b10d23
roadmap: rte and upload drawers ( #1668 )
2022-12-23 12:41:06 -05:00
James
801068c8fe
chore: revises left indent
2022-12-22 18:26:09 -05:00
James
4516c3670e
chore: overhauls lists, prepares for left indent
2022-12-22 15:55:07 -05:00
James
542ea8eb81
fix : #551 - rich text nested list structure
2022-12-19 22:51:24 -05:00
Jarrod Flesch
918130486e
fix: styles readOnly RichTextEditor, removes interactivity within when readOnly
2022-09-23 14:34:02 -04:00
Elliot DeNolf
03847703b0
chore: update rich text data seeding
2022-09-08 15:40:49 -07:00
James
a99d9c98c3
feat: allows rich text links to link to other docs
2022-09-07 16:42:43 -07:00
James
e57a5741e5
chore: reduces lorem ipsum amount in rich text
2022-07-17 13:34:06 -07:00
James
e7d2bdb45a
fix: styles empty version diff row for dark mode
2022-07-17 09:51:42 -07:00
James
d8a28acfa8
feat: expands rich text field config for better coverage
2022-07-17 09:26:43 -07:00
Elliot DeNolf
fa9bd6191c
chore: run prettier on entire test dir
2022-07-17 08:20:01 -07:00
James
2fa680cdf8
feat: refactors z index methodology
2022-07-16 13:56:49 -07:00
Elliot DeNolf
ba79b4446c
test: refactor all test directories into one
2022-07-15 12:51:43 -07:00