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

feat: hide postpone button if happens date absent or invalid #2485

Merged

Conversation

ilandikov
Copy link
Collaborator

@ilandikov ilandikov commented Dec 7, 2023

Description

Change shouldShowPostponeButton() to account for valid happens dates.

Motivation and Context

Improve postpone usability: do not show postpone button when it is useless.

How has this been tested?

Unit tests + exploratory feature tests.

Screenshots

Postpone button is absent for tasks 5-9.

Снимок экрана 2023-12-07 в 10 34 59

NOTE: this screenshot is taken without scheduled date inference.

Types of changes

Changes visible to users:

  • New feature (prefix: feat - non-breaking change which adds functionality)

Checklist

  • My code follows the code style of this project and passes yarn run lint.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
    • documentation for postponement is absent for now
  • My change has adequate Unit Test coverage.

Terms

@claremacrae
Copy link
Collaborator

Looks good to me.

@ilandikov ilandikov marked this pull request as ready for review December 7, 2023 04:37
@ilandikov
Copy link
Collaborator Author

Looks good to me.

Thanks. I added a screenshot and NOTE: this screenshot is taken without scheduled date inference.

@claremacrae
Copy link
Collaborator

Thanks. There is no need to change the screenshot, but task 8 behaves that way because it has no date, not an invalid one. As a 5 digit year will not be recognised as a date.

@ilandikov ilandikov changed the title Postpone vs happens feat: do not show postpone button when happens date is absent or invalid Dec 7, 2023
@claremacrae claremacrae changed the title feat: do not show postpone button when happens date is absent or invalid feat: hide postpone button if happens date is absent or invalid Dec 7, 2023
@claremacrae claremacrae added scope: user interface Changes to parts of UI other the Edit task modal. See also "scope: edit task" scope: task dates and times Requests for enhancements to types and formats of dates and times associated with tasks and removed scope: task dates and times Requests for enhancements to types and formats of dates and times associated with tasks labels Dec 7, 2023
@claremacrae claremacrae changed the title feat: hide postpone button if happens date is absent or invalid feat: hide postpone button if happens date absent or invalid Dec 7, 2023
@claremacrae claremacrae merged commit f952634 into obsidian-tasks-group:main Dec 7, 2023
1 check passed
@claremacrae
Copy link
Collaborator

Thanks!

@claremacrae
Copy link
Collaborator

I did some more exploratory testing of this, and realised that there are cases we didn't think of to test - and define the behaviour we want - like what if:

  • there is a valid due date, but invalid scheduled?
  • there is a invalid due date, but a valid scheduled?

Basically, note to self: remember not to test just the simple cases, but try and remember to exploratory-test the more complex related cases for desired behaviour, and cover them in automated tests too.

I've made a note in the Development Discussion to come back to this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: user interface Changes to parts of UI other the Edit task modal. See also "scope: edit task"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants