-
Notifications
You must be signed in to change notification settings - Fork 69
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
Reporting: Add a parent wrapper component for Payment Activity #8412
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +144 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
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, @nagpai, for kicking it off 🎉 , nice one, though for merging let's wait while we align on the execution strategy.
Marking the PR as |
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 making the changes, a few suggestion about using the camelCase rather than using the snake case with linter exception rule.
client/overview/index.js
Outdated
) } | ||
{ | ||
// eslint-disable-next-line camelcase | ||
has_active_loan && ( |
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.
has_active_loan && ( | |
hasActiveLoan && ( |
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.
Done!
<Card className="wcpay-payments-activity__card"> | ||
<CardHeader | ||
className="wcpay-payments-activity__card__header" | ||
isBorderless={ true } | ||
> |
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 may be an opportunity to reduce the amount of custom css applied here.
I attempted the following and see no major difference with the rendered component (yet, I know there may be more to come, but we can let that be implemented as-needed).
<Card className="wcpay-payments-activity__card"> | |
<CardHeader | |
className="wcpay-payments-activity__card__header" | |
isBorderless={ true } | |
> | |
<Card> | |
<CardHeader> |
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, @Jinksi. I have added these classes since:
-
I found that the Card by default does not have any padding and the inner individual constituents have their own padding. I thought it is better to add the padding to the whole wrapper as per our design, for uniformity. This will also help have same padding for upcoming components.
-
The CSS on header card removes its own padding and there is an
isBorderless
prop set totrue
to remove bottom border on the header.
I hope this makes sense.
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.
Agree with @Jinksi here – not so much "let's avoid css classes", more that we should avoid overriding / customising styles.
If the components aren't doing what we want (i.e. differ from design in subtle or major ways), we should:
- adapt the design to match the components - i.e. we can implement the intended design but it looks a little different (though likely more consistent with rest of app)
- or
- adapt the components so they have the flexibility we need - i.e. this design proposes changes or additions to components, and we need to implement in component
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 sharing some very helpful guidance. I removed the custom css, and found the only difference it made was adding some extra 8 px padding. I also now see that has been removed in the new simplified design update, making it consistent with the headings of other widgets.
The latest design also has a bottom border ( default view ) for the card header.
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 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 🎉, thanks for laying down the foundational PR work.
I am reopening the branch to address the feedback here |
…ses added in #8412 (#8507) Co-authored-by: Nagesh Pai <[email protected]>
Fixes #8389
Changes proposed in this Pull Request
Payment Activity
widget, that will be visible on thePayment Overview
page ( Payments > Overview )Payment Activity
widget behind a feature flag -_wcpay_feature_payment_overview_widget
. It will appear only when this flag is set to true. ( meant to hide the widget during development phase )Additional context
Add Payment Activity's empty state and filters [WIP] #8234
Testing instructions
Payments > Overview
wp option update _wcpay_feature_payment_overview_widget 1
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge