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

Edits in the freetext field when writing a todo should update the select/input fields below #533

Closed
swantzter opened this issue Sep 29, 2023 · 5 comments

Comments

@swantzter
Copy link

swantzter commented Sep 29, 2023

Feature Request

Description:
When creating a task you have two sections available in the dialog, a top freeform text field where you can enter the task in todo.txt format (red) and a bottom section where you can configure some of sleek's supported tags etc. (blue)

image

When you make a change to something in the bottom half (blue), such as updating the priority or setting the due date the main input (red) gets updated. For example, setting the priority dropdown to "A" will prepend "(A) " to the main field or replace /^\([A-Z]\)\s/ with "(A) "

However, updating the main field (red), such as typing "(A) " or "due:next friday" does not update the input fields in the bottom half (blue)

image

It would be neat if the top and bottom half stayed in sync, in other word writing "(A) " in the main input would update the priority field in the bottom half, or writing "due:2023-12-31" would update the due date input in the bottom half.
It would be especially helpful (but tricky) with the "Friendly/Speaking date names", I could write "due:next friday" and the input field in the bottom half would get updated with the YYYY-MM-DD representation of that showing me what date that actually is

Use Case:
This is mostly a cosmetic thing, but would also make it less confusing in some scenarios. For example if you had selected a due date in the bottom half (blue) but then manually removed it from the main input (red) the due date input field will still show the due date you set making the user unsure if it will still be (re-)added when they save the task or not.

Similarly if you set the priority in the bottom half (blue) to "A" then edit it to "(B) " in the main input field it's unclear what takes precedent at first glance

Implementation Details:
This is a little bit extra tricky with dates due to "Friendly/Speaking date names" because of the spaces that aren't normally allowed in tags

Additional Context:

@ransome1 ransome1 moved this to Backlog in sleek 2.x Sep 29, 2023
@ransome1 ransome1 moved this from Backlog to In Progress in sleek 2.x Dec 20, 2023
@ransome1
Copy link
Owner

@swantzter although just a small feature, it let to quite some refactoring, which I think has a positive effect. Are you currently available for testing this feature?

@swantzter
Copy link
Author

@ransome1 I'll try to remember to look at it when I'm on a computer next - which might not be until Jan 8

@ransome1
Copy link
Owner

@swantzter sure, no problem.

Can be tested with the latest pre-release: https://github.com/ransome1/sleek/releases/tag/v2.0.4-rc.4

@swantzter
Copy link
Author

@ransome1 This seems to be working pretty well in both directions.
Only thing that isn't working entirely as expected is the interaction with "Friendly/Speaking date names"

If you input (A) test due:in two days into the text field the due date select field below does automatically update. But if you then change the date in the select field below the input field will read something like (A) test due:2023-12-28 two days instead of the expected (A) test due:2023-12-28

@ransome1
Copy link
Owner

@swantzter yep that's correct and it will take a significant more of work to fix this. But it should not be handled in this feature request. Since you already filed a respective bug report, we will finish it over there I'd suggest.

@ransome1 ransome1 closed this as completed Jan 2, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in sleek 2.x Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants