Skip to content

Feature/resize panel #105

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

Merged
merged 5 commits into from
Apr 11, 2024
Merged

Feature/resize panel #105

merged 5 commits into from
Apr 11, 2024

Conversation

murilopolese
Copy link
Contributor

This PR does a little more than just resizing the panel.

  • Loads Roboto Mono font locally
  • Add smooth transition to buttons

Then it implements a panel resizing:

  • The area that the terminal buttons reveal is not part of the resizable handle
  • You can open and close the panel dragging
  • If you click on close, it remember the last panel size so when you click open it goes back to that size
  • If you move the mouse out of the window or into the tabs, resizing stops

@murilopolese murilopolese requested a review from ubidefeo April 11, 2024 09:21
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe these 3 constants could indicate we're referring to HEIGHT.
Verbosity never hurts :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It kind of does hurt, though. Of course the variable name can be PANEL_HEIGHT_CLOSED but I opted to keep the word height on the other side of the expression and leave the constant names shorter:

state.panelHeight = PANEL_CLOSED
state.savedPanelHeight = PANEL_DEFAULT

if (state.panelHeight < PANEL_TOO_SMALL) {
  ...
}

It also reads cleaner without the "height" on both sides, in my humble opinion.

Copy link
Collaborator

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

nice one

@murilopolese murilopolese merged commit d08ecaa into development Apr 11, 2024
1 check passed
@murilopolese murilopolese deleted the feature/resize-panel branch April 11, 2024 11:54
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