-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[PM-6825] Browser Refresh - Initial List Items #9199
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9199 +/- ##
==========================================
+ Coverage 28.11% 28.14% +0.02%
==========================================
Files 2363 2368 +5
Lines 69922 70011 +89
Branches 13149 13158 +9
==========================================
+ Hits 19661 19704 +43
- Misses 48703 48748 +45
- Partials 1558 1559 +1 ☔ View full report in Codecov by Sentry. |
New Issues
|
Passing this on to @danielleflinn , do we plan to still use the current no-items icon anywhere? https://components.bitwarden.com/?path=/docs/component-library-no-items--docs Or should all instances of it be updated to the icon introduced here? |
@shane-melton Taking a look! 👀 |
...popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts
Outdated
Show resolved
Hide resolved
apps/browser/src/vault/popup/components/vault-v2/vault-list-item/vault-list-item.component.html
Outdated
Show resolved
Hide resolved
apps/browser/src/vault/popup/components/vault-v2/vault-list-item/vault-list-item.component.ts
Outdated
Show resolved
Hide resolved
...pup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.html
Outdated
Show resolved
Hide resolved
apps/browser/src/vault/popup/services/vault-popup-items.service.ts
Outdated
Show resolved
Hide resolved
apps/browser/src/vault/popup/components/vault-v2/vault-list-item/vault-list-item.component.html
Outdated
Show resolved
Hide resolved
<button type="button" bitIconButton="bwi-clone" size="small"></button> | ||
</bit-item-action> | ||
<bit-item-action> | ||
<button type="button" bitIconButton="bwi-ellipsis-v" size="small"></button> |
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.
These icon buttons should have aria labels
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.
Fixed 0a72374
<bit-item-group> | ||
<bit-item *ngFor="let cipher of ciphers"> | ||
<a bit-item-content [routerLink]="['/view-cipher']" [queryParams]="{ cipherId: cipher.id }"> | ||
<app-vault-icon slot="start" [cipher]="cipher"></app-vault-icon> |
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 don't think it needs to part of the CL--components can be used across clients without being part of the CL lib. The CL is for low level domain-agnostic UI components, whereas this is tied into the domain-specific idea of a vault cipher.
Instead, I would move these global styles into app-vault-icon
's template with Tailwind. This will make the component portable. (Also a good opportunity to make it standalone.)
|
apps/browser/src/popup/app.module.ts
Outdated
import { | ||
AvatarModule, | ||
ButtonModule, | ||
IconButtonModule, | ||
NoItemsModule, | ||
SectionComponent, | ||
ToastModule, | ||
TypographyModule, | ||
} from "@bitwarden/components"; |
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.
Only blocking item, everything else is a nit pick:
Do these need to be in the AppModule
? Could we instead make VaultV2Component
standalone? (I think that is why they were brought in.)
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.
Ah, at the time I originally started, the CurrentAccountComponent
and PopOutComponent
where not standalone and I couldn't import them into a standalone VaultV2Component
. However, now that they're both standalone I can do that.
Doing so also removes the need for a VaultV2Module
as everything it exported for the AppModule
can now be imported directly in VaultV2Component
.
Addressed in f332778
...t/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts
Outdated
Show resolved
Hide resolved
<bit-item-group> | ||
<bit-item *ngFor="let cipher of ciphers"> | ||
<a bit-item-content [routerLink]="['/view-cipher']" [queryParams]="{ cipherId: cipher.id }"> | ||
<app-vault-icon slot="start" [cipher]="cipher"></app-vault-icon> |
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.
Are we able to remove the global styles mentioned above in this thread? Are they still needed after your latest changes?
apps/browser/src/vault/popup/components/vault/vault-v2.component.html
Outdated
Show resolved
Hide resolved
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.
LGTM! Thanks for iterating with me :)
* [PM-6825] Add temporary vault page header * [PM-6825] Expose cipherViews$ observable * [PM-6825] Refactor getAllDecryptedForUrl to expose filter functionality for reuse * [PM-6825] Introduce VaultPopupItemsService * [PM-6825] Introduce initial VaultListItem and VaultListItemsContainer components * [PM-6825] Add VaultListItems to VaultV2 component * [PM-6825] Introduce autofill-vault-list-items.component to encapsulate autofill logic * [PM-6825] Add temporary Vault icon * [PM-6825] Add empty and no results states to Vault tab * [PM-6825] Add unit tests for vault popup items service * [PM-6825] Negate noFilteredResults placeholder * [PM-6825] Cleanup new Vault components * [PM-6825] Move new components into its own module * [PM-6825] Fix missing button type * [PM-6825] Add booleanAttribute to showAutofill input * [PM-6825] Replace empty refresh BehaviorSubject with Subject * [PM-6825] Combine *ngIfs for vault list items container * [PM-6825] Use popup-section-header component * [PM-6825] Use small variant for icon buttons * [PM-6825] Use anchor tag for vault items * [PM-6825] Consolidate vault-list-items-container to include list item component functionality directly * [PM-6825] Add Tailwind classes to new Vault icon * [PM-6825] Remove temporary header comment * [PM-6825] Fix auto fill suggestion font size and padding * [PM-6825] Use tailwind for vault icon styling * [PM-6825] Add libs/angular to tailwind.config content * [PM-6825] Cleanup missing i18n * [PM-6825] Make VaultV2 standalone and cleanup Browser App module * [PM-6825] Use explicit type annotation * [PM-6825] Use property binding instead of interpolation
* [PM-6825] Add temporary vault page header * [PM-6825] Expose cipherViews$ observable * [PM-6825] Refactor getAllDecryptedForUrl to expose filter functionality for reuse * [PM-6825] Introduce VaultPopupItemsService * [PM-6825] Introduce initial VaultListItem and VaultListItemsContainer components * [PM-6825] Add VaultListItems to VaultV2 component * [PM-6825] Introduce autofill-vault-list-items.component to encapsulate autofill logic * [PM-6825] Add temporary Vault icon * [PM-6825] Add empty and no results states to Vault tab * [PM-6825] Add unit tests for vault popup items service * [PM-6825] Negate noFilteredResults placeholder * [PM-6825] Cleanup new Vault components * [PM-6825] Move new components into its own module * [PM-6825] Fix missing button type * [PM-6825] Add booleanAttribute to showAutofill input * [PM-6825] Replace empty refresh BehaviorSubject with Subject * [PM-6825] Combine *ngIfs for vault list items container * [PM-6825] Use popup-section-header component * [PM-6825] Use small variant for icon buttons * [PM-6825] Use anchor tag for vault items * [PM-6825] Consolidate vault-list-items-container to include list item component functionality directly * [PM-6825] Add Tailwind classes to new Vault icon * [PM-6825] Remove temporary header comment * [PM-6825] Fix auto fill suggestion font size and padding * [PM-6825] Use tailwind for vault icon styling * [PM-6825] Add libs/angular to tailwind.config content * [PM-6825] Cleanup missing i18n * [PM-6825] Make VaultV2 standalone and cleanup Browser App module * [PM-6825] Use explicit type annotation * [PM-6825] Use property binding instead of interpolation
… Switching Tabs (#9300) * [PM-8322] Firefox Inline Autofill Menu Not Propagation Correctly When Switching Tabs * [PM-8322] Firefox Inline Autofill Menu Not Propagation Correctly When Switching Tabs * Add missing RouterModule to the CurrentAccountComponent (#9295) Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> * [PM-6825] Browser Refresh - Initial List Items (#9199) * [PM-6825] Add temporary vault page header * [PM-6825] Expose cipherViews$ observable * [PM-6825] Refactor getAllDecryptedForUrl to expose filter functionality for reuse * [PM-6825] Introduce VaultPopupItemsService * [PM-6825] Introduce initial VaultListItem and VaultListItemsContainer components * [PM-6825] Add VaultListItems to VaultV2 component * [PM-6825] Introduce autofill-vault-list-items.component to encapsulate autofill logic * [PM-6825] Add temporary Vault icon * [PM-6825] Add empty and no results states to Vault tab * [PM-6825] Add unit tests for vault popup items service * [PM-6825] Negate noFilteredResults placeholder * [PM-6825] Cleanup new Vault components * [PM-6825] Move new components into its own module * [PM-6825] Fix missing button type * [PM-6825] Add booleanAttribute to showAutofill input * [PM-6825] Replace empty refresh BehaviorSubject with Subject * [PM-6825] Combine *ngIfs for vault list items container * [PM-6825] Use popup-section-header component * [PM-6825] Use small variant for icon buttons * [PM-6825] Use anchor tag for vault items * [PM-6825] Consolidate vault-list-items-container to include list item component functionality directly * [PM-6825] Add Tailwind classes to new Vault icon * [PM-6825] Remove temporary header comment * [PM-6825] Fix auto fill suggestion font size and padding * [PM-6825] Use tailwind for vault icon styling * [PM-6825] Add libs/angular to tailwind.config content * [PM-6825] Cleanup missing i18n * [PM-6825] Make VaultV2 standalone and cleanup Browser App module * [PM-6825] Use explicit type annotation * [PM-6825] Use property binding instead of interpolation * [PM-7076] Create settings-v2.component (#9213) * Create settings-v2.component Create new settings page Add routing based on extension refresh flag * Wrap anchors around the icons * Add account-switcher to settings page --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> * [PM-8289] Inline menu content script does not update when user updates setting (#9279) * [PM-8289] Inline menu content script does not update whne user updates setting * [PM-8289] Fixing issue present within Jest tests * [PM-8289] Triggering a reload of autofill scripts when a user logs into their account --------- Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Shane Melton <smelton@bitwarden.com>
Type of change
Objective
Introduce the new vault list item components and services to be used in the new combined vault view.
Code changes
New Components
VaultListItemContainer
VaultListItem
s with a section headerAutofillVaultListItems
VaultListItemContainer
for auto fill items. It also includes the necessary logic to hide/show the autofill tooltip message when no autofill items are available.New
VaultPopupItemsService
This service is responsible for determining which ciphers should be visible on the new vault page. It provides observables for each of the cipher list sections (autofill, favorites, all items) and applies the necessary logic to sort ciphers and ensure none repeat between the sections. Eventually, we should be able to apply filtering/searching logic to the base cipher list and then our new filter/search components will be able to influence what is shown via this service.
It also has a few helpers:
emptyVault$
- Used to help determine if the vault is empty and the empty screen should be shownautofillAllowed$
- Checks if the popup is not in a popout and a current tab is available for autofill.hasFilterApplied$
- Placeholder value for now. Is used to show the autofill tip when no filters are applied and no autofill suggestions are present.noFilteredResults$
- Placeholder value for now. Is used to show the No Search Results screen. Will need to be updated when filtering logic is added.Known Issues / Pending Work
popup-page > main > div
element doesn't fill the parent's height and so I can't get the no items icon to fill and center. cc: @willmartianThe Empty Vault icon colors are not available to be themed by Tailwind yet.Section headers are placeholders and will need to be updated to the component in [PM-7878] PopupSectionHeader component #9107Vault page header is a placeholder and will need to be removed/resolved with [PM-6823] Vault Header Refresh #9197Screenshots
No autofill suggestions with tip/helper
Autofill suggestions and favorites and all items
Hidden autofill suggestions when in Popout
Empty Vault
No Results
Before you submit