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

refactor: Add ListItem methods findClosestParentTask() and isTask() #3228

Merged
merged 11 commits into from
Dec 7, 2024

Conversation

claremacrae
Copy link
Collaborator

Types of changes

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

This fixes a problem that @ilandikov and I had, where we wanted to move findClosestParentTask() from QueryResultsRenderer.ts to ListItem.ts, but when we did so, the Tasks plugin crashed on start-up.

It is more convenient to be able to to write listItem.findClosestParentTask() and that now works.

I thought that the isTask accessor would be needed to make this work, but in fact it wasn't needed. However, it may still be useful eventually in custom filters and groups.

Motivation and Context

Move code to a more logical place.

How has this been tested?

  • Running the tests
  • Running the plugin and confirming that Tasks renderers Parent-Child relationships - Searches - Tasks.md correctly

Checklist

Terms

@claremacrae claremacrae added the type: internal Only regards development or contributing label Dec 7, 2024
Copy link

sonarqubecloud bot commented Dec 7, 2024

@claremacrae
Copy link
Collaborator Author

Hi @ilandikov, the crucial step is b4f0004 🎉

@claremacrae claremacrae merged commit 6c3101c into main Dec 7, 2024
4 checks passed
@claremacrae claremacrae deleted the access-related-tasks branch December 7, 2024 23:07
@ilandikov
Copy link
Collaborator

Hi @ilandikov, the crucial step is b4f0004 🎉

Very nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: internal Only regards development or contributing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants