Skip to content

fix: Various improvements to cursor positions in Auto-Suggest #3020

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 11 commits into from
Aug 9, 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:

  • Refactor (prefix: refactor - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)
  • Tests (prefix: test - additions and improvements to unit tests and the smoke tests)

Description

Fix some unreported inconsistencies in AutoSuggest behaviour, discovered whilst adding support for auto-suggest on a new field.

  • fix: Better dataview space & cursor in recurrence suggestions
  • fix: Remove the need to type a space after 'id' and 'depends on' selected
  • fix: Better dataview space & cursor in 'generate unique id' result

See the "Screenshots" section below for demos of each change.

Motivation and Context

I want to extract some helper functions in Suggestor.ts as it is so repetitive - in doing so, I found some inconsistencies in the code, which explain some inconsistencies in the behaviour.

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

Tasks Format

- [ ] #task Tasks Format - Task 1 🔁 every day |
- [ ] #task Tasks Format - Task 2 🆔|
- [ ] #task Tasks Format - Task 3 ⛔|
- [ ] #task Tasks Format - Task 4 🆔 ousy9q| 

Dataview Format

- [ ] #task Dataview Format - Task 1 [repeat:: every day |]
- [ ] #task Dataview Format - Task 2 [id::|]
- [ ] #task Dataview Format - Task 3 [dependsOn::|]
- [ ] #task Dataview Format - Task 4 [id:: ousy9q| ]

After

Tasks Format

- [ ] #task Tasks Format - Task 1 🔁 every day |
- [ ] #task Tasks Format - Task 2 🆔 |
- [ ] #task Tasks Format - Task 3 ⛔ |
- [ ] #task Tasks Format - Task 4 🆔 ousy9q |

Dataview Format

- [ ] #task Dataview Format - Task 1 [repeat:: every day] |
- [ ] #task Dataview Format - Task 2 [id:: |]
- [ ] #task Dataview Format - Task 3 [dependsOn:: |]
- [ ] #task Dataview Format - Task 4 [id:: ousy9q] |

Checklist

Terms

@claremacrae claremacrae added the scope: auto-suggest The pop-up menu that helps with editing tasks directly in markdown notes label Aug 9, 2024
Copy link

sonarqubecloud bot commented Aug 9, 2024

@claremacrae claremacrae merged commit 24702c2 into main Aug 9, 2024
3 checks passed
@claremacrae claremacrae deleted the fix-auto-suggest-cursor-in-dataview branch August 9, 2024 13:22
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