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

Improvements for the action buttons, closes #2386 #2388

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

wshoy
Copy link
Contributor

@wshoy wshoy commented Aug 7, 2024

In this PR:

  • Date and time
  • Due date
    • Used "Due date" instead of "Current date" for the due date action button text
  • Priority
    • Added long press behavior to set/unset priority from the previous line
    • Made the highlighting colors equally bright and replaced yellow with magenta
  • Bold, Italic, etc.
    • Fixed a bug where the button didn't remove characters in the first word

@wshoy wshoy changed the title Fixes for the date action buttons Fixes for the date action buttons, closes #2386 Aug 7, 2024
@wshoy wshoy closed this Aug 11, 2024
@wshoy wshoy deleted the dateButtonsFixes branch August 11, 2024 19:55
@wshoy wshoy restored the dateButtonsFixes branch August 11, 2024 19:56
@wshoy wshoy reopened this Aug 11, 2024
@wshoy wshoy changed the title Fixes for the date action buttons, closes #2386 Improvements for the date and priority action buttons, closes #2386 Aug 11, 2024
@@ -208,7 +199,36 @@ public boolean onActionLongClick(final @StringRes int action) {
}
return true;
}
case R.string.abid_todotxt_current_date: {
case R.string.abid_todotxt_priority: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you describe the behaviour you are trying to achieve here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my experience, when adding a new task below another, the task's priority would usually be the same.
The goal is to set/unset the priority to be the same as the top one.

This is what felt right to me for multi line:

  • if at least one priority is different than the top one - set all to the top priority
  • if they are the same and same as the top one - remove priorities as there is nothing else to do (another press restores it)

That also means, that any priorities can be removed with at most two presses.
Might also add a check for the bottom line as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So long pressing the priority button copies the priority from the first task to all the others?

Does this really need a long press? Currently one can select all the tasks and assign them a priority pretty easily.

You can select multiple tasks by simply creating a selection covering multiple tasks in the editor or by using the search dialog.

So search -> select all -> priority action -> select priority to assign to all selected tasks.

Copy link
Contributor Author

@wshoy wshoy Aug 18, 2024

Choose a reason for hiding this comment

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

So long pressing the priority button copies the priority from the first task to all the others?

By "top" I mean the previous line from selection. Priority is copied to the selected lines.
The exact behavior is not set in stone, it's what I came up with.

Does this really need a long press? Currently one can select all the tasks and assign them a priority pretty easily.

In my experience, it feels much easier and responsive in daily use, as it makes creating another task with priority a little bit faster than the other methods.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah.

So the current workflow is:

select -> priority action -> choose

And the new workflow for this use case is

select -> long press priority action

We're replacing 2 short presses with one long press.

Copy link
Contributor Author

@wshoy wshoy Aug 18, 2024

Choose a reason for hiding this comment

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

Well put

private final static int COLOR_PRIORITY_D = 0xff0099CC;
private final static int COLOR_PRIORITY_E = 0xffEDD400;
private final static int COLOR_PRIORITY_F = 0xff888A85;
private final static int COLOR_PRIORITY_B = 0xffd16900;
Copy link
Owner

Choose a reason for hiding this comment

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

Why did you change those colors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The B and C colors were disproportionately bright compared to the red color of A. The A priority, being most important, should be at least as much noticeable as the other ones.
The yellow E color was much brighter than all the other colors and didn't match the hue sequence.

I used the perceived brightness formula to match the colors:

Before:
EF2929 - 0.53
F57900 - 0.64
73D216 - 0.68
0099CC - 0.53
EDD400 - 0.81
888A85 - 0.54

After:
EF2929 - 0.53
d16900 - 0.55
59a112 - 0.52
0091c2 - 0.51
a952cb - 0.51
878986 - 0.53

@wshoy wshoy changed the title Improvements for the date and priority action buttons, closes #2386 Improvements for the action buttons, closes #2386 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkboxes in "Date and time" action button dialog not saved
3 participants