Better ActionText plain text output for nested lists#37976
Conversation
|
@javan @sstephenson anything I can do to help move this along? |
|
👋 is anyone up for reviewing/giving feedback? Happy to put in more work on this as I still need it for a project and have it monkey-patched at the moment. @kaspth |
|
Hey, we've refit Action Text's internals a bunch for a product we're working on, so this code is fairly different. That work is scheduled to go public, but I don't have any details yet. Let's revisit then. I'll throw it on the milestone for the next major, so we eventually make a call about this. No guarantees as to what the call will be, sorry 😄 |
3bd6eb6 to
0b07fba
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
Still a valid issue IMO, but seems like it's still pending ActionText internals change? |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
@dhh are you able to share any plans about upstreaming the "refit ActionText internals" from HEY? This issue is still relevant but was pending those potential changes. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
@swanson We still have plans to upstream Action Text changes, but wouldn't have that prevent doing work here. |
Thanks, I will rebase and see if I can get the build to pass. |
0b07fba to
826f947
Compare
|
Merged main, added a few more test cases, tidied up the code a bit, build passing. 👍 |
|
Excellent work! |
Summary
When using
to_plain_texton action text content, nested lists are not rendering in an expected way. Out of the box, the rich text editor allows arbitrary nesting of lists using the "Increase" and "Decrease Level" buttons.Basic case with one nested item:
Expected:
Complex case with multi-level nested and mixed list types:
Expected:
Other Information
This PR adds two-space indentation per nested level for
ulandolwhen usingto_plain_texton action text content.Test case included. All tests passing locally.