change to public fields of tag #10

Merged
MH4GF merged 2 commits from add-field-for-node-builder into master 2022-07-23 18:47:03 +02:00
MH4GF commented 2022-07-14 15:21:50 +02:00 (Migrated from github.com)

These fields would be very useful to have available for testing,
I would like to make them available to the public.

These fields would be very useful to have available for testing, I would like to make them available to the public.
marijnh commented 2022-07-21 16:19:40 +02:00 (Migrated from github.com)

In what situations are they useful?

In what situations are they useful?
MH4GF commented 2022-07-22 02:42:48 +02:00 (Migrated from github.com)

github.com/ProseMirror/prosemirror-schema-list@aa6f2a6c42/test/test-commands.ts (L7-L15)
Since tag returns pos, defining such a selFor() function has the advantage that the selection can be defined declaratively, increasing the readability of the test.

https://github.com/ProseMirror/prosemirror-schema-list/blob/aa6f2a6c42ee0c23406b39a818d92f691068773e/test/test-commands.ts#L7-L15 Since tag returns pos, defining such a `selFor()` function has the advantage that the selection can be defined declaratively, increasing the readability of the test.
marijnh commented 2022-07-22 08:44:37 +02:00 (Migrated from github.com)

Ah, you are talking about tag, not flat. I guess adding that to the return type there could make this a little more ergonomic. Adding flat seems to serve little purpose though (and is in fact incorrect, since that's not a property being added to Node instances, but an internally used alternative return type)

Ah, you are talking about `tag`, not `flat`. I guess adding that to the return type there could make this a little more ergonomic. Adding `flat` seems to serve little purpose though (and is in fact incorrect, since that's not a property being added to `Node` instances, but an internally used alternative return type)
MH4GF commented 2022-07-22 15:12:57 +02:00 (Migrated from github.com)

@marijnh thank you for response, Certainly for my use case, only tag was sufficient and I could not think of a case where flat would be needed. removed it: a9cb60b

@marijnh thank you for response, Certainly for my use case, only `tag` was sufficient and I could not think of a case where `flat` would be needed. removed it: a9cb60b
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-test-builder!10
No description provided.