Skip to content

feat: Resizer initial commit #579

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

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

devadula-nandan
Copy link
Contributor

@devadula-nandan devadula-nandan commented Apr 28, 2025

contributes resizer to carbon labs

Changelog

New

  • adds resizer component to carbon labs

Testing / Reviewing

deploy preview
automated tests added

Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for carbon-labs-web-components failed. Why did it fail? →

Name Link
🔨 Latest commit 936955e
🔍 Latest deploy log https://app.netlify.com/projects/carbon-labs-web-components/deploys/6846c9bd51c6ef000858b9a0

Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for carbon-labs-react ready!

Name Link
🔨 Latest commit 936955e
🔍 Latest deploy log https://app.netlify.com/projects/carbon-labs-react/deploys/6846c9bdfd3f220008c702a8
😎 Deploy Preview https://deploy-preview-579--carbon-labs-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@devadula-nandan devadula-nandan changed the title Feat/resize bar resize bar initial commit Apr 28, 2025
@devadula-nandan devadula-nandan changed the title resize bar initial commit feat: ResizeBar initial commit Apr 28, 2025
@elycheea
Copy link
Contributor

elycheea commented May 1, 2025

During sizing/refinement pt 2 today, we were leaning towards the name Resizer instead of ResizeBar since that feels a bit more generic and allows for more flexibility if there are future iterations on it.

@devadula-nandan devadula-nandan changed the title feat: ResizeBar initial commit feat: Resizer initial commit May 12, 2025
@devadula-nandan devadula-nandan marked this pull request as ready for review May 28, 2025 08:44
@devadula-nandan devadula-nandan requested a review from a team as a code owner May 28, 2025 08:44
@devadula-nandan devadula-nandan requested review from makafsal and sangeethababu9223 and removed request for a team May 28, 2025 08:44
@lee-chase
Copy link
Member

In general the component works well and represents the intent of the design.

There is a stolen focus issue that means the drag line can jump or be moved without the mouse being depressed.

  • Right click on the drag line to show the context menu on the single panel no boundaries story and select 'inspect' and note the line jumps. It may be possible to view this in other scenarios.
  • With another application open, right click on the line to show the context menu and then use Cmd+Tab to switch to the other application. When you click back to the browser the line is draggable even though the mouse button has been released.
  • The implementation uses non-context layer tokens such as layer-01 and border-subtle-01. In general we should avoid using non-contextual values (those with numbers) in favour of the layer context sensitive versions e.g. layer and border-subtle.

NOTE: Personally I find the visuals lack a clear drag handle and the thickened line does unintuitive. This is especially true if the drag line meets a screen edge (see image). I have mocked up a small drag handle below. This could be used on both sides with multiple panels.

image
image
image

@devadula-nandan
Copy link
Contributor Author

devadula-nandan commented Jun 9, 2025

  • Fix the focus steal
  • Add story showcasing custom drag handles
  • Use contextual tokens

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.

3 participants