yangzhang75 opened a new pull request, #9527:
URL: https://github.com/apache/texera/pull/9527

   ### What changes were proposed in this PR?
   
   Closes #9502.
   
   Open a dropdown in the operator property panel on an operator whose form is 
taller than the panel, then scroll the panel: the open list stayed at its old 
screen position while its select scrolled away beneath it. The same on the Form 
View page, whose page scrolls, for any dropdown in a card. Two causes, both 
needed:
   
   1. The scrolling element was not registered with the CDK. The list is a CDK 
overlay whose reposition-on-scroll strategy hears about scrolling only from 
containers registered as `CdkScrollable`; the panel's scroller (`#content`, the 
`overflow-y: auto` element) and the form's host (`:host` is the page's 
scroller) were not. The window's own scroll was handled, inner scrollers were 
not.
   2. The bundle carried two `@angular/cdk` copies. `ng-zorro-antd` declares 
`@angular/cdk` as a regular dependency (not a peer) with the range `^21.0.0`, 
which Yarn had resolved to a nested 21.2.8 under 
`node_modules/ng-zorro-antd/node_modules` beside the app's 21.2.14 -- each with 
its own `ScrollDispatcher`, so a dropdown `nz-select` builds listened to one 
while a `cdkScrollable` registered by the app landed in the other, and 
registering the scroller alone changed nothing for it.
   
   - `yarn.lock`: `yarn dedupe @angular/cdk` folds ng-zorro's `^21.0.0` 
descriptor onto the app's 21.2.14 (one lock entry now serves both), so one copy 
is installed; nothing is pinned in `package.json`. A later bump of either side 
can split them again, so CI now runs `yarn dedupe --check @angular/cdk` right 
after the install (`build.yml`) and fails as soon as a second copy comes back 
-- it fails on `main`'s lock today.
   - `property-editor.component.html` / `.ts`: `cdkScrollable` on `#content`, 
`CdkScrollable` imported by the component. The directive has no bindings; the 
registration is the whole point.
   - `workflow-form.component.ts`: `hostDirectives: [CdkScrollable]`, since the 
host itself is the scroller there. A consequence worth knowing: the form's card 
list is a CDK drop list, which auto-scrolls its registered scrolling ancestors 
while a card is dragged near an edge, so a drag-reorder on a long form now 
scrolls the page at the edges, as the CDK intends.
   - The left panel, the result panel and the agent panel have the same shape 
-- an `#content` scroller with overlays inside (the operator menu's 
autocomplete, the console's dropdowns and selects, the agent chat's selects) -- 
and get the same `cdkScrollable`, so the fix is not re-reported per panel.
   
   #### Video
   
   **Before**
   
   <!-- before video -->
   
   **After**
   
   <!-- after video -->
   
   ### Any related issues, documentation, discussions?
   
   Closes #9502. Found while building the UDF parameter pickers (#9338); 
independent of them.
   
   ### How was this PR tested?
   
   - Each registered scroller has a spec that pins the registration rather than 
the directive's presence: the `CdkScrollable` resolved from `#content` (or from 
the form's host, after `ngOnInit`, where a host directive registers) is in the 
root `ScrollDispatcher`'s `scrollContainers` -- 
`property-editor.component.spec.ts`, `workflow-form.rendered.spec.ts`, 
`left-panel.component.spec.ts`, `result-panel.component.spec.ts`, 
`agent-panel.component.spec.ts`. Deletion-checked: removing a registration 
fails its test.
   - One cdk in the bundle: 
`node_modules/ng-zorro-antd/node_modules/@angular/cdk` no longer exists; the 
scrolling module's `VIRTUAL_SCROLL_STRATEGY` token and the bidi module's 
`cdk-dir-doc` token each appear once in the production `dist`, against twice in 
a build from `main`'s lock file. `yarn dedupe --check @angular/cdk` exits 0 
here and 1 on `main`.
   - The full frontend suite, eslint, prettier and the production (AOT) build 
pass.
   - By hand on a local deployment: before, scrolling the Form View page moved 
a select 92 px and left its open list where it opened, and the property panel 
did the same; after, the list follows the select on both pages.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Yes. Generated-by: Claude Code (Claude Fable 5.1, Anthropic). Co-authored 
with Claude, reviewed line by line by the author before submission.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to