Skip to content

Added display mode selection feature and implemented compact mode - #34

Merged
kubrickcode merged 1 commit into
mainfrom
develop/shlee/33
Oct 8, 2025
Merged

Added display mode selection feature and implemented compact mode#34
kubrickcode merged 1 commit into
mainfrom
develop/shlee/33

Conversation

@kubrickcode

Copy link
Copy Markdown
Owner

We've added Default and Compact modes, allowing users to choose how status badges are displayed in the issue list.

Key changes:

  • Added a Display Mode selection dropdown to the popup.
  • Compact mode: Displays only colored dots without text, and displays the full status name as a tooltip on hover.
  • Implemented smooth transitions by changing only classes and attributes without regenerating DOM elements when switching modes.
  • Added the data-status attribute to badges to maintain status information when switching modes.
  • Added accessibility attributes (role, aria-label, tabindex) to compact mode.

fix #33

@kubrickcode
kubrickcode marked this pull request as ready for review October 8, 2025 14:46
@vercel

vercel Bot commented Oct 8, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
github-project-status-viewer Ready Ready Preview Comment Oct 8, 2025 2:54pm
github-project-status-viewer-p4ii Ready Ready Preview Comment Oct 8, 2025 2:54pm

@kubrickcode

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a valuable display mode feature. The implementation is well-structured, particularly the smooth transitions without DOM regeneration and the good use of accessibility attributes. I've identified a few areas for improvement, mainly related to adherence to the repository's TypeScript style guide regarding type safety. My comments provide specific suggestions to address these points.

Comment thread extension/public/styles.css
Comment thread extension/src/content.ts Outdated
Comment thread extension/src/popup.ts Outdated
Comment thread extension/src/popup.ts Outdated
We've added Default and Compact modes, allowing users to choose how status badges are displayed in the issue list.

Key changes:
- Added a Display Mode selection dropdown to the popup.
- Compact mode: Displays only colored dots without text, and displays the full status name as a tooltip on hover.
- Implemented smooth transitions by changing only classes and attributes without regenerating DOM elements when switching modes.
- Added the data-status attribute to badges to maintain status information when switching modes.
- Added accessibility attributes (role, aria-label, tabindex) to compact mode.

fix #33
@kubrickcode

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

Thank you for your contribution! This pull request adds a great new feature for customizing the display of status badges. The implementation is solid, especially the way you've handled mode switching without regenerating DOM elements. I've left a few comments with suggestions to improve maintainability, consistency, and performance by addressing some code duplication and minor inefficiencies. These are mostly related to adhering to the repository's style guide. Overall, great work!

Comment on lines 118 to 138
/* GitHub manual dark theme selection (data-color-mode="dark") */
[data-color-mode="dark"] .project-status-badge {
background-color: rgba(110, 118, 129, 0.15);
color: #e6edf3;
border: 1px solid rgba(110, 118, 129, 0.3);
background-color: var(--badge-dark-bg);
color: var(--badge-dark-color);
border: 1px solid var(--badge-dark-border);
box-shadow: none;
}

[data-color-mode="dark"] .project-status-badge::before {
opacity: 0.85;
box-shadow: 0 0 0 1px rgba(13, 17, 23, 0.4);
box-shadow: var(--badge-dark-dot-shadow);
}

[data-color-mode="dark"] .project-status-badge--compact {
border-color: var(--badge-dark-compact-border);
box-shadow: var(--badge-dark-compact-shadow);
}

[data-color-mode="dark"] .project-status-badge--compact:hover {
box-shadow: var(--badge-dark-compact-hover-shadow);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The style rules for [data-color-mode="dark"] from line 119 to 138 are duplicates of the rules within the @media (prefers-color-scheme: dark) block (lines 95-116). This introduces code duplication, which goes against the repository's style guide (L15: 'when you see signs of reuse, modularize it to avoid code duplication').

For better maintainability, it's recommended to avoid repeating these blocks of CSS. While handling both system preference and manual theme selection in pure CSS can be tricky, this duplication can make future updates error-prone and harder to maintain.

Style Guide References

border: 1px solid var(--color-border-default);
border-radius: var(--radius-md);
cursor: pointer;
transition: all var(--transition-fast);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using transition: all can be inefficient as it causes the browser to watch for changes on all animatable properties, which can negatively impact performance. It's a best practice to specify only the properties you intend to transition. In this case, you are transitioning border-color and box-shadow.1

Suggested change
transition: all var(--transition-fast);
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);

Style Guide References

Footnotes

  1. Prioritize code readability over code efficiency, but also optimize for efficiency when possible.

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

Labels

feature New feature improvement Improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Added display mode with compact mode

1 participant