Skip to content
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

feat(a11y): Redesign searchbox to include label #19222

Merged
merged 4 commits into from
Nov 4, 2024
Merged

Conversation

sdrozdsap
Copy link
Contributor

@sdrozdsap sdrozdsap requested a review from a team as a code owner September 10, 2024 06:57
@github-actions github-actions bot marked this pull request as draft September 10, 2024 06:57
@sdrozdsap sdrozdsap marked this pull request as ready for review September 10, 2024 06:58
Copy link

cypress bot commented Sep 10, 2024

spartacus    Run #45607

Run Properties:  status check passed Passed #45607  •  git commit 0085653a87 ℹ️: Merge a614a02264200abea1f0bc043be95f18571799e0 into 49572f52c34522a0429efbf29aa6...
Project spartacus
Branch Review feature/CXSPA-7990
Run status status check passed Passed #45607
Run duration 13m 17s
Commit git commit 0085653a87 ℹ️: Merge a614a02264200abea1f0bc043be95f18571799e0 into 49572f52c34522a0429efbf29aa6...
Committer sdrozdsap
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 4
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 125
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

@github-actions github-actions bot marked this pull request as draft September 12, 2024 07:52
@sdrozdsap sdrozdsap marked this pull request as ready for review September 12, 2024 07:52
@sdrozdsap sdrozdsap requested a review from Zeyber September 15, 2024 07:42
// as this will no longer emit a focus event to the controller logic
width: 0;
padding: 0;
// cxFeat_a11ySearchboxLabel class is only applied if a11ySearchboxLabel flag is true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about this one. Arguments against this approach could be:

  • cxFeat_a11ySearchboxLabel is being publicly exposed. Users may decide to override this when enabling the feature flag as they will not read these comments.
  • This approach is unusual and a bit difficult to consider all possibilities. It will also be a bit difficult for anyone who needs to clean it up as its a non-standard approach. Could you please elaborate more on the issues it resolves?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you: the points that you mention are solid arguments against this, but at the moment I didn't have any other thought in my mind. The main reason why I dived in this workaround, is because this component applies styles to the <body> element, which is impossible to do with the forFeature mixin. Other reason, is that there are big styling changes, and following the standard procedure with the forFeature mixin didn't seem doable. Its assumed that with this mixin we would be always able to override the styles if feature flag is enabled, but in this case it would be very nice to have ability to apply styles for when this flag is NOT enabled. Otherwise I need a way to "reset" a lot of styles, that would be applied if the feature flag is disabled(you can take a look at projects/storefrontstyles/scss/components/product/search/_searchbox.scss starting line 141 - there are all styles which I don't need). One more point worth mentioning is that nested forFeature don't work, but I would end up having them if I would go with this approach.

Considering your points and my thought above, I came up with an idea, but probably it's not a good one: we can create a new component, copying all the functionality from the old one, but having all new styles and a11y adjustments. Then we can decide depending on whether the feature flag is enabled or not, which component to use.
Please let me know what you think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for clarifying the reasons you took this approach. I think that my concerns around clean up and confusion are not weighted enough to justify rethinking another approach considering the complexity of working something out and the scenario of any major issues coming out of it are very low IMHO. Thank you for making these considerations :)

Zeyber
Zeyber previously approved these changes Oct 28, 2024
developpeurweb
developpeurweb previously approved these changes Oct 29, 2024
@sdrozdsap sdrozdsap dismissed stale reviews from developpeurweb and Zeyber via 2170394 October 30, 2024 12:21
@github-actions github-actions bot marked this pull request as draft October 30, 2024 12:22
@sdrozdsap sdrozdsap marked this pull request as ready for review October 30, 2024 12:22
Copy link
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build. 
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions github-actions bot marked this pull request as draft October 30, 2024 12:23
@sdrozdsap sdrozdsap marked this pull request as ready for review October 30, 2024 12:24
Copy link
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build. 
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions github-actions bot marked this pull request as draft October 30, 2024 12:37
@sdrozdsap sdrozdsap marked this pull request as ready for review October 30, 2024 12:37
@github-actions github-actions bot marked this pull request as draft October 30, 2024 13:29
@sdrozdsap sdrozdsap marked this pull request as ready for review October 30, 2024 13:29
@github-actions github-actions bot marked this pull request as draft October 31, 2024 08:02
@sdrozdsap sdrozdsap marked this pull request as ready for review October 31, 2024 08:03
@github-actions github-actions bot marked this pull request as draft November 4, 2024 08:04
@sdrozdsap sdrozdsap marked this pull request as ready for review November 4, 2024 08:04
@sdrozdsap sdrozdsap merged commit 22ece42 into develop Nov 4, 2024
28 checks passed
@sdrozdsap sdrozdsap deleted the feature/CXSPA-7990 branch November 4, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants