manager icon indicating copy to clipboard operation
manager copied to clipboard

change: [M3-8442] - Remove Double border on "Billing & Payment History" table with dark theme.

Open hasyed-akamai opened this issue 1 year ago • 2 comments

Description 📝

Border for "Billing & Payment History" table was not properly styled for Cloud Manager's dark theme, resulting in double border for the table.

Changes 🔄

  • based on the theme we have changed the border size.

Target release date 🗓️

Preview 📷

Before After
Before After

How to test 🧪

Prerequisites

  • Log into accounts which is having any "Billing & Payment History" table entry:

Reproduction steps

  • Landing:
    • Observe the border of "Billing & Payment History" table is reduced.

Verification steps

  • After changes, observe "Billing & Payment History" table border gets half.

As an Author I have considered 🤔

Check all that apply

  • [x] 👀 Doing a self review
  • [x] ❔ Our contribution guidelines
  • [x] 🤏 Splitting feature into small PRs
  • [x] ➕ Adding a changeset
  • [ ] 🧪 Providing/Improving test coverage
  • [ ] 🔐 Removing all sensitive information from the code and PR description
  • [ ] 🚩 Using a feature flag to protect the release
  • [x] 👣 Providing comprehensive reproduction steps
  • [ ] 📑 Providing or updating our documentation
  • [ ] 🕛 Scheduling a pair reviewing session
  • [ ] 📱 Providing mobile support
  • [ ] ♿ Providing accessibility support

hasyed-akamai avatar Oct 16 '24 12:10 hasyed-akamai

Since we're wrapping this entire section in a paper which has a border, we should be able to pass sx={{ border: 0 }} to this Table on L441. https://github.com/linode/manager/blob/develop/packages/manager/src/features/Billing/BillingPanels/BillingActivityPanel/BillingActivityPanel.tsx#L441

The other issue on on L479 where that style is no longer relevant and can be removed. https://github.com/linode/manager/blob/develop/packages/manager/src/features/Billing/BillingPanels/BillingActivityPanel/BillingActivityPanel.tsx#L479

Let me know if that fixes all the issues

jaalah-akamai avatar Oct 17 '24 13:10 jaalah-akamai

Since we're wrapping this entire section in a paper which has a border, we should be able to pass sx={{ border: 0 }} to this Table on L441. https://github.com/linode/manager/blob/develop/packages/manager/src/features/Billing/BillingPanels/BillingActivityPanel/BillingActivityPanel.tsx#L441

The other issue on on L479 where that style is no longer relevant and can be removed. https://github.com/linode/manager/blob/develop/packages/manager/src/features/Billing/BillingPanels/BillingActivityPanel/BillingActivityPanel.tsx#L479

Let me know if that fixes all the issues

Screenshot 2024-10-21 at 8 16 02 PM I've implemented the changes as mentioned. however, I've encountered a new issue with an unexpected extra borderBottom that appears only in the dark theme.

06_08_13 I also attempted to add a style={{ border: 0 }} attribute to L524 to remove the extra borderBottom. However, this approach did not work effectively for multiple rows.

I feel like my current approach of adding borders based on the theme is functioning adequately, although it may not be the most appropriate long-term solution. I feel that customization for this component may be necessary. However, I am open to exploring other options and would appreciate any suggestions you might have.

hasyed-akamai avatar Oct 17 '24 17:10 hasyed-akamai

I think you're on the right approach. The way I would think about this is: We're generating rows via a map. So we're able to determine the last table row. So one way would be to allow an sx prop to be applied to the row from which we can target all the cells that have a border bottom.

return orderedPaginatedData.map((thisItem, idx) => {
        const lastItem = idx === orderedPaginatedData.length - 1;
        return (
          <ActivityFeedItem
            sxRow={
              lastItem
                ? {
                    '& .MuiTableCell-root': {
                      borderBottom: 0,
                    },
                  }
                : {}
            }
            ... other props
          />
        );
      });
<TableRow data-testid={`${type}-${id}`} sx={sxRow}>

Hope that helps... otherwise submit some commits so I can give feedback

jaalah-akamai avatar Oct 22 '24 15:10 jaalah-akamai

Screenshot 2024-10-23 at 12 59 28 PM

I've followed the steps you mentioned, and everything is working perfectly now! Thank you so much for your help!

hasyed-akamai avatar Oct 23 '24 07:10 hasyed-akamai

Coverage Report:
Base Coverage: 87.01%
Current Coverage: 87.01%

github-actions[bot] avatar Oct 23 '24 07:10 github-actions[bot]

Cloud Manager E2E    Run #6739

Run Properties:  status check passed Passed #6739  •  git commit 6c6f700858: change: [M3-8442] - Remove Double border on "Billing & Payment History" table wi...
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #6739
Run duration 31m 43s
Commit git commit 6c6f700858: change: [M3-8442] - Remove Double border on "Billing & Payment History" table wi...
Committer hasyed-akamai
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 6
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 445
View all changes introduced in this branch ↗︎

cypress[bot] avatar Oct 28 '24 07:10 cypress[bot]