-
Notifications
You must be signed in to change notification settings - Fork 704
Fix issue closed state colors to match GitHub.com behavior with state reason support #7629
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
Conversation
Co-authored-by: alexr00 <[email protected]>
alexr00
left a comment
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.
@copilot Now, we are using the proper existing purple merged color for closed issues. The next step is to:
- Determine if an issue was closed as not planned or completed
- Use the exising grey "draft pr" color for issues closed as not planned issues.
Co-authored-by: alexr00 <[email protected]>
…atus Co-authored-by: alexr00 <[email protected]>
I've implemented the stateReason functionality to distinguish between issues closed as "not planned" vs "completed": Changes made in commit 1a22a03:
Color behavior:
The implementation leverages GitHub's |
Co-authored-by: alexr00 <[email protected]>
This PR fixes the inconsistent coloring of closed issues in the PR webview to align with GitHub.com's visual design, including support for distinguishing between issues closed as "completed" vs "not planned".
Problem
Previously, both closed issues and closed pull requests displayed with red color in the extension's webview, which was inconsistent with GitHub.com where:
Solution
Updated the color logic to differentiate between closed issues and closed PRs using GitHub's
stateReasonfield:stateReasonfield to GraphQL queries to fetch issue closure reason (COMPLETEDvsNOT_PLANNED)interface.tsandviews.tsto include the optionalstateReasonfieldgetStatus()function inwebviews/components/header.tsxto acceptstateReasonparameter and use appropriate colors:IssueModelto track and handlestateReasonchangessrc/github/markdownUtils.tsto use grey (#6a737d) for "not planned" issues and purple (#8957e5) for "completed" issuesVisual Impact
This change makes the extension's visual language consistent with users' expectations from GitHub.com, improving the overall user experience and reducing confusion between different item states.
Fixes #7628.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.