-
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
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.53% 33.53% -0.01%
==========================================
Files 2886 2891 +5
Lines 90157 90218 +61
Branches 17137 17138 +1
==========================================
+ Hits 30234 30251 +17
- Misses 57533 57578 +45
+ Partials 2390 2389 -1 ☔ View full report in Codecov by Sentry. |
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"
.
@@ -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.)
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.
@eliykat I've added the routing permissions and will merge this if its good to go. The org tier logic will come in a followup 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.
🎟️ 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 being 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