This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opr
added
status: needs review
type: bug
The issue/PR concerns a confirmed bug.
focus: blocks
Specific work involving or impacting how blocks behave.
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
focus: global styles
Issues that involve styles/css/layout structure.
labels
Jun 30, 2021
Size Change: +412 B (0%) Total Size: 1 MB
ℹ️ View Unchanged
|
This is to allow TotalsWrapper to be the component responsible for handling spacing and borders.
This will be used to check if a Slot has any fills that return truthy values.
senadir
approved these changes
Jul 2, 2021
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.
I tested with and without Subscriptions. everything looks fine!
This was referenced Jul 7, 2021
3 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
focus: blocks
Specific work involving or impacting how blocks behave.
focus: global styles
Issues that involve styles/css/layout structure.
type: bug
The issue/PR concerns a confirmed bug.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a component called
TotalsWrapper
whose purpose is to wrap components in the Cart and Checkout sidebar so that components that have borders (the grey lines between items in the screenshot section) don't have to be concerned with what follows them.For example, if the store has coupons disabled, then you could end up with a component with a bottom border, and one with a top border together resulting in a "double border".
By wrapping these components in a
TotalsWrapper
then the borders can be consistently managed from one place.The PR will also slightly change the way Slot/Fills are rendered. The
Slot
will be rendered inside aTotalsWrapper
but eachFill
will also have a border and padding applied to it (by CSS), to visually separate them.Here is an overview of the changes made in this PR:
TotalsWrapper
component. This has the optional propslotWrapper
to allow CSS to render borders onFill
s.hasValidFills
function inslot/index.js
- This is to check that at least one of theFill
s about to be rendered is truthy (i.e. not null/undefined) or it won't render theSlot
.OrderSummary
,ShippingRatesControlPackage
,TotalsCoupon
,Cart
, andCheckoutSidebar
to remove borders and padding becauseTotalsWrapper
is now handling it.Slot
s in<TotalsWrapper>
Panel
component to only have margins/padding when the panel is open.Fixes #4267
Screenshots
How to test the changes in this Pull Request:
feature/add-inputs-for-points-redemption
on WC Points and Rewardsnpm run build
in your WC Points and Rewards directory.Changelog