Skip to content

Product selector click is not working fully #196

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

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

lamATnginx
Copy link
Collaborator

@lamATnginx lamATnginx commented Mar 26, 2025

Proposed changes

Closes https://github.com/nginxinc/docs-platform/issues/416 and https://github.com/nginxinc/docs-platform/issues/411

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • I have updated any relevant documentation (README.md and CHANGELOG.md)

@lamATnginx lamATnginx added the bug Something isn't working label Mar 26, 2025
@lamATnginx lamATnginx self-assigned this Mar 26, 2025
@lamATnginx lamATnginx requested a review from a team as a code owner March 26, 2025 18:04
Copy link
Collaborator

@nginx-jack nginx-jack left a comment

Choose a reason for hiding this comment

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

Tiny one - If you click directly on the chevron SVG it doesn't trigger properly.
I dropped a debugger in your greedy "off click" listener. If you click the chevron, that target is technically the svg itself, which doesn't have a classList or a class with product-selector.
The quickest fix would be to add a class to the svg, but worth checking if there's a nicer solution targeting wise.
https://github.com/user-attachments/assets/77833a4b-050f-408f-9465-cfba0533a105

@lamATnginx lamATnginx force-pushed the fix/product-slctr-listen branch from 3af759b to 711affc Compare March 27, 2025 14:48
@lamATnginx
Copy link
Collaborator Author

lamATnginx commented Mar 27, 2025

Ready for review. Rewrote the logic needed via checking ancestor + polishing for alignment + adding close icon.

@lamATnginx lamATnginx force-pushed the fix/product-slctr-listen branch from d8ba2b4 to c744bcf Compare March 27, 2025 18:18
Copy link

❌ One or more of the commit messages in this PR do not match the nginx-hugo-theme git guidelines, please check the CI job for more details on which commits were flagged and why.

Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

@lamATnginx lamATnginx force-pushed the fix/product-slctr-listen branch from 9871f2d to 4e4d72e Compare March 28, 2025 16:25
@lamATnginx lamATnginx merged commit fcf4bba into main Mar 28, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants