-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Allow to remove all checked items (fix #1521) #1773
base: main
Are you sure you want to change the base?
Conversation
d0f1604
to
68e7f57
Compare
// remove them all together. | ||
return matcher | ||
.replaceAll("RANDOM-ISH_TEXT_TO_REPLACE") | ||
.replaceAll("RANDOM-ISH_TEXT_TO_REPLACE\n?", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a better idea, but this looks.... odd...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know but I could not find a better way either
final Pattern pattern = Pattern.compile( | ||
"^ *[-+*] \\[[xX]\\].*$", | ||
Pattern.MULTILINE | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This omits some variants that could lead to undefined behavior, for example checkboxes within code blocks. You can get some inspiration how to handle codeblocks in the nextcloud-commons
library, but beware: It ain't that easy. Codeblocks can have three or more backticks, for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will!
.concat("+ [ ] Line G") | ||
.concat(newLine) | ||
.concat(" + [ ] G1") | ||
.concat(newLine); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated above, there are very many cases of the commonmark
specification not considered (and also not covered by the tests)... @AndyScherzinger and @tobiasKaminsky will have to decide how compliant is "compliant enough" 😉
@AndyScherzinger you also maybe want to talk with @jancborchardt or @nimishavijay about the UX? The overflow menu is already quite crowded |
Thanks for the contribution @nicofrand :) Could you please post a screenshot or video of the UI so that it is easier for everyone to review the design? :) |
Sure, here it is: device-2023-05-19-154243.webm |
Very nice contribution @nicofrand! :) I’m wondering if instead of a permanent action like this, it would be good to have one of either of these:
What do you think @stefan-niedermann @nextcloud/designers? |
We had this feature request a few times (hide or strike checked items, sort checked items to bottom), which I declined so far because
¹ Might be obsolete now when you implement it on server as well After all it's your decision now, and maybe some advanced handling of checkbox lists is indeed a good idea, but you should think about consequences, especially parity between the modes (view, edit, rich), parity with the ecosystem (notes server, notes iOS) and parity with other occurrences of the rich editor (files, deck, tables, polls, collectives, ...) |
Hi everyone! So, if I sum up the concerns regarding this merge request, here are the points I see:
Could you guys tell me if I should move forward to solve point 1 or if there is no current change of merging this? |
I would say if it’s the simple hiding option like so:
It would be good, and it would also not necessarily also be implemented in the web app too. @nicofrand what do you mean by it wouldn't help you with a shopping list? Usually shopping lists are similar across shopping runs, otherwise you have to type all deleted items again and again. @stefan-niedermann what do you think? |
Having it in a bottom list, usually with a stroke, often creates duplicates (I don't remember if I already added it, where in the list, as a plural or not, etc.). |
With the hiding option I mean that the items should actually not be moved around in the list, just hide checked items. :) So a purely client-side view switch. Does that make sense? |
Ah ok, only in the client view! But that would not help when editing a list (cleaning all items that I bought, letting the ones missing)… |
Signed-off-by: nicofrand <[email protected]>
68e7f57
to
5423f87
Compare
Rebased due to major technical updates in terms of libraries, especially AGP and SSO |
Hi,
This PR solves the issue described in issue #1521 (ie. I want a quick action to clear the markdown from all checked items). It's quite simple but I am new to this language and environment so please tell if there are things that feel off.
Thanks in advance for the review, and thanks again for this useful app!