-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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-12273] Admin Console Integration Page #11883
base: main
Are you sure you want to change the base?
Conversation
New Issues
Fixed Issues
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11883 +/- ##
==========================================
+ Coverage 33.41% 33.46% +0.05%
==========================================
Files 2871 2879 +8
Lines 89827 89903 +76
Branches 17105 17107 +2
==========================================
+ Hits 30012 30086 +74
+ Misses 57453 57442 -11
- Partials 2362 2375 +13 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
Great work!
I'm surprised we don't have any Storybook stories for the integration grid and card. Can you please add these? There are lots of examples (files ending in .stories.ts
), or check out the Storybook documentation. That way it will show up at https://components.bitwarden.com (or npm run storybook
locally).
Also, some of the logos look quite dark in dark mode (from your video). Can you please discuss with design and see if we can fix that somehow?
apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.component.ts
Outdated
Show resolved
Hide resolved
apps/web/src/app/shared/components/integrations/integrations.module.ts
Outdated
Show resolved
Hide resolved
apps/web/src/app/shared/components/integrations/integrations.module.ts
Outdated
Show resolved
Hide resolved
apps/web/src/app/shared/components/integrations/integration-card/integration-card.component.ts
Outdated
Show resolved
Hide resolved
apps/web/src/app/admin-console/organizations/organization-routing.module.ts
Outdated
Show resolved
Hide resolved
bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.spec.ts
Outdated
Show resolved
Hide resolved
.../web/src/app/shared/components/integrations/integration-grid/integration-grid.component.html
Outdated
Show resolved
Hide resolved
...b/src/app/shared/components/integrations/integration-card/integration-card.component.spec.ts
Outdated
Show resolved
Hide resolved
apps/web/src/app/shared/index.ts
Outdated
@@ -1,2 +1,3 @@ | |||
export * from "./shared.module"; | |||
export * from "./loose-components.module"; | |||
export * from "./components/integrations/integrations.module"; |
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.
Ideally you should have barrel files at each level, e.g. this would export * from "./components"
, then components would export * from "./integrations"
.
apps/web/src/app/shared/components/integrations/integration-card/integration-card.stories.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Thomas Rittson <[email protected]>
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.
Great work, I appreciate you taking the time to tighten up the implementation and write stories.
There is one last thing to do: review (and approve) the changes in Chromatic. See the process here: https://contributing.bitwarden.com/contributing/pull-requests/chromatic but let me know if you have any questions. It's important that you do this before you merge, otherwise main
will have unapproved Chromatic changes and it'll leak into everyone's development branches. (You can still approve it from main
, it's just more disruptive to other devs.)
Once Chromatic changes are approved, the Chromatic PR checks should have a green tick next to them.
I see that there is some visual change (in Chromatic) to the Kitchen Sink story, but it seems minor and I can't see that you've done anything to cause it. But to be safe, I recommend asking #team-eng-design-system
about that one. (EDIT: or something for @bitwarden/team-design-system to check when they review)
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.
DS changes looks good 👍
Had a few non-blocking thoughts on other files:
apps/web/src/app/admin-console/organizations/integrations/integrations.component.html
Show resolved
Hide resolved
</bit-tab> | ||
|
||
<bit-tab [label]="'userProvisioning' | i18n"> | ||
<section class="tw-mb-9"> |
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.
There is also a bit-section
component in the DS if you want consistent spacing with other sections in the app. Not sure if this needs to be different or not. cc @bitwarden/dept-design
apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts
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.
Thanks for writing a story 👏
…lients into ac/pm-12273-integration-page
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.
DS changes look good 👍
Images are minified, no concerns from my side. |
@@ -108,6 +108,16 @@ export class OrganizationLayoutComponent implements OnInit { | |||
provider.providerStatus !== ProviderStatusType.Billable, | |||
), | |||
); | |||
|
|||
this.integrationPageEnabled$ = this.organization$.pipe( | |||
withLatestFrom( |
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 think combineLatest
is a better fit here. It will emit all new values when any source observable emits, which is better for independent observables (e.g. an org and a feature flag state - you need both but they emit independently).
With your current use of withLatestFrom
, if the feature flag updates during execution, it won't emit a new value until and unless the organization$
observable emits a new value (which it might never do, so you never get an updated emission).
), | ||
map( | ||
([org, featrueFlagEnabled]) => | ||
org.productTierType === ProductTierType.Enterprise && featrueFlagEnabled, |
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.
Is this right? Some integrations listed are available for Free and Teams orgs (e.g. Directory Connector is available for Teams, SM integrations are available for all plan types to my knowledge). We might need more granular logic for each section within the integration page. Can you check with Priya?
If that does need further work, you might consider merging your initial work (given that it's behind a feature flag) and then making these further changes in a separate PR.
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.
Navigation permissions should also be enforced at the routing level, see organizationPermissionsGuard
. (There are lots of example uses.)
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-12273
📔 Objective
This PR adds a new Integrations page in Admin console and refactors the Integration Card and Integration Grid components from living in Secrets Manager to living the in Shared Components.
📸 Screenshots
Screen.Recording.2024-11-13.at.8.37.48.PM.mov
⏰ Reminders before review
🦮 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