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

Fixes for dropdowns #3732

Merged
merged 17 commits into from
Nov 1, 2024
Merged

Fixes for dropdowns #3732

merged 17 commits into from
Nov 1, 2024

Conversation

Rieven
Copy link
Contributor

@Rieven Rieven commented Oct 24, 2024

Changes

  • Remove double dropdowns open:
image
  • Remove that dropdown does not close after clicking anywhere the document.
  • Remove aria-expanded on dropdown list and set it to the button that triggers the expansion
  • Fix styling language selector

Issue link

Closes

Demo

Screen.Recording.2024-10-24.at.16.54.10.mov

QA notes

You have to run yarn dev to see the changes (clear cache as well)


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@Rieven Rieven requested a review from a team as a code owner October 24, 2024 14:29
rocky/assets/js/dropdown.js Outdated Show resolved Hide resolved
rocky/assets/js/dropdown.js Outdated Show resolved Hide resolved
ppvg
ppvg previously approved these changes Oct 24, 2024
Copy link
Member

@ppvg ppvg left a comment

Choose a reason for hiding this comment

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

There's some more improvements possible (e.g. it would be nice if this also handled escape key and ideally even arrow keys), but at this point I think we should instead make sure Manon has a better more usable dropdown implementation for KAT to use.

As it stands this PR already moves aria-expanded to the correct element, which was the main point.

Nice work! 🎉

Co-authored-by: Peter-Paul van Gemerden <[email protected]>
ammar92
ammar92 previously approved these changes Oct 29, 2024
Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

No remarks

@stephanie0x00
Copy link
Contributor

Checklist for QA:

  • I have checked out this branch, and successfully ran a fresh make reset.
  • I confirmed that there are no unintended functional regressions in this branch:
    • I have managed to pass the onboarding flow
    • Objects and Findings are created properly
    • Tasks are created and completed properly
  • I confirmed that the PR's advertised feature or hotfix works as intended.
  • I checked the logs for errors and/or warnings and made issues where necessary

What works:

Looks good! Changing language now isn't buggy anymore and the pop-up- disappear nicely.

What doesn't work:

n/a

Bug or feature?:

n/a

</div>
<form id="set-language"
Copy link
Contributor

Choose a reason for hiding this comment

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

As the language in in the url, why is this a form / post?

Copy link
Contributor

Choose a reason for hiding this comment

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

Woudn't a list of a href's with the current url with the current language replaced by the new language not suffice?

Copy link

sonarcloud bot commented Nov 1, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@underdarknl underdarknl merged commit 31a20da into main Nov 1, 2024
20 of 22 checks passed
@underdarknl underdarknl deleted the fix/aria-expanded-set-on-button branch November 1, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants