-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix notebook filter for distance-based graph #64
base: main
Are you sure you want to change the base?
Conversation
// Get a list of valid notebook names to filter out. | ||
// TODO: Is this even needed? | ||
//filter = { | ||
// ...filter, | ||
// filteredNotebookNames: filter.filteredNotebookNames.filter((name) => | ||
// cache.notebookIdsByName.has(name) | ||
// ), | ||
//}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please evaluate if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely remember running into some sort of exception with invalid notebook names. I wasn't able to reproduce it locally with your PR. Maybe it's safe to delete?
Hey sorry, I'll take a look today! |
// Get a list of valid notebook names to filter out. | ||
// TODO: Is this even needed? | ||
//filter = { | ||
// ...filter, | ||
// filteredNotebookNames: filter.filteredNotebookNames.filter((name) => | ||
// cache.notebookIdsByName.has(name) | ||
// ), | ||
//}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely remember running into some sort of exception with invalid notebook names. I wasn't able to reproduce it locally with your PR. Maybe it's safe to delete?
This PR will fix distance-based graph to consider excluded notebooks. Currently excluded notebooks only work, if all notes are shown in graph.
I needed to split up the
filterNotesByNotebookName
intoNotebookFilter
andNotebookCache
, so it can be reused for single note filtering.This way
shouldIncludeNotebook
(previouslyshouldIncludeNote
) is no closure and becomes a function of its own.