Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 18, 2025

Summary

Adds a new informational banner that informs users about the Ctrl+Click feature to pin extensions to the top of the list. The banner is shown once on first load and can be dismissed permanently.

Changes

Banner Implementation

  • Added new showStickyInfoMessage state variable that checks localStorage for the sticky-info-message key
  • Added hideStickyInfoMessage() function to dismiss the banner and persist the preference
  • Banner follows the same design pattern as the existing undo info banner (light background, dismissible with "Hide this" link)

Translations

Added the stickyInfoMsg translation key to all 16 supported locales:

  • English: "You can Ctrl+Click on extensions to stick them to the top of the list."
  • German: Uses "Strg+Klick" (German keyboard standard)
  • Japanese: Uses "Ctrl+クリック" (katakana)
  • Chinese: Uses "Ctrl+点击/點擊" (simplified/traditional)
  • And 12 other languages...

Message simplified to focus on the primary action (removed "unstick" from 14 locales, Italian kept as-is).

Behavior

  • Banner appears on first load when sticky-info-message is not in localStorage
  • User can dismiss it by clicking "Hide this"
  • Once dismissed, preference is stored and banner won't appear again
  • Banner is independent of the existing undo info banner
  • Both banners can be displayed simultaneously if neither has been dismissed

Screenshot

Sticky Extensions Info Banner

The banner appears at the top of the extension popup with a simplified message focusing on the primary action.

Technical Notes

  • Minimal changes approach: only added necessary code without modifying unrelated functionality
  • Reuses existing .notice and .hide-action CSS classes
  • Uses Chrome's built-in chrome.i18n.getMessage() for internationalization
  • No dependencies on replaceModifierIfMac since it doesn't support multi-character keys like "Click"
Original prompt

Add new banner like "showInfoMessage", but this time describing the "sticky extensions". the message should inform the user that they can ctrl-click to stick/unstick extensions. only show the message once, don't add further logic. also add all translations


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 18, 2025 08:05
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Copilot AI changed the title [WIP] Add sticky extensions banner message Add sticky extensions info banner with translations Oct 18, 2025
Copilot AI requested a review from fregante October 18, 2025 08:13
Copilot finished work on behalf of fregante October 18, 2025 08:13
Copy link
Collaborator

@fregante fregante left a comment

Choose a reason for hiding this comment

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

The code looks good, I'll just have to see what it looks like before merging it. I'll probably have to make some fixes around the ctrl-click text on Mac

@fregante
Copy link
Collaborator

@copilot update stickyInfoMsg (except italian) to remove "unstick"

@fregante fregante marked this pull request as ready for review October 18, 2025 10:04
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 18, 2025

@copilot update stickyInfoMsg (except italian) to remove "unstick"

Updated in commit 802892a. Removed "unstick" from all 14 locales (kept Italian unchanged as requested).

Updated banner

Copilot finished work on behalf of fregante October 18, 2025 10:11
@fregante fregante changed the title Add sticky extensions info banner with translations Add sticky extensions info banner Oct 18, 2025
/* Separate pinned extensions from the rest. Don't apply if they're *all* pinned */
.ext.pinned:nth-last-child(1 of .pinned).ext:not(:last-child) {
border-bottom: 5px solid var(--pinned-color);
border-bottom-width: 5px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

No color needed

Image Image

<!-- eslint-disable-next-line svelte/no-at-html-tags -- Static -->
{@html replaceModifierIfMac(getI18N('stickyInfoMsg'), '')}
<a class="hide-action" href="#hide" on:click={hideStickyInfoMessage}
>{getI18N('hideInfoMsg')}</a
Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM

Image

@fregante fregante merged commit 2c73c3d into main Oct 18, 2025
8 checks passed
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.

2 participants