Skip to content

Conversation

@GrahameGW
Copy link

Implements an ordered list block. Includes the ability to edit the list numbers (single click on them), has all the auto-cascade/renumbering logic, and correctly rolls numbers forward or backwards with indents. I also moved a couple of files around because intellisense was complaining about using react hooks in weird places and it seemed straightforward enough to split getBlocks into its own file. I added a "list style" type as well that could potentially be merged w/ unordered lists and/or allow for the creation of other numbering types (letters, roman numerals)

Typescript is not my strong suit, so I'm sure there's some funky stuff going on here I did wrong. I'd love any feedback you guys might have.

@vercel
Copy link

vercel bot commented Jan 18, 2026

@GrahameGW is attempting to deploy a commit to the Hyperlink Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
minilink Error Error Jan 28, 2026 6:28pm

Request Review

@jaredpereira
Copy link
Contributor

This looks awesome! Unsure why it isn't building on vercel, I'll take a look at that, but in the mean time I built it locally and tested.

The only logic issue I found so far is that indent should have the same logic as outdent for calculating the new items index.

In terms of styling the two issues are:

  1. the indentation doesn't match ordered lists properly
  2. The list number editor should be styled to match other form inputs we have. It's a bit of a wierd input, but I think mainly just padding and rounding the borders and using the border color should work fine.

After that the only remaining piece is adding ordered lists to the block lexicons for when posts are published. This is slightly complicated by the current implementation of unordered list which assumes all children are also an unordered list. I think the most backwards compatible approach here is to add another property, for orderedChildren, or something like that, which just takes from an orderedList lexicon. Let me try and spec something out here, but happy to hear if you have any ideas!

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.

2 participants