Skip to content
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

[AC-2791] Members page - finish component library refactors #9727

Merged

Conversation

eliykat
Copy link
Member

@eliykat eliykat commented Jun 19, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/AC-2791

📔 Objective

Follow-up refactors to make full use of the Component Library after #9515.

The main change is to make TableDataSource responsible for filtering, tracking, and updating its data. The motivation here is better encapsulation and to minimize logic that needs to be in the base class. This new functionality is contained in the PeopleTableDataSource subclass.

  • move the status filtering logic into the TableDataSource's filtering function
  • move the user status count out of statusMap and into TableDataSource
  • move a couple of utility methods (removing and updating users)
  • move select/deselect logic

Other minor changes:

  • delete unneeded @ViewChild properties and corresponding templating
  • use ToastService for all toasts
  • move revoke and restore methods from the base class into the subclass, as these are not actually shared between components (providerUsers cannot be revoked)

The next step is to update the provider users component to also use this base class and table data source.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@github-actions github-actions bot added the needs-qa Marks a PR as requiring QA approval label Jun 19, 2024
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 100 lines in your changes missing coverage. Please review.

Project coverage is 29.53%. Comparing base (e12e817) to head (00234c6).

Files Patch % Lines
...p/admin-console/common/people-table-data-source.ts 0.00% 40 Missing ⚠️
...console/organizations/members/members.component.ts 0.00% 39 Missing ⚠️
.../admin-console/common/new-base.people.component.ts 0.00% 19 Missing ⚠️
...le/organizations/members/members-routing.module.ts 0.00% 1 Missing ⚠️
...in-console/organizations/members/members.module.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9727   +/-   ##
=======================================
  Coverage   29.53%   29.53%           
=======================================
  Files        2537     2538    +1     
  Lines       74167    74159    -8     
  Branches    13862    13855    -7     
=======================================
  Hits        21905    21905           
+ Misses      50602    50594    -8     
  Partials     1660     1660           

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

Copy link
Contributor

github-actions bot commented Jun 19, 2024

Logo
Checkmarx One – Scan Summary & Details7ba33f76-1713-486c-b243-d03c36199be2

No New Or Fixed Issues Found

@eliykat eliykat force-pushed the ac/ac-2791/members-page---finish-component-library-refactors branch from 2dc1b55 to 802bc29 Compare June 20, 2024 22:57
@eliykat eliykat marked this pull request as ready for review June 21, 2024 00:09
@eliykat eliykat requested a review from a team as a code owner June 21, 2024 00:09
Copy link
Member

@vincentsalucci vincentsalucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is super great! Thanks for making those preliminary talks into a reality. Just a couple of thoughts to discuss/move-on from. Excited to let QA vet these changes.

@github-actions github-actions bot temporarily deployed to Web Vault - US QA Cloud June 27, 2024 19:08 Inactive
@github-actions github-actions bot temporarily deployed to Web Vault - US QA Cloud June 28, 2024 14:17 Inactive
@eliykat eliykat added web and removed needs-qa Marks a PR as requiring QA approval labels Jun 30, 2024
@eliykat eliykat merged commit 8f66d60 into main Jun 30, 2024
36 of 37 checks passed
@eliykat eliykat deleted the ac/ac-2791/members-page---finish-component-library-refactors branch June 30, 2024 20:50
cagonzalezcs pushed a commit that referenced this pull request Jul 1, 2024
* Replace PlatformUtilsService with ToastService

* Remove unneeded templates

* Implement table filtering function

* Move member-only methods from base class to subclass

* Move utility functions inside new MemberTableDataSource

* Rename PeopleComponent to MembersComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants