Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SuperEditor] Task indentation implementation is missing #1895

Open
alterhuman opened this issue Mar 16, 2024 · 10 comments
Open

[SuperEditor] Task indentation implementation is missing #1895

alterhuman opened this issue Mar 16, 2024 · 10 comments
Labels
area_supereditor Pertains to SuperEditor type_enhancement New feature or request

Comments

@alterhuman
Copy link

Unable to indent checkboxes using tab key, similar to ordered and unordered lists.

Similar Issue

Pressing enter on an empty checkbox does not make it disappear,. This also works correctly in case of ordered and unordered lists.

@alterhuman alterhuman added the type_bug Something isn't working label Mar 16, 2024
@rutvik110
Copy link
Collaborator

@alterhuman Could you please describe what you mean when you say, "Unable to indent checkboxes using tab key, similar to ordered and unordered lists."? What's the expected and the actual behaviour you're encountering here? Please share any demos or reproducible example, makes things easier to understand for reviewers.

Also, if there are multiple issues you're encountering, please file a separate issue for each unless they're directly related to each other and fixing one could fix the other. Keeping a single issue scoped to a specific thing makes it easy to make decisions around it.

@rutvik110 rutvik110 added the awaiting-customer-feedback Waiting for the customer to respond to us label Mar 18, 2024
@alterhuman
Copy link
Author

@rutvik110 this is the expected behaviour (shown using bear app):

Indentation

Screen.Recording.2024-03-19.at.12.12.00.AM.mov

Actual behaviour is that nothing happens on pressing shift.

I will file a separate issue for the second one.

@rutvik110 rutvik110 added type_enhancement New feature or request area_supereditor Pertains to SuperEditor and removed type_bug Something isn't working awaiting-customer-feedback Waiting for the customer to respond to us labels Mar 18, 2024
@rutvik110
Copy link
Collaborator

Thanx a lot for the info. I think I understand the issue more clearly now. I just checked that the numbered and bullet lists in Super Editor support this where items are moved to a sub-list as part of the primary list item on shift press and reverted back on tab + shift press. This will be nice to have addition for checkbox list.

@matthew-carroll
Copy link
Contributor

@miguelcmedeiros @brian-superlist - Can you two let us know if this is a desirable default behavior? It seems like a fine thing to support, but we don't want to make it the default if you don't want it.

@alterhuman
Copy link
Author

@matthew-carroll any starting point on this would help, I will try to implement this myself.

@matthew-carroll
Copy link
Contributor

@alterhuman we still haven't heard back if this is desirable behavior. Therefore, if you implement it, at least for now, it needs to be opt-in behavior.

That said, if you want a hardware keyboard key to do something, the first thing you typically want to do is to create a key handler which implements the desired behavior. When you create a SuperEditor widget, it automatically includes a default list of key handlers. You can pass your own desired list of key handlers, instead. You probably want to create a new key handler that recognizes the tab key and indents the task.

If you want users to be able to press tab on a software keyboard then you'll need to look at where we handle IME messages. That's where we handle all text input on mobile, and some things from desktop, too.

You said that list items already handle indentation the way you want. Therefore, you can probably track down where list item indentation is handled to figure out what to do for tasks.

I'm guessing that TaskComponent also currently has no concept of indentation. Here again, you can probably borrow the approach from list items. The component needs to add the desired amount of space to the left side, depending on the lever of indentation.

Once you implement hardware key input, IME input, and visual indentation rendering, you should have a completed feature.

Please be sure to add appropriate tests, too.

@alterhuman
Copy link
Author

@matthew-carroll thanks will refer to list component & implement this.
@miguelcmedeiros @brian-superlist just in case if this was missed, is this a desirable behaviour for Superlist as well?

@brian-superlist
Copy link
Contributor

Nope, we'd need to implement this one ourselves since we have custom TaskComponents and functionality.

@alterhuman
Copy link
Author

Got it. So adding this in the SuperEditor won't be an issue since you guys are using your own task component.

@brian-superlist
Copy link
Contributor

Exactly -- it wouldn't be an issue for us if it's added, but we wouldn't fund the development in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area_supereditor Pertains to SuperEditor type_enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants