Skip to content

Conversation

@goliath-walker
Copy link
Contributor

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 into NotebookFilter and NotebookCache, so it can be reused for single note filtering.
This way shouldIncludeNotebook (previously shouldIncludeNote) is no closure and becomes a function of its own.

@goliath-walker goliath-walker changed the title Fix notebook filter Fix notebook filter for distance-based graph Oct 1, 2022
Comment on lines +144 to +151
// 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)
// ),
//};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please evaluate if needed

Copy link
Owner

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?

@treymo treymo self-requested a review October 5, 2022 14:41
@treymo
Copy link
Owner

treymo commented Oct 30, 2022

Hey sorry, I'll take a look today!

Comment on lines +144 to +151
// 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)
// ),
//};
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants