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: Provide better Boolean help messages #2760

Closed
wants to merge 6 commits into from

Conversation

claremacrae
Copy link
Collaborator

Description

Provide meaningful information to help users trouble-shoot any problems with Boolean filters.

Note: more improvements are coming so I am not updating the documentation yet.

Motivation and Context

Try to provide a 'help' message rather than 'error' message.

Based on: https://twitter.com/travis_simon/status/1069074730211135488

image

How has this been tested?

  • Automated tests
  • Exploratory testing

Screenshots (if appropriate)

Before:

malformed boolean query -- Unexpected character: " (check the documentation for guidelines)

After:

Could not interpret the following instruction as a Boolean combination:  
    (description includes "hello world") OR (description includes "42")  
  
The error message is:  
    malformed boolean query -- Unexpected character: " (check the documentation for guidelines)  
  
The instruction was converted to the following simplified line:  
    (f1") OR (f2")  
  
Where the sub-expressions in the simplified line are:  
    'f1': 'description includes "hello world'  
    'f2': 'description includes "42'  
  
For help, see:  
    https://publish.obsidian.md/tasks/Queries/Combining+Filters

Types of changes

Changes visible to users:

  • New feature (prefix: feat - non-breaking change which adds functionality)
  • Documentation (prefix: docs - improvements to any documentation content for users)

Internal changes:

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

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.
    • Will be done later
  • My change has adequate Unit Test coverage.

Terms

@claremacrae claremacrae added the scope: query logic Boolean combinations of filters - and, or, not label Apr 9, 2024
@claremacrae
Copy link
Collaborator Author

Closing as I forgot to push some changes on main before creating this PR, so it has too many changes.

@claremacrae claremacrae closed this Apr 9, 2024
@claremacrae claremacrae deleted the better-boolean-messages branch April 9, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: query logic Boolean combinations of filters - and, or, not
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant