-
Notifications
You must be signed in to change notification settings - Fork 1
HS-1390414-CSS-updates #1227
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
base: master
Are you sure you want to change the base?
HS-1390414-CSS-updates #1227
Conversation
8a2147c to
6b86781
Compare
6b86781 to
6faf93e
Compare
cd4a31d to
f4585d3
Compare
| text-align: center; | ||
|
|
||
| .loading-bar { | ||
| .give-loading-bar { |
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.
This is much less likely to conflict, however, a give prefix on a give page is still pretty generic. .bc, .cbc or .branded-checkout is much better and less likely to conflict.
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 think, however:
branded-checkout loading1 {
is fine, with the assumption that other components are properly scoping their css as well.
Except for the animation name since it can't be scoped.
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.
So I didn't use bc or cbc because this stylesheet is being used by both branded checkout and standard checkout. Also the reason why it isn't scoped. I thought about creating a separate stylesheet for this but that would mean creating an entirely separate component, unlike the other stylesheets this one is imported directly into the component. Not sure what the best workaround is.
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 don't know the specifics of the project(s), but for branded checkout would not including the loader css directly but adding it as @include rule similar to @import '../cru-scss/cru'; work? Seems like a simple solution that will scope the css just like the rest of it.
That would leave only the animation name out of scope and I think give-fade is unique enough to not likely collide.
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.
That could work, might be a good solution. Worried there's a reason certain components import the stylesheet directly rather then just import them. I'll try doing that and do some testing.
|
@clonge I'm having trouble getting rid of the layout shift. It seems like the primary culprit is the two loading components. The second one can't be easily changed as standard checkout uses it as well. Do you have any suggestions on an easy remedy? |
|
@wjames111 Not without research / knowing the project. Normally, you would hide / cover the interface until it's fully loaded and then reveal it all at once instead of letting it incrementally load in. This does come with potential issues of course. It can feel longer to the user, but better for performance. If js produces errors it could leave the loader on the screen even though the error may not be a critical failure. This would cover the entire branded-checkout, limit it to 300px without scrolling and cover it with the loader until the loader disappears. This is probably the quickest / easiest solution. And I will need to adjust my loading element on the WP side to be centered in the box to match. |
|
@wjames111 There's also a bigger issue in that the loading component moves to a new place in the dom? Just odd behavior and has additional css that's applied after it moves? It seems like the application itself has a double load or something, which can't be good for performance. Never mind, I see the component is being used several times. The last one is on top, which has a slightly different structure than the first. So, to get stuff from jumping around visually at least this is the css that's needed: This is not the best solution, but the best css only option. |
|
cc @dr-bizz on discussion above ^ |
|
@clonge thanks that's super helpful, I'll give that a try and play around a little more. |
|
Stakeholders are in the middle of http://give-stage2.cru.org/ give site staging UAT and there were some issues giving EFT and CC yesterday. |
Description
This PR is for HelpScout ticket 1390414
It's intended purpose is to make branded-checkout more friendly for WordPress environments by doing the following:
displayproperty toblockonbranded-checkoutelementng-ifedits were done toproduct-config-formwhich appear to be used by both branded and give)Issues: