Skip to content

don't show the view container title if it matches the view pane title#268065

Merged
sbatten merged 2 commits intomainfrom
sbatten/controversial-urial
Sep 23, 2025
Merged

don't show the view container title if it matches the view pane title#268065
sbatten merged 2 commits intomainfrom
sbatten/controversial-urial

Conversation

@sbatten
Copy link
Member

@sbatten sbatten commented Sep 23, 2025

Copilot AI review requested due to automatic review settings September 23, 2025 22:37
@sbatten sbatten enabled auto-merge (squash) September 23, 2025 22:37
@sbatten sbatten self-assigned this Sep 23, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the view pane title display logic to avoid showing redundant container titles when they match the view pane title. The change adds an additional condition to prevent displaying "Container: Title" when the container title and view title are identical.

Key Changes

  • Added condition to check if the view pane title matches the container title before displaying both
  • Added debug logging to trace title calculation logic

const isDefault = this.viewDescriptorService.getDefaultContainerById(this.id) === viewContainer;

if (!isDefault && viewDescriptor?.containerTitle && model.title !== viewDescriptor.containerTitle) {
console.log(`Calculating title: isDefault(${isDefault}), containerTitle(${viewDescriptor?.containerTitle}), modelTitle(${model.title})`);
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Debug console.log statement should be removed before merging to production. Consider using a proper logging mechanism or removing this temporary debugging code.

Suggested change
console.log(`Calculating title: isDefault(${isDefault}), containerTitle(${viewDescriptor?.containerTitle}), modelTitle(${model.title})`);
// Debug statement removed; use proper logging if needed.

Copilot uses AI. Check for mistakes.
@vs-code-engineering vs-code-engineering bot added this to the September 2025 milestone Sep 23, 2025
Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

nice

@sbatten sbatten merged commit f79ee12 into main Sep 23, 2025
28 checks passed
@sbatten sbatten deleted the sbatten/controversial-urial branch September 23, 2025 22:52
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Nov 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants