Skip to content

Conversation

@Maksims
Copy link
Collaborator

@Maksims Maksims commented Aug 5, 2025

Fixes #1277

It seems that there is an inherit issue with PCUI container element, if it is set to be scrollable as well as resizable, then scrollable style is set on the parent element, leading to resizing handle to be overflow-cut.
In Editor other panels, like hierarchy panel have multiple containers - one for resizing, and then inside of it one for scrolling.
This PR does the same - it adds a new container in for resizing, and then container with files for scrolling as before.

Also tested that auto-scrolling when dragging - still works.

This also fixes the horizontal scroll issue, below are two screens before and after the change (green highlight for the screen):
image image

@mvaligursky mvaligursky requested a review from Copilot August 5, 2025 08:46
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

This PR fixes an issue with the asset panel's folders resizing handle being cut off when scrolled down, addressing issue #1277. The problem occurred because PCUI container elements with both scrollable and resizable properties set the scrollable style on the parent element, causing the resize handle to be hidden by overflow.

  • Separates resizing and scrolling functionality by creating a dedicated left container for resizing
  • Moves the folders container inside the resizing container to handle scrolling independently
  • Updates CSS styles to properly position the new container hierarchy

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
src/editor/assets/asset-panel.ts Adds new left container for resizing, reorganizes folder container hierarchy
sass/editor/_editor-assets-panel.scss Updates CSS selectors and styles for the new container structure
Comments suppressed due to low confidence (2)

src/editor/assets/asset-panel.ts:421

  • [nitpick] The variable name '_containerLeft' is not descriptive enough. Consider renaming it to '_containerResizable' or '_containerFoldersResizable' to better indicate its purpose as the resizable wrapper for the folders panel.
        this._containerLeft = new Container({

src/editor/assets/asset-panel.ts:29

  • [nitpick] The constant name 'CLASS_LEFT' is not descriptive enough. Consider renaming it to 'CLASS_RESIZABLE' or 'CLASS_FOLDERS_RESIZABLE' to better reflect its purpose as the resizable container wrapper.
const CLASS_LEFT = `${CLASS_ROOT}-left`;

@mvaligursky mvaligursky requested a review from kpal81xd August 5, 2025 08:46
Copy link
Contributor

@willeastcott willeastcott left a comment

Choose a reason for hiding this comment

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

Great stuff! Your first editor PR in 8 years! 🎉 Thanks!

@Maksims
Copy link
Collaborator Author

Maksims commented Aug 5, 2025

Great stuff! Your first editor PR in 8 years!

I needed a bit of rest 🙏

@willeastcott
Copy link
Contributor

I needed a bit of rest 🙏

LOL. Glad you're back. ❤️

@willeastcott willeastcott merged commit b7f9807 into playcanvas:main Aug 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assets Folders resizing handle issue

2 participants