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

[CL-330] Prevent select dropdowns from floating when scrolling #11715

Draft
wants to merge 153 commits into
base: main
Choose a base branch
from

Conversation

vleague2
Copy link
Contributor

@vleague2 vleague2 commented Oct 25, 2024

๐ŸŽŸ๏ธ Tracking

CL-330

๐Ÿ“” Objective

Select and multiselect dropdowns were "floating" on the screen when scrolling in the extension refresh, instead of scrolling along with the container. This was also happening in dialogs.

The issue is due to the way the underlying ng-select library positions the dropdown popup. We had set it to always attach itself as a child of the body on the page, and this meant that the dropdown popup would position itself according to the body placement. However, this was not the correct parent element for dialogs and the extension, which uses the popup-layout. Because the dropdowns were not attached to the scrollable main containers of those elements, they were not responding to the scroll events. This is solved by specifying where the dropdown container should be attached for different clients and components.

๐Ÿ“ธ Screenshots

Before

Screen.Recording.2024-10-30.at.10.43.09.AM.mov

After

Screen.Recording.2024-10-30.at.10.42.47.AM.mov

โฐ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

๐Ÿฆฎ Reviewer guidelines

  • ๐Ÿ‘ (:+1:) or similar for great changes
  • ๐Ÿ“ (:memo:) or โ„น๏ธ (:information_source:) for notes or general info
  • โ“ (:question:) for questions
  • ๐Ÿค” (:thinking:) or ๐Ÿ’ญ (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • ๐ŸŽจ (:art:) for suggestions / improvements
  • โŒ (:x:) or โš ๏ธ (:warning:) for more significant problems or concerns needing attention
  • ๐ŸŒฑ (:seedling:) or โ™ป๏ธ (:recycle:) for future improvements or indications of technical debt
  • โ› (:pick:) for minor or nitpick changes

vleague2 and others added 30 commits April 10, 2024 15:24
* update typography docs, story, color

* add SM Sans font, remove Open Sans

---------

Co-authored-by: Oscar Hinton <[email protected]>
* update callout styles; make component standalone

* add import block to mdx page
* update styles and add card story

* update docs

* add important to typography styles

* [CL-239] simple dialog style refresh

* [CL-342] fix text overflow in dialog; add story

* use main color for headers

* update loading styles: spinner height and alt text; body min height

* update simple dialog border radius

* add badge to story
* add readonly styles

* update label styles; update stories

* code review changes
@vleague2 vleague2 added the hold do not merge, do not approve yet label Oct 25, 2024
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 33.55%. Comparing base (38d43e4) to head (b011568).
Report is 44 commits behind head on ps/extension-refresh.

โœ… All tests successful. No failed tests found.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           ps/extension-refresh   #11715   +/-   ##
=====================================================
  Coverage                 33.54%   33.55%           
=====================================================
  Files                      2810     2810           
  Lines                     87400    87400           
  Branches                  16667    16667           
=====================================================
+ Hits                      29322    29329    +7     
+ Misses                    55775    55768    -7     
  Partials                   2303     2303           

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Oct 25, 2024

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ eec907b5-8034-4ffa-b8f8-5adc5f31aa1f

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Client_Privacy_Violation /libs/tools/generator/components/src/credential-generator-history.component.html: 6 Attack Vector
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 47 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /publish-cli.yml: 180 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-desktop-beta.yml: 667 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 522 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-cli.yml: 404 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 193 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-web.yml: 40 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /deploy-web.yml: 190 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-browser.yml: 95 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /retrieve-current-desktop-rollout.yml: 22 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 358 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 179 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /deploy-web.yml: 221 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /publish-cli.yml: 103 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1292 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-web.yml: 56 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 506 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 246 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /brew-bump-desktop.yml: 25 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-desktop-beta.yml: 50 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 40 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /deploy-web.yml: 269 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 186 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /publish-cli.yml: 140 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /publish-desktop.yml: 195 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 200 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 81 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-browser.yml: 43 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 287 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 890 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 514 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 498 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /staged-rollout-desktop.yml: 28 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /publish-desktop.yml: 244 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-auto-bump.yml: 20 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-web.yml: 341 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /publish-web.yml: 43 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-browser.yml: 366 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /publish-desktop.yml: 121 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-desktop.yml: 93 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-desktop.yml: 70 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-web.yml: 296 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-web.yml: 266 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-cli.yml: 43 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-desktop-beta.yml: 247 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1338 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 296 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 161 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-desktop.yml: 43 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /release-cli.yml: 58 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-web.yml: 190 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 34 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-browser.yml: 407 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Fixed Issues

Severity Issue Source File / Package
MEDIUM Angular_Improper_Type_Pipe_Usage /libs/tools/generator/components/src/credential-generator-history.component.html: 1
MEDIUM Client_Privacy_Violation /libs/tools/generator/components/src/credential-generator-history.component.html: 3

@vleague2 vleague2 changed the title test moving popup attachment point [CL-435] test moving popup attachment point Oct 25, 2024
@willmartian willmartian self-requested a review October 28, 2024 16:23
@@ -17,7 +17,7 @@
[clearSearchOnAdd]="true"
[labelForId]="labelForId"
[keyDownFn]="keyDown"
appendTo="body"
appendTo="#ng-select-append-target"
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Since this is our functionality and is not internal to libs/components, I would rename this to bit-select-append-target
  2. I think a class selector might be more appropriate here: .bit-select-append-target. That way it still works if the target element already has some id.

@vleague2 vleague2 changed the title [CL-435] test moving popup attachment point [CL-435][CL-330] Prevent select dropdowns from floating when scrolling Oct 30, 2024
@vleague2 vleague2 marked this pull request as ready for review October 30, 2024 20:33
@vleague2 vleague2 requested a review from a team as a code owner October 30, 2024 20:33
@@ -12,7 +12,7 @@
<ng-content select="[slot=above-scroll-area]"></ng-content>
</div>
<div
class="tw-max-w-screen-sm tw-mx-auto tw-overflow-y-auto tw-flex tw-flex-col tw-w-full tw-h-full tw-styled-scrollbar"
class="ng-select-append-target tw-max-w-screen-sm tw-mx-auto tw-overflow-y-auto tw-flex tw-flex-col tw-w-full tw-h-full tw-styled-scrollbar tw-relative"
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 don't think we need this on the body for the extension because I think every page uses this... but I could be wrong. In which case it's very easy to add to the body too for pages that don't have the popup-page

@willmartian willmartian removed the request for review from merissaacosta October 30, 2024 20:45
@vleague2 vleague2 added hold do not merge, do not approve yet and removed hold do not merge, do not approve yet labels Oct 31, 2024
@vleague2 vleague2 changed the title [CL-435][CL-330] Prevent select dropdowns from floating when scrolling [CL-330] Prevent select dropdowns from floating when scrolling Nov 4, 2024
@vleague2 vleague2 marked this pull request as draft November 5, 2024 14:52
@vleague2 vleague2 removed the request for review from a team November 5, 2024 14:55
Base automatically changed from ps/extension-refresh to main November 15, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold do not merge, do not approve yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants