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

Add features quantity in workspace list page #309

Merged
merged 7 commits into from
Apr 2, 2024

Conversation

raintygao
Copy link
Collaborator

Description

Add features quantity in workspace list page

Issues Resolved

Screenshot

Testing the changes

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: tygao <tygao@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.94%. Comparing base (431fcdb) to head (4b63b85).
Report is 6 commits behind head on workspace-pr-integr.

Additional details and impacted files
@@                   Coverage Diff                   @@
##           workspace-pr-integr     #309      +/-   ##
=======================================================
- Coverage                67.04%   66.94%   -0.10%     
=======================================================
  Files                     3344     2603     -741     
  Lines                    65011    49237   -15774     
  Branches                 10496     8895    -1601     
=======================================================
- Hits                     43588    32964   -10624     
+ Misses                   18845    14105    -4740     
+ Partials                  2578     2168     -410     
Flag Coverage Δ
Linux_ ?
_1 ?
_2 55.35% <ø> (-0.04%) ⬇️
_3 43.48% <ø> (+0.02%) ⬆️
_4 35.16% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: tygao <tygao@amazon.com>
@raintygao raintygao marked this pull request as ready for review March 27, 2024 03:42
featuresConfig: string[],
applications: PublicAppInfo[]
) => {
const visibleApplications = applications.filter(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to keep the filter logic consistent above these two cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I refer to this logic, but i thought we may not need to filter management here because feature config returned contain management category

src/plugins/workspace/public/utils.ts Show resolved Hide resolved
export function useApplications(application: ApplicationStart) {
const applications = useObservable(application.applications$);
export function useApplications(application?: ApplicationStart) {
const applications = useObservable(application?.applications$ ?? of(new Map()), new Map());
return useMemo(() => {
const apps: PublicAppInfo[] = [];
applications?.forEach((app) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
applications?.forEach((app) => {
applications.forEach((app) => {

src/plugins/workspace/public/hooks.ts Outdated Show resolved Hide resolved
Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: tygao <tygao@amazon.com>
@raintygao raintygao merged commit 55d9b82 into ruanyl:workspace-pr-integr Apr 2, 2024
40 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants