Skip to content

Change explorer panel styling #348

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

sn2912
Copy link
Contributor

@sn2912 sn2912 commented Apr 16, 2025

What Is This Change?

This PR includes styling changes around displaying filenames in bitbucket pullrequest explorer panel,

  • to show file change type symbol at the end
  • to show filename in different colors based on change type

How Has This Been Tested?

Basic checks:

  • npm run lint
  • npm run test

Advanced checks:

  • If Atlassian employee & Bitbucket changes: did you test with DC in mind? See Instructions

Recommendations:

  • Update the CHANGELOG if making a user facing change

@sn2912 sn2912 changed the base branch from main to add-checkbox-content-based-hashing April 16, 2025 05:17
@@ -33,4 +34,6 @@ export function activate(context: ExtensionContext) {
copyPullRequest.run(),
);
context.subscriptions.push(copyPullRequestCmd);
const decorationProvider = new FileDecorationProvider();
Copy link
Contributor

Choose a reason for hiding this comment

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

why are you registering this with the commands?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had added since I wanted to register the decoration provider when extension activates.
But my bad, have refactored the code to separate UI decorations from commands

@@ -1,8 +1,9 @@
import { commands, ExtensionContext } from 'vscode';
import { commands, ExtensionContext, window } from 'vscode';
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is window used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On line 42 to register the decoration provider

import { CopyBitbucketPullRequestCommand } from './command-copy-pullreqest';
import { OpenInBitbucketCommand } from './command-open';
import { OpenBitbucketChangesetCommand } from './command-open-changeset';
import { OpenBitbucketPullRequestCommand } from './command-open-pullrequest';
import { FileDecorationProvider } from 'src/views/nodes/pullRequestFilesNode';
Copy link
Contributor

Choose a reason for hiding this comment

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

Are src/ URLs working in the extension?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah they are, I didn't have idea about reasons for not using them.
Any specific cons?

@@ -68,28 +123,14 @@ export class PullRequestFilesNode extends AbstractBaseNode {
title: 'Diff file',
arguments: this.diffViewData.diffArgs,
};

item.contextValue = `${PullRequestContextValue}${this.checked ? '.checked' : ''}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these not changes from the previous PR?

Copy link
Contributor Author

@sn2912 sn2912 Apr 16, 2025

Choose a reason for hiding this comment

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

No these are expected to be part of this PR itself to remove these icons
Screenshot 2025-04-16 at 11 19 18 AM

@sn2912 sn2912 force-pushed the change-explorer-panel-styling branch from 0dd20d0 to 5b92062 Compare April 16, 2025 06:02
@sn2912 sn2912 changed the base branch from add-checkbox-content-based-hashing to main April 16, 2025 06:03
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.

3 participants