Skip to content

feat: implement ordered lists#354

Merged
cguedes merged 4 commits into
mainfrom
332-implement-lists
Aug 17, 2023
Merged

feat: implement ordered lists#354
cguedes merged 4 commits into
mainfrom
332-implement-lists

Conversation

@sehyod

@sehyod sehyod commented Aug 16, 2023

Copy link
Copy Markdown
Collaborator

This adds ordered lists and fixes issues with unordered lists.

  • List items can now be moved around
  • Pressing Enter splits them if the item is not empty
  • Pressing Enter/Backspace at the beginning of an item turns it into a regular node
  • Buttons related to lists in the menu bar of the editor now work as expected
  • Unordered list items use bullets, circle, square, then cycle back to bullet, etc. depending on their depth
  • Ordered list items use numbers, letters, roman numbers, then cycle back to numbers, etc. depending on their depth
  • A block can be turned into an unordered list item by typing -
  • A block can be turned into an ordered list item by typing a number, or letters, followed by a dot (e.g. 3. , a. , ii. )

Closes #330 #332

@codecov

codecov Bot commented Aug 16, 2023

Copy link
Copy Markdown

Codecov Report

Merging #354 (71ad289) into main (c1bebd9) will increase coverage by 0.26%.
The diff coverage is 80.43%.

@@            Coverage Diff             @@
##             main     #354      +/-   ##
==========================================
+ Coverage   84.42%   84.68%   +0.26%     
==========================================
  Files         157      167      +10     
  Lines        9372     9624     +252     
  Branches     1022     1055      +33     
==========================================
+ Hits         7912     8150     +238     
- Misses       1449     1463      +14     
  Partials       11       11              
Files Changed Coverage Δ
...TapNodes/notionBlock/commands/toggleOrderedList.ts 25.00% <25.00%> (ø)
...pNodes/notionBlock/commands/toggleUnorderedList.ts 25.00% <25.00%> (ø)
...ipTapNodes/notionBlock/commands/toggleCollapsed.ts 21.21% <40.00%> (+1.21%) ⬆️
...ck/inputRuleHandlers/createNotionBlockInputRule.ts 54.83% <54.83%> (ø)
...pTapNodes/notionBlock/plugins/orderedListPlugin.ts 64.17% <64.17%> (ø)
...otionBlock/plugins/collapsiblePlaceholderPlugin.ts 76.36% <76.36%> (ø)
...ipTapNodes/notionBlock/plugins/hideHandlePlugin.ts 79.16% <79.16%> (ø)
...odes/notionBlock/plugins/collapsibleArrowPlugin.ts 88.23% <88.23%> (ø)
...StudioDocument/serialization/MarkdownSerializer.ts 93.95% <88.88%> (-0.41%) ⬇️
...apNodes/notionBlock/plugins/unorderedListPlugin.ts 94.73% <94.73%> (ø)
... and 9 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sehyod sehyod marked this pull request as ready for review August 17, 2023 09:52
@cguedes cguedes merged commit b0519f3 into main Aug 17, 2023
@cguedes cguedes deleted the 332-implement-lists branch August 17, 2023 13:34
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.

Improve lists to be able to drag items individually

2 participants