Skip to content
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

enlarge column resizer for better usability #8

Merged
merged 3 commits into from
Apr 21, 2021
Merged

enlarge column resizer for better usability #8

merged 3 commits into from
Apr 21, 2021

Conversation

aquaductape
Copy link
Contributor

@aquaductape aquaductape commented Apr 20, 2021

Currently the column resizer, that resizes the split editor and code output is too small. It's 2px wide, this can be a little cumbersome for some users who are able to select it the first time.

column-resize-small

This PR still keeps the original column-resizer size, but when hovered over, the element selection size is enlarged. This is done by adding CSS pseudo element. This is better than having a visually hidden padding, because you wouldn't be able to interact part of editor's scrollbar. This gif example shows the enlarged element as red, ( when it is transparent in prod ).

column-resize-large

The column-resizer when hovered is 12px of width.

@aquaductape
Copy link
Contributor Author

aquaductape commented Apr 20, 2021

Oh yeah I added z-index 100 because, the column when hovered was overlapped by the output panel. It doesn't need to be that high, the minimal z-index to be at the top is z-index: 8. I would like your opinion if 100 value is too high.

@amoutonbrady
Copy link
Member

Hey, that's a good idea! Like most features of the playground, this is stuff I quickly hacked together to go from idea to feature without giving much thought into it. In practice I almost never resized the plane. It also doesn't work on mobile. I'll review that one quickly!

Copy link
Member

@amoutonbrady amoutonbrady left a comment

Choose a reason for hiding this comment

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

I added a couple of suggestion to use tailwind utilities instead of raw CSS. That is to be coherent with the rest of the site. The less custom CSS, the better.

On your original gif there was a red background on the pseudo element as well. I take it was only to demonstrate the feature. I'm actually interested to see if that would help to add it back but with the primary color: bg-solid or bg-solid-default I believe.

src/assets/tailwind.css Outdated Show resolved Hide resolved
src/assets/tailwind.css Outdated Show resolved Hide resolved
@aquaductape
Copy link
Contributor Author

aquaductape commented Apr 20, 2021

Sorry it took a while, new to tailwind and I accidently pushed a modified pnpm lock file (which doesn't make sense, since I didn't install additional packages or update in this branch). But everything is resolved, I replaces raw css with tailwind utils and added solid brand color to column-resizer upon hover.

Copy link
Member

@amoutonbrady amoutonbrady left a comment

Choose a reason for hiding this comment

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

Sounds good, thank you!

@amoutonbrady amoutonbrady merged commit 717c518 into solidjs:master Apr 21, 2021
yacinehmito pushed a commit to yacinehmito/solid-playground that referenced this pull request May 5, 2021
enlarge column resizer for better usability
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.

2 participants