-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Analytics: Fix custom date range calendar styling in WP 6.1 #35649
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
Conversation
Test Results SummaryCommit SHA: f339531
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
louwie17
left a comment
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.
Just left a suggested change to import it from the installed package instead.
| @@ -1,3 +1,5 @@ | |||
| @import "./react-dates.scss"; | |||
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.
how come you copy/pasted the entire css file of react-dates.scss in our repo, we should be able to import it from the installed package.
I tried it locally, it does look like our css-loader is a bit broken, so you did have to import it like this:
@import '../node_modules/react-dates/lib/css/_datepicker.css';
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.
Honestly, I copied the approach @wordpress/components had used. It never dawned on me to just import from the installed package. I will look into that. Though, I do wonder if there are any differences... perhaps even "just" the RTL handling.
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.
Addressed this in 930cb5c
|
Ready for a re-review! |
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 the fix @mattsherman . Tested in Firefox/Chrome and compared to trunk; BIG improvement! Interesting work-around with the imports as well. 🚢 ![]()
Edit: I also took the liberty of reruning the e2e tests which had failed. Looked like an unrelated timeout.
Address issue and Joel re-reviewed
930cb5c to
f339531
Compare
|
Hey @joelclimbsthings, I just rebased and pushed this PR. Could you take another look at this PR? |
octaedro
left a comment
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.
LGTM! 🚀
* Include react-dates styles (no longer included by WP 6.1+) * Remove padding from filters popover content * Changelog * Include react-dates CSS directly from module instead of copy/pasting.
Analytics: Fix custom date range calendar styling in WP 6.1 (#35649) * Include react-dates styles (no longer included by WP 6.1+) * Remove padding from filters popover content * Include react-dates CSS directly from module instead of copy/pasting. Co-authored-by: Matt Sherman <[email protected]>
|
@mattsherman Wondering if this temporary fix needs to be removed since we've imported react dates, on wccom repo: https://github.com/Automattic/woocommerce.com/pull/15003/ |
All Submissions:
Changes proposed in this Pull Request:
This PR includes the
react-datesCSS that was previously included via WordPress. It is no longer included by WordPress 6.1+.This CSS is required to properly style the calendar in the Analytics custom date range dropdown.
Closes #35645.
How to test the changes in this Pull Request:
Other information:
pnpm --filter=<project> changelog add?FOR PR REVIEWER ONLY: