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

Add options to select/unselect all files #2187

Merged
merged 5 commits into from
Jan 11, 2024

Conversation

guanglinn
Copy link
Contributor

@guanglinn guanglinn commented Dec 26, 2023

Add options to select/unselect all files, now do some file operations more conveniently in Markor.

@guanglinn
Copy link
Contributor Author

Screenshot_20231226_113930.jpg

@guanglinn guanglinn changed the title Add option to select all files Add options to select/unselect all files Dec 27, 2023
@@ -63,6 +63,7 @@ work. If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
<string name="last_modified">Last modified</string>
<string name="select_this_folder">Select this folder</string>
<string name="select">Select</string>
<string name="select_all">Select all</string>
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO the button title should change to 'clear' if all items are selected.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Better yet we can do the following:

  1. If no items selected make the text Select all
  2. If one or more items selected make the text Clear (n) where n is the number of items selected

Then we don't need to modify the title to add a clear button etc. Changes become much simpler

@harshad1
Copy link
Collaborator

I added several related improvements in #2176 (currently open PR). These changes are

  1. Refreshing the files list by swiping no longer clears the selected items.
  2. Made several improvements to how we handle the selection - cleaner logic and flow etc.
  3. I added a clear button to clear the selection.

This PR is more complete. So I think it makes sense for me to remove the clear button I added and instead use this. I will keep my underlying changes.

@guanglinn @gsantner I think this should be merged in first and then I will make the requisite changes to my PR

@guanglinn
Copy link
Contributor Author

I think this should be merged in first and then I will make the requisite changes to my PR.

I agree with you, doing so can be better to improve this feature.

@gsantner
Copy link
Owner

Thank you, I'm merging this.

As noted, "clear all" is something we want too, but harshad has some things in the works anyway about the selection. So lets make this simple one as first 😄

@gsantner gsantner merged commit 9a10d98 into gsantner:master Jan 11, 2024
1 check passed
@guanglinn guanglinn deleted the select_all branch January 12, 2024 05:46
@harshad1
Copy link
Collaborator

I have reworked this in my PR #2200

Here is what it looks like now:

image

  • The count is shown in the subtitle (this is built into android title bars - no need to modify title layout)
  • The select all button is shown if any items selected but not all items selected
  • The clear button is shown if any items selected

@guanglinn
Copy link
Contributor Author

Nice, I should try it.

@gsantner gsantner added this to the Markor v2.12 milestone Mar 27, 2024
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.

3 participants