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

Terminal text cols adjusts to terminal container. #285

Merged
merged 17 commits into from
Dec 16, 2023

Conversation

Ozy-Viking
Copy link
Contributor

@Ozy-Viking Ozy-Viking commented Dec 13, 2023

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/dockge/blob/master/CONTRIBUTING.md

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

Fixes #(223)

Type of change

Please delete any options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • User interface (UI)

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas
    (including JSDoc for methods)
  • My changes generate no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots

Before Changes

image

After Changes

image

@louislam
Copy link
Owner

The real terminal is in the backend using "node-pty".

It needs to update the the column in the backend too.

@louislam louislam added the question Further information is requested label Dec 13, 2023
@Ozy-Viking
Copy link
Contributor Author

I will have a look into that.

@Ozy-Viking
Copy link
Contributor Author

Ozy-Viking commented Dec 14, 2023

I have added:

  • Event listener when window resizes.
  • Removing event listener.
  • Updating backend where there was already a TODO item in terminal-socket-handler.ts.

@louislam
Copy link
Owner

Thanks, but I believe that a lot of code changes are just format changes, not logic changes, which makes it harder for me to review your code. Please keep them unchanged. And should use project's eslint only, these commands may help:

pnpm run lint
pnpm run fmt
pnpm run check-ts

@Ozy-Viking
Copy link
Contributor Author

I went back through using GitHub diff split view to remove any unnecessary changes, sorry about that.

@louislam louislam removed the question Further information is requested label Dec 15, 2023
package.json Outdated
@@ -71,8 +69,10 @@
"@typescript-eslint/eslint-plugin": "~6.8.0",
"@typescript-eslint/parser": "~6.8.0",
"@vitejs/plugin-vue": "~4.5.2",
"@xterm/addon-fit": "0.9.0-beta.1",
Copy link
Owner

Choose a reason for hiding this comment

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

Is there any reason to use the specific beta version?

Copy link
Contributor Author

@Ozy-Viking Ozy-Viking Dec 15, 2023

Choose a reason for hiding this comment

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

No reason.

Copy link
Contributor Author

@Ozy-Viking Ozy-Viking Dec 15, 2023

Choose a reason for hiding this comment

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

I choose @xterm/addon-fit package over xterm-addon-fit as it is the new addon format see xterm README as of xterm v3.14.0.

The version for it is 0.9.0-beta.17 no full release yet. Though it is a drop in replacement for the other one which is at v0.8.0 or has a beta release of 0.9.0-beta.37.

Copy link
Owner

@louislam louislam Dec 16, 2023

Choose a reason for hiding this comment

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

I see, but since 0.9.0-beta.17 requires @xterm/xterm instead of xterm, I have to change this along with this pr.

@louislam louislam added the question Further information is requested label Dec 15, 2023
@louislam louislam removed the question Further information is requested label Dec 16, 2023
@louislam louislam merged commit e2819af into louislam:master Dec 16, 2023
6 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.

2 participants