Skip to content

mgr/dashboard: introduce details card component - #64631

Merged
afreen23 merged 2 commits into
ceph:mainfrom
rhcs-dashboard:details-card-component
Jul 31, 2025
Merged

afreen23 merged 2 commits into
ceph:mainfrom
rhcs-dashboard:details-card-component

Conversation

@nizamial09

@nizamial09 nizamial09 commented Jul 23, 2025 •

Copy link
Copy Markdown
Member

as per https://pages.github.ibm.com/ibmcloud/pal/storybook/?path=/story/components-card--details-with-stacked-rows

added a details component which can be used as

<cd-details-card title="card title">
  <ng-container class="details-body-content">
   <div cdsCol [columnNumbers]="{lg: 4}">
     <span class="cds--label">
       label
     </span>
     <span>value</span>
   </div
  </ng-container>
</cd-details-card>
image

Fixes: https://tracker.ceph.com/issues/72246

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@nizamial09
nizamial09 force-pushed the details-card-component branch from 0578e19 to f69f2dc Compare July 23, 2025 06:38
@nizamial09
nizamial09 force-pushed the details-card-component branch from f69f2dc to 95f279d Compare July 23, 2025 06:40

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

couldn't find a proper carbon token for this...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

without shadow, this is how the card looks in a white background. and btw, they are referring about drop-shadow which is different from box-shadow
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You are right, drop-shadow and box-shadow are not exactly the same but I was looking more into the guidelines statement:

Tiles reside on the same plane as the page background layer and do not have elevation

I believe box-shadow adds that elevation which is againts the carbondesignsystem guidelines.

However you raised a real issue on having the same tile and backgroud color, which led me to look into themes and color, and from my findings I'm not sure if we are properly following the themeing guidelines.

Whenever using a light theme https://carbondesignsystem.com/elements/color/overview/#light-themes

In the light themes, layers alternate between White and Gray 10.

So in the landing page we have gray.10 as background color and white for the tiles, but other places in thashboard we use white background and gray tables
image

image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I agree. The colors we use are not the carbon guided ways. As we adopt carbon more, we should probably follow the guideline on applying colors everywhere. For now the cds-tile worked the trick for me and I don't need to hard-code colors or add shadows to it as the tile color fits both backgrounds. Hence removed the shadows and the customization around it. Thanks again.

@nizamial09
nizamial09 force-pushed the details-card-component branch from 95f279d to cd6a73a Compare July 23, 2025 10:52
@nizamial09
nizamial09 requested review from Pegonzal and nmunet July 23, 2025 11:36
@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Jul 23, 2025
@nizamial09

Copy link
Copy Markdown
Member Author

jenkins retest this please

@Pegonzal Pegonzal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a couple comments with some thoughts I'm wondering, but LGTM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we not using cds-tile to achive this?

@nizamial09 nizamial09 Jul 29, 2025 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

thanks a lot @Pegonzal. Using the tile now. updated the screenshot

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You are right, drop-shadow and box-shadow are not exactly the same but I was looking more into the guidelines statement:

Tiles reside on the same plane as the page background layer and do not have elevation

I believe box-shadow adds that elevation which is againts the carbondesignsystem guidelines.

However you raised a real issue on having the same tile and backgroud color, which led me to look into themes and color, and from my findings I'm not sure if we are properly following the themeing guidelines.

Whenever using a light theme https://carbondesignsystem.com/elements/color/overview/#light-themes

In the light themes, layers alternate between White and Gray 10.

So in the landing page we have gray.10 as background color and white for the tiles, but other places in thashboard we use white background and gray tables
image

image

as per https://pages.github.ibm.com/ibmcloud/pal/storybook/?path=/story/components-card--details-with-stacked-rows

added a details component which can be used as

```
<cd-details-card title="card title">
  <ng-container class="details-body-content">
   <div cdsCol [columnNumbers]="{lg: 4}">
     <span class="cds--label">
       label
     </span>
     <span>value</span>
   </div
  </ng-container>
</cd-details-card>
```

Fixes: https://tracker.ceph.com/issues/72246
Signed-off-by: Nizamudeen A <[email protected]>
@nizamial09
nizamial09 force-pushed the details-card-component branch from cd6a73a to 7cf2b5f Compare July 29, 2025 04:56
@nmunet

nmunet commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

jenkins test dashboard

@afreen23

Copy link
Copy Markdown
Contributor

jenkins test dashboard cephadm

@afreen23

Copy link
Copy Markdown
Contributor

jenkins test dashboard

@nmunet

nmunet commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

No Dashboard test failure because of changes in this PR:

[should switch to the second cluster and back to hub.Muti-cluster management page should switch to the second cluster and back to hub](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/should%20switch%20to%20the%20second%20cluster%20and%20back%20to%20hub/Muti_cluster_management_page_should_switch_to_the_second_cluster_and_back_to_hub/)
[should reconnect the second cluster.Muti-cluster management page should reconnect the second cluster](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/should%20reconnect%20the%20second%20cluster/Muti_cluster_management_page_should_reconnect_the_second_cluster/)
[should edit the second cluster.Muti-cluster management page should edit the second cluster](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/should%20edit%20the%20second%20cluster/Muti_cluster_management_page_should_edit_the_second_cluster/)
[should disconnect the second cluster.Muti-cluster management page should disconnect the second cluster](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/should%20disconnect%20the%20second%20cluster/Muti_cluster_management_page_should_disconnect_the_second_cluster/)
[should show user key details.RGW users page create, edit & delete user tests should show user key details](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/should%20show%20user%20key%20details/RGW_users_page_create__edit___delete_user_tests_should_show_user_key_details/)
[Create a CephFS Subvolume Snapshot Clone.CephFS Snapshot Management Create a CephFS Subvolume Snapshot Clone](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/Create%20a%20CephFS%20Subvolume%20Snapshot%20Clone/CephFS_Snapshot_Management_Create_a_CephFS_Subvolume_Snapshot_Clone/)
[should generate and import the bootstrap token between clusters.Mirroring page rbd mirroring bootstrap should generate and import the bootstrap token between clusters](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/should%20generate%20and%20import%20the%20bootstrap%20token%20between%20clusters/Mirroring_page_rbd_mirroring_bootstrap_should_generate_and_import_the_bootstrap_token_between_clusters/)
["before all" hook for "should open notification sidebar".Notification page "before all" hook for "should open notification sidebar"](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/%22before%20all%22%20hook%20for%20%22should%20open%20notification%20sidebar%22/Notification_page__before_all__hook_for__should_open_notification_sidebar_/)
["after all" hook for "should open notification sidebar".Notification page "after all" hook for "should open notification sidebar"](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/%22after%20all%22%20hook%20for%20%22should%20open%20notification%20sidebar%22/Notification_page__after_all__hook_for__should_open_notification_sidebar_/)
["before all" hook for "should show table on sync-policy page".Multisite page table tests "before all" hook for "should show table on sync-policy page"](https://jenkins.ceph.com/job/ceph-dashboard-pull-requests/19799/testReport/junit/(root)/%22before%20all%22%20hook%20for%20%22should%20show%20table%20on%20sync-policy%20page%22/Multisite_page_table_tests__before_all__hook_for__should_show_table_on_sync_policy_page_/)

@afreen23
afreen23 merged commit 66c704b into ceph:main Jul 31, 2025
@afreen23
afreen23 deleted the details-card-component branch July 31, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants