-
Notifications
You must be signed in to change notification settings - Fork 407
fix: Fix keyboard tabbing order in product image zoom view #21353
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: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -119,41 +119,39 @@ cx-product-image-zoom-view { | |
| @include media-breakpoint-up(lg) { | ||
| height: fit-content; | ||
| } | ||
| } | ||
|
|
||
| .cx-zoom-btn { | ||
| margin: 0.5rem; | ||
| border-radius: 100%; | ||
| background-color: var(--cx-color-medium); | ||
| position: absolute; | ||
| padding: 0; | ||
| right: 0; | ||
| bottom: 0; | ||
|
|
||
| @include media-breakpoint-down(sm) { | ||
| display: none; | ||
| } | ||
| .cx-zoom-btn-container { | ||
| text-align: center; | ||
| } | ||
|
|
||
| &:focus { | ||
| box-shadow: none; | ||
| } | ||
| .cx-zoom-btn { | ||
| margin: 0.5rem; | ||
| border-radius: 100%; | ||
| padding: 0; | ||
|
|
||
| .cx-zoom-indicator { | ||
| color: var(--cx-color-background-dark); | ||
| font-size: 2rem; | ||
| } | ||
| @include media-breakpoint-down(sm) { | ||
| display: none; | ||
| } | ||
|
|
||
| &:focus { | ||
| box-shadow: none; | ||
| } | ||
|
|
||
| .cx-zoom-indicator { | ||
| font-size: 2rem; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @include cx-highContrastTheme-light { | ||
| .cx-image-container .cx-zoom-btn .cx-zoom-indicator { | ||
| .cx-image-container .cx-zoom-btn-container .cx-zoom-btn .cx-zoom-indicator { | ||
| color: var(--cx-color-dark); | ||
| } | ||
| } | ||
|
|
||
| @include cx-highContrastTheme-dark { | ||
| .cx-image-container .cx-zoom-btn { | ||
| background-color: var(--cx-color-dark); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove the background color in this change? Could this be a breaking change for customer implementations using class cx-image-container for their own custom components?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both css changes are already encapsulated in the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But shouldn't the breaking change be accounted for the default context where customer upgrades but feature flag comes in as false, and they keep it as such. So we want to preserve existing styling.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it won't be affected if the customer does not enable the |
||
| .cx-image-container .cx-zoom-btn-container .cx-zoom-btn .cx-zoom-indicator { | ||
| color: var(--cx-color-light); | ||
| --cx-color-visual-focus: #1f3a93; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
by moving location of
#zoomButtonoutside of thecx-image-container, this include chain and the below one are no longer aligned with the templateUh oh!
There was an error while loading. Please reload this page.
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 think they are chained because of the spaces between the classes. Or are you suggesting some clean up?
Uh oh!
There was an error while loading. Please reload this page.
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.
The way scss interprets line 148 is equivalent to "find a .cx-zoom-indicator that lives inside .cx-zoom-btn inside .cx-zoom-btn-container inside .cx-image-container, and apply these styles to it."
You can even test it, change the
colorfirst (you should not see it changed for that theme when you select it in FE) Then removecx-image-containeryou should now see the zoom icon change color when the theme is selectedThere 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.
Ah, I think you might be referring to the styling changes of the zoom button. Sorry, yes this was an intentional change. No styling for this feature was provided by any official ux at the time so something was improvised. As the change was new (within the last year) and still behind the feature flag. I have changed it to be more consistent and easier to maintain.
In regards to breaking changes, we do not mind as its already behind a flag.