Conversation
|
@GrahameGW is attempting to deploy a commit to the Hyperlink Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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:
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! |
|
Thanks @GrahameGW this is awesome! Just did some testing too, a few more comments:
|
So originally what I was trying to do was actually flatten the list entirely, and make indent depth a simple property rather than have nested lists in the way unordered list was implemented. The logic for this is that I get really frustrated at most list implementations where they force you to restart the list if you have a break for a picture or some other element that doesn't use list styling. If I understand the lexicons correctly, this would be easy--you just add properties. Of course, with legacy lexicons out there you end up with two implementations. This was one of the reasons I ended up not going that route; I didn't want to handle migration scripts for legacy lists and that was even before considering existing ones. I think you can do it in the same manner as unordered children do it; there's some elegance to that as they will be structurally identical, the ordered lists just have a few extra properties. Provided there's no hard-coupled logic to numbering (e.g., you don't have to go sequentially), then it's fine and solves the problem of the "I want a picture in my list." thing.
I'm not entirely clear what the logical issue is here, but I did find a bug (I think) so I've implemented a fix and hopefully that will resolve it, and maybe that's the issue you're referring to. Basically, when I have a list:
If I indent "blah" I would expect it to be 3., but it is going to 1. So I've fixed that Otherwise, I'm working on the multiselect and copy paste. Might finish up tonight, might be later in the week on that. |
Add the missing "of" between "list" and "Bluesky" in the "Show Mentions" toggle description across both PostSettings and PostOptions components. Changes: - components/PostSettings.tsx: "Display a list Bluesky mentions..." → "Display a list of Bluesky mentions..." - app/lish/[did]/[publication]/dashboard/settings/PostOptions.tsx: Same fix https://claude.ai/code/session_01UmMsAY9kbwJy4p1nD6sCh8 Co-authored-by: Claude <noreply@anthropic.com>
|
@jaredpereira and @bschlagel -- I had to do some rewrites but as far as I can tell this is pretty solid now. The only thing missing is the lexicon stuff. I would assume the way forward is to add optional arrays as a property for ordered list item children to unordered lists, and then have a new lexicon set for ordered lists (that includes the optional array for unordered list children). I can give that a try if you'd like, let me know what you think, and if you find anything else broken. The PR has a few of my working commits; do you want me to rebase or otherwise cleanup, or is it fine how it is? |
|
Yep that's the lexicon strategy I think makes the most sense! The places to touch for that are the lexicons themselves and then PostContent.tsx file for rendering the published page based on the contents of the lexicon. Also happy to implement as well if you'd prefer, you've done the hard part here! This is what I ended up with when sketching out the lexicons: and for a new property on unorderedList: |
|
Yeah cool. I won't be able to get to it before the weekend at the earliest so feel free to ninja me on this, but otherwise I'll try and sort it out by Sunday. |
|
@jaredpereira I think it's working with the new lexicon? Not totally convinced on the workflow but it seems to be showing up properly in my dev PDS so hopefully it's correct. I did slightly tweak your Lemme know what else is broke; managing the lexicons is definitely new for me but I think I'm close anyway. |
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
getBlocksinto 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.