-
-
Notifications
You must be signed in to change notification settings - Fork 232
feat(ui): use icon-only when connected to services #1223
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
base: main
Are you sure you want to change the base?
feat(ui): use icon-only when connected to services #1223
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThis change removes avatar image usage from header components (AccountMenu and MobileMenu) by no longer extracting the Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/components/Header/AccountMenu.client.vue (1)
68-76: Consider adding accessible text for connection status.The green dot visually indicates that the user is connected to services, but screen reader users have no equivalent indication. Consider adding visually hidden text to convey this status.
Proposed fix
<div v-if="hasAnyConnection" class="flex items-center relative"> <span class="w-6 h-6 rounded-full bg-bg-muted ring-2 ring-bg flex items-center justify-center" :class="hasBothConnections ? 'relative z-10' : ''" > - <span class="size-1.5 rounded-full bg-green-600 absolute top-0 -inset-ie-0"></span> + <span class="size-1.5 rounded-full bg-green-600 absolute top-0 -inset-ie-0" aria-hidden="true"></span> <span class="i-carbon-cloud w-3 h-3 text-fg-muted" aria-hidden="true" /> </span> + <span class="sr-only">{{ $t('account_menu.connected') }}</span> </div>This requires adding a
connectedtranslation key to your i18n files.
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/components/Header/AccountMenu.client.vue (1)
60-79:⚠️ Potential issue | 🟡 MinorConnection status is not accessible to screen readers.
The green dot indicator conveys the connected state visually but provides no accessible alternative. Screen reader users cannot perceive this status change. Consider adding an
aria-labelto the button that reflects the current connection state.Suggested fix
<ButtonBase type="button" :aria-expanded="isOpen" aria-haspopup="true" + :aria-label="hasAnyConnection ? $t('account_menu.connected') : $t('account_menu.connect')" `@click`="isOpen = !isOpen" class="border-none" >This assumes the appropriate translation keys exist. Adjust key names as needed.
🧹 Nitpick comments (1)
app/components/Header/AccountMenu.client.vue (1)
69-75: Consider removing vestigialz-10conditional class.The conditional
hasBothConnections ? 'relative z-10' : ''appears to be leftover from the previous multi-avatar stacking design. Since the UI now renders a single cloud icon regardless of how many services are connected, the z-index logic no longer serves a purpose. The parentdivat line 68 already provides therelativepositioning context needed for the status dot.Suggested simplification
<span class="w-6 h-6 rounded-full bg-bg-muted ring-2 ring-bg flex items-center justify-center" - :class="hasBothConnections ? 'relative z-10' : ''" >
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
|
what about instead displaying the logo of the connected service? (npm, bluesky or atproto) and we revisit when we get lots more... (could display a |
|
That could indeed be a valid alternative. I will use the logos |
How do you pick what logo to display though, if the user is connected to more than one thing? (assuming they can be) Could also have overlapping avatars. (But then again it gets tricky - which one do we show on top?) |
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/components/Header/AccountMenu.client.vue (1)
60-88:⚠️ Potential issue | 🟠 MajorAdd an explicit accessible label for the icon-only button.
When connected, the button contains only aria-hidden icons, so it has no accessible name. Please add an
aria-label(you already addedaccount_menu.connectedin i18n).✅ Proposed fix
<ButtonBase type="button" :aria-expanded="isOpen" aria-haspopup="true" + :aria-label="hasAnyConnection ? $t('account_menu.connected') : $t('account_menu.connect')" `@click`="isOpen = !isOpen" class="border-none" >
|
@danielroe I've updated the PR with icons. |
…teoGabriele/npmx.dev into feat/use-icon-when-connected
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/components/Header/MobileMenu.client.vue (1)
125-135:⚠️ Potential issue | 🟡 MinorMissing green status indicator for visual consistency.
The npm CLI connection (line 121) displays a green status dot to indicate active connection, but the Atmosphere connection lacks this indicator. For consistent UX, consider adding the same visual cue here.
💡 Suggested fix to add status indicator
<span class="flex-1 truncate">@{{ atprotoUser.handle }}</span> + <span class="w-2 h-2 rounded-full bg-green-500" aria-hidden="true" /> </button>
| isConnected: isNpmConnected, | ||
| isConnecting: isNpmConnecting, | ||
| npmUser, | ||
| avatar: npmAvatar, |
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.
still wondering if it makes sense to show avatars in the dropdown, even if not in the top level .... 🤔
wdyt?
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.
I think it may look a bit confusing and inconsistent.
If I have to go with avatars, which I do like because they give the impression that I've actually connected, I prefer the initial proposal.


Adding avatars for each connected service has several problems:
My proposal is to retain only the single cloud icon and add a green dot to indicate to the user that it is connected.
before

after
