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

Fix logic for notebook outline data source isEmpty() fn #236525

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

Yoyokrazy
Copy link
Contributor

@Yoyokrazy Yoyokrazy commented Dec 18, 2024

Fixes: #208553

Slightly different fix than expected. The notebook outline datasource will send all entries to the view provider, and then the viewprovider will filter out entries based on the relevant notebook outline filters.

However, the placeholder message referenced by this issue is controlled by the outline pane checking the outline's isEmpty fn. This calls down to the data source, which just checks if there is a nonzero number of entries.

Issue is that it doesn't take into account that entries do exist, but may be filtered out by the view provider.

Fix is to just bulk up the logic for isEmpty, checking the entries against the outline filters to take into account what the user will see vs the entries object itself.

cc/ @rebornix, previously we discussed keeping the outline filters out of certain layers. We had one of the settings here already, as it related to computing symbols. This pulls in the other two, but still keeps the filtering concept out of the data source itself which is what we initially tried to avoid.

Fixed behavior:

20241218-2142-48.4952111.mp4

@Yoyokrazy Yoyokrazy self-assigned this Dec 18, 2024
@Yoyokrazy Yoyokrazy requested a review from rebornix December 18, 2024 21:43
@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Dec 18, 2024
@Yoyokrazy Yoyokrazy enabled auto-merge (squash) December 18, 2024 21:49
@Yoyokrazy Yoyokrazy merged commit a7d5ca7 into main Dec 18, 2024
8 checks passed
@Yoyokrazy Yoyokrazy deleted the implicit-fish branch December 18, 2024 22:12
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.

Placeholder for empty notebook outline view
2 participants