Repository navigation
Fix issue with inspector column overflow when dragging past max size - #308
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the inspector resizing logic to start from the actual rendered column width (using clientWidth) rather than the state-tracked width, preventing unexpected jumps during resizing. It also adds corresponding unit tests and adjusts flexbox styles for the resize handle and column. The review feedback suggests avoiding the fragile nextElementSibling DOM traversal by querying the .inspector-column class from the parent element instead.
| } | ||
|
|
||
| protected handleInspectorResizeKey(event: KeyboardEvent): void { | ||
| const target = event.currentTarget instanceof HTMLElement ? event.currentTarget : null; |
There was a problem hiding this comment.
Can you add a comment explaining what the target and target.nextElementSibling represent here? E.g., which on-screen elements are these?
Also, add comment -- why would event.target not be an HTMLElement?
There was a problem hiding this comment.
Added comment for startWidth/currentWidth and changed to as HTMLElement.
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
Description
inspector-columnwidth so it no longer keeps increasing after resize handle is dragged past maximum.inspector-columnclientWidthto avoid deadzone when resizing inspector after it has been dragged past max.Pre-launch Checklist