Skip to content

Do not move overlay element out of its place#16989

Open
wnvko wants to merge 11 commits intomasterfrom
mvenkov/do-not-move-overlay-element-from-its-position
Open

Do not move overlay element out of its place#16989
wnvko wants to merge 11 commits intomasterfrom
mvenkov/do-not-move-overlay-element-from-its-position

Conversation

@wnvko
Copy link
Contributor

@wnvko wnvko commented Mar 5, 2026

Closes #16825

With this PR we are introducing keepInPlace property in OverlaySettings. When set to true overlay will not move the element to be shown out of its position. Instead the element will be wrapped in a content element and in a wrapper element. The new property default value is false to keep the current behavior.

With this PR we also deprecate the outlet property of OverlaySettings. This is not needed anymore as overlay element could be kept in its original position via the new keepInPlace property.

Next steps:

  1. Remove the outlet.
  2. Make keepInPlace default value true and deprecate it.
  3. Remove keepInPlace and always keep the overlay element at its original position.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@wnvko wnvko marked this pull request as draft March 5, 2026 08:45
@wnvko wnvko added the 🛠️ status: in-development Issues and PRs with active development on them label Mar 5, 2026
@wnvko wnvko added ❌ status: awaiting-test PRs awaiting manual verification and removed 🛠️ status: in-development Issues and PRs with active development on them labels Mar 5, 2026
@wnvko wnvko marked this pull request as ready for review March 5, 2026 09:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces an opt-in keepInPlace flag for OverlaySettings to prevent overlay content from being moved to a centralized overlay container, and begins deprecating OverlaySettings.outlet in favor of the new behavior.

Changes:

  • Added keepInPlace?: boolean to OverlaySettings and implemented in-place wrapping/unwrapping logic in IgxOverlayService.
  • Deprecated OverlaySettings.outlet and updated multiple feature READMEs + changelog to document the new option.
  • Updated grid/pivot-grid filtering overlay settings and adjusted dialog/overlay tests to account for in-place wrapping behavior.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
projects/igniteui-angular/core/src/services/overlay/utilities.ts Adds keepInPlace to OverlaySettings; marks outlet as deprecated.
projects/igniteui-angular/core/src/services/overlay/overlay.ts Implements in-place wrapping path for overlays + cleanup changes.
projects/igniteui-angular/core/src/services/overlay/overlay.spec.ts Adds unit tests validating keep-in-place wrapping/unwrapping and mixed modes.
projects/igniteui-angular/grids/grid/src/grid-base.directive.ts Sets keepInPlace on grid filter and advanced filtering overlay settings.
projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.component.ts Sets keepInPlace on pivot grid ESF filter overlay settings.
projects/igniteui-angular/directives/src/directives/toggle/toggle.directive.ts Defaults toggle attach to { keepInPlace: true, ...overlaySettings }.
projects/igniteui-angular/dialog/src/dialog/dialog.component.spec.ts Updates assertions to locate wrapper within the component host when in-place wrapping is used.
projects/igniteui-angular/core/src/services/overlay/README.md Documents keepInPlace and deprecates outlet in docs.
projects/igniteui-angular/core/src/services/overlay/position/README.md Notes outlet deprecation in positioning docs.
projects/igniteui-angular/drop-down/src/drop-down/autocomplete/README.md Updates autocomplete overlay settings docs; notes outlet deprecation.
projects/igniteui-angular/directives/src/directives/toggle/README.md Deprecates igxToggleOutlet docs and adds keepInPlace guidance.
projects/igniteui-angular/date-picker/src/date-picker/README.md Marks date-picker outlet as deprecated in docs.
projects/igniteui-angular/date-picker/src/date-range-picker/README.md Marks date-range-picker outlet as deprecated in docs.
CHANGELOG.md Adds an entry for the new keepInPlace feature and outlet deprecation.

@mtsvyatkova mtsvyatkova self-assigned this Mar 5, 2026
@mtsvyatkova mtsvyatkova added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Mar 5, 2026
@wnvko wnvko force-pushed the mvenkov/do-not-move-overlay-element-from-its-position branch from 1b73b1b to 73ce1fa Compare March 5, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retain the position in DOM of the element shown in overlay

4 participants