[PM-35398] refactor: Promote ExpandableHeaderView from AuthenticatorShared to BitwardenKit#2582
Draft
SaintPatrck wants to merge 2 commits intomainfrom
Draft
[PM-35398] refactor: Promote ExpandableHeaderView from AuthenticatorShared to BitwardenKit#2582SaintPatrck wants to merge 2 commits intomainfrom
SaintPatrck wants to merge 2 commits intomainfrom
Conversation
…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.
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
PM-35398
📔 Objective
ExpandableHeaderViewlived inAuthenticatorShared, whichBitwardenSharedcannot import. Moving the view toBitwardenKitis the minimum change that lets both apps share one implementation rather than fork it into each.The move swaps Authenticator-scoped tokens / modifiers for their
BitwardenKitequivalents. These are not strictly drop-ins:Asset.Colors.textSecondary→SharedAsset.Colors.textSecondary#505059#5A6D91Asset.Colors.backgroundPrimary→SharedAsset.Colors.backgroundPrimary#FFFFFF#F3F6F9#Previewcanvas.accessoryIcon(scaleWithFont:)→.accessoryIcon16(scaleWithFont:)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.