super_editor
super_editor copied to clipboard
[SuperEditor][SuperReader] - Feature: Use completely custom list item indicators
Edit: It looks like we do accept a widget builder for list items indicators, so we already have an escape hatch. That said, the following could be improved:
- Taking a
dotStyle
as a property, while also accepting a widget builder, is confusing. ThedotStyle
only applies when the default builder is used. We should remove the ambiguity. - Controlling padding to the left and the right of the indicator, as well as getting the indicator width to play nice with list item text left-margin, is too tricky. This should be easier and more obvious.
- We provide a default indicator builder, but at least for unordered items, there are reasonable alternative styles that would be nice to have out of the box. The default builder creates a filled circle. It would be nice to at least also have a hollow circle, and a square (with optional rounded corners). Perhaps also an image-based builder so developers can easily configure a bitmap or SVG image as the indicator.
- Consider also offering versions of the ordered list item indicator for alphabetic and roman numeral counting.
Original ticket - outdated by above
Currently, unordered list items can control their indicator's shape, color, and size. However, I have a use-case where I need to display a hollow circle instead of a filled circle.
In theory, an app might want any kind of custom indicator. This is a situation where we want to make it easy to do the standard thing, but possible to do a custom thing.
Take a quick look at the indicators that are supported out of the box by CSS. That will drive standard expectations. We want to make it trivial to use any of those. Then, beyond that out-of-the-box configuration, we want to make it possible to use a custom widget as the indicator.
PS - This work should also make it possible to customize the leading and trailing spacing around the indicator. For example, I'm trying to customize an unordered list item for a client where they want a bit more spacing between the "•" and the text. Currently, to do that, I think I need to copy the entire default indicator builder to adjust that one number.