Skip to content

fix(client): anchor pending-approvals badge to the avatar so it doesn't clip in the header#1175

Merged
krusche merged 1 commit into
stagingfrom
fix/pending-approvals-badge-styling
Jul 3, 2026
Merged

fix(client): anchor pending-approvals badge to the avatar so it doesn't clip in the header#1175
krusche merged 1 commit into
stagingfrom
fix/pending-approvals-badge-styling

Conversation

@krusche

@krusche krusche commented Jul 3, 2026

Copy link
Copy Markdown
Member

The pending-approvals count badge was absolutely positioned at the profile button's top-right corner (-top-1 -right-1). In the tight top header (py-1.5) inside an overflow-hidden main, that corner is at the header's top edge, so the badge overflowed above it and was clipped (and floated far-right past the user's name).

Fix: anchor the badge to the avatar (relative wrapper) as a compact corner overlay — the avatar's top is more interior, so the badge has headroom and reads as a notification count on the profile picture. Shrank it to fit the 20px avatar, and fixed an adjacent runcatetruncate typo so long names ellipsize.

Verified: ng build --configuration production succeeds, eslint clean. Best confirmed visually on staging (logged in with a pending approval).

…'t clip

The count badge was absolutely positioned at the profile button's top-right
corner (-top-1 -right-1). In the tight top header (py-1.5) inside an
overflow-hidden main, that corner sits at the header's top edge, so the badge
overflowed above it and was clipped (and floated far-right past the name).

Anchor it to the avatar instead (relative wrapper) as a compact corner overlay:
the avatar's top sits lower/more interior than the button corner, giving the
badge headroom, and it now reads as a notification count on the profile picture.
Also shrink it to fit the 20px avatar and fix an adjacent `runcate` -> `truncate`
typo so long names ellipsize.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 3, 2026 09:34
@krusche krusche requested a review from a team as a code owner July 3, 2026 09:34
@github-actions github-actions Bot added bug Something isn't working client size:S labels Jul 3, 2026
@codacy-production

codacy-production Bot commented Jul 3, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage 75.00% diff coverage · -0.01% coverage variation

Metric Results
Coverage variation -0.01% coverage variation (-1.00%)
Diff coverage 75.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c0f9ae3) 15418 7586 49.20%
Head commit (f94a301) 15420 (+2) 7585 (-1) 49.19% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1175) 8 6 75.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI 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.

Pull request overview

Fixes the pending-approvals notification badge in the top header by anchoring it to the avatar (instead of the profile button corner) so it doesn’t overflow/clamp within the tight, overflow-hidden header layout.

Changes:

  • Wrapes the avatar in a relative inline-flex container and absolutely positions the badge within that wrapper.
  • Shrinks/tightens the badge styling to fit the 20px avatar.
  • Fixes a Tailwind class typo (runcatetruncate) so long names ellipsize correctly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<p-badge
[value]="pendingApprovalsCount().toString()"
severity="warn"
class="!absolute -top-1.5 -right-1.5 !flex !items-center !justify-center !h-[1.1rem] !min-w-[1.1rem] !p-0 !text-[0.65rem] !leading-none"
@krusche krusche merged commit a550ebf into staging Jul 3, 2026
23 checks passed
@krusche krusche deleted the fix/pending-approvals-badge-styling branch July 3, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working client size:S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants