Skip to content

fix: Better dataview space & cursor in date Auto-Suggest #3025

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

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

claremacrae
Copy link
Collaborator

Types of changes

Changes visible to users:

  • Bug fix (prefix: fix - non-breaking change which fixes an issue)

Internal changes:

  • Tests (prefix: test - additions and improvements to unit tests and the smoke tests)

Description

Like #3020 but for date suggestions where the user typed their own date value, such as '21 oct' or '1 year'.

Motivation and Context

More improvements to the Auto Suggest code before adding support for On Completion.

How has this been tested?

  • Automated tests
  • Exploratory testing

Screenshots (if appropriate)

In the following text, the | represents the cursor position after the change.

Before:

- [ ] #task Normal priority [due:: 2024-10-21 |]

After

- [ ] #task Normal priority [due:: 2024-10-21] |

Checklist

  • My code follows the code style of this project and passes yarn run lint.
  • My change has adequate Unit Test coverage.

Terms

When the user types a date like '1 year' or '27 oct'
@claremacrae claremacrae added the scope: auto-suggest The pop-up menu that helps with editing tasks directly in markdown notes label Aug 12, 2024
Copy link

@claremacrae
Copy link
Collaborator Author

The bug was that the insertSkip had not been updated to take account of dataview format.

So the fix was to change the code to use the new constructSuggestions() helper function I created recently, to ensure standard, consistent behaviour.

@claremacrae claremacrae merged commit 05fbaec into main Aug 12, 2024
3 checks passed
@claremacrae claremacrae deleted the fix-dataview-suggestions branch August 12, 2024 07:57
@claremacrae claremacrae changed the title fix: Better dataview space & cursor in date suggestions fix: Better dataview space & cursor in date Auto-Suggest Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: auto-suggest The pop-up menu that helps with editing tasks directly in markdown notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant