Skip to content

[PM-35398] refactor: Promote ExpandableHeaderView from AuthenticatorShared to BitwardenKit#2582

Draft
SaintPatrck wants to merge 2 commits intomainfrom
vault/pm-35398-ios-promote-expandable-header
Draft

[PM-35398] refactor: Promote ExpandableHeaderView from AuthenticatorShared to BitwardenKit#2582
SaintPatrck wants to merge 2 commits intomainfrom
vault/pm-35398-ios-promote-expandable-header

Conversation

@SaintPatrck
Copy link
Copy Markdown
Contributor

@SaintPatrck SaintPatrck commented Apr 24, 2026

🎟️ Tracking

PM-35398

📔 Objective

ExpandableHeaderView lived in AuthenticatorShared, which BitwardenShared cannot import. Moving the view to BitwardenKit is the minimum change that lets both apps share one implementation rather than fork it into each.

⚠️ Authenticator visual drift (flagged for review)

The move swaps Authenticator-scoped tokens / modifiers for their BitwardenKit equivalents. These are not strictly drop-ins:

Swap Old New Effect
Asset.Colors.textSecondarySharedAsset.Colors.textSecondary #505059 #5A6D91 chevron tint
Asset.Colors.backgroundPrimarySharedAsset.Colors.backgroundPrimary #FFFFFF #F3F6F9 #Preview canvas
.accessoryIcon(scaleWithFont:).accessoryIcon16(scaleWithFont:) brand-blue default tint different default chevron glyph

Want design / product input: accept as-is (broader Authenticator alignment coming) or restore parity explicitly.

📸 Screenshots

Authenticator before / after to capture the drift — to be added before this PR leaves draft.

…hared to BitwardenKit

Moves the existing `ExpandableHeaderView` component from `AuthenticatorShared`
to `BitwardenKit/UI/Platform/Application/Views/` so both BWPM and Authenticator
can consume it. Makes the struct, its initializer, and its `body` public.
Swaps the BitwardenKit-idiomatic `SharedAsset.Colors.*` for the
AuthenticatorShared-scoped `Asset.Colors.*` references and switches
`.accessoryIcon(scaleWithFont:)` (AuthenticatorShared-only) for the
behaviorally-identical `.accessoryIcon16(scaleWithFont:)` already exposed by
BitwardenKit's `ImageStyle`. Drops the self-import of `BitwardenKit`.

No API change, no behavior change — pure relocation to enable cross-app
reuse in PR 6b (Binding<Bool> initializer) and PR 6c (BWPM vault-list
adoption). Authenticator's existing call site in `ItemListView.swift`
already imports `BitwardenKit` and resolves the promoted public type
without further changes.
…enKit idioms

Folds in edits that should have been part of the prior relocation commit:
- Make the struct, its initializer, and `body` public so BWPM can consume it.
- Drop the self-import of `BitwardenKit` (the file now lives inside that module).
- Swap `Asset.Colors.*` (AuthenticatorShared-scoped) for the BitwardenKit-
  idiomatic `SharedAsset.Colors.*` used by every other view in this directory.
- Swap `.accessoryIcon(scaleWithFont:)` (AuthenticatorShared-only style) for
  the behaviorally-identical `.accessoryIcon16(scaleWithFont:)` already
  exposed by BitwardenKit's `ImageStyle`.

No API change, no behavior change — still pure relocation prep for PR 6b/6c.
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:tech-debt Change Type - Tech debt labels Apr 24, 2026
@SaintPatrck SaintPatrck added the ai-review-vnext Request a Claude code review using the vNext workflow label Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.15%. Comparing base (aa51cd7) to head (f9e4cd5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...tform/Application/Views/ExpandableHeaderView.swift 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2582      +/-   ##
==========================================
- Coverage   87.17%   87.15%   -0.02%     
==========================================
  Files        1886     1887       +1     
  Lines      166723   166760      +37     
==========================================
- Hits       145335   145334       -1     
- Misses      21388    21426      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

ai-review-vnext Request a Claude code review using the vNext workflow app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:tech-debt Change Type - Tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant