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

Fix: Add multiple checkboxes at once #2419

Merged
merged 3 commits into from
Oct 27, 2020

Conversation

codebykat
Copy link
Member

@codebykat codebykat commented Oct 23, 2020

Fix

This restores the ability to select multiple lines and toggle checkboxes on all of them.

n.b. this runs toggle checkbox on all lines of selection, meaning if you select some lines that already have a checkbox, the checkbox will be removed. Is this the desired behavior?

Fixes #2409

Test

  1. Select multiple lines, Insert Checklist should run the "toggle checkbox" on each of them (inserting or removing depending on if it had one already)
  2. Without a selection, Insert Checklist should toggle checkbox on the current line (where the cursor is)

Release

Restored ability to select multiple lines and add multiple checkboxes at once with Insert Checklist

@codebykat codebykat added this to the 2.1.0 milestone Oct 23, 2020
@codebykat codebykat requested a review from a team October 23, 2020 21:45
@codebykat codebykat self-assigned this Oct 23, 2020
Copy link
Contributor

@belcherj belcherj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. The only problem I see is if you have a mix of checkboxes and no checkboxes in a selection. I wonder if we should toggle all lines in a selection the opposite of the first line in the selection. Something to think about for another PR.

@codebykat codebykat merged commit ec03d89 into develop Oct 27, 2020
@codebykat codebykat deleted the update/multiple-line-checkboxes branch October 27, 2020 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding multiple checkboxes at once broken on 2.0
2 participants