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 rewrite #116

Merged
merged 45 commits into from
Mar 25, 2024
Merged

Terminal rewrite #116

merged 45 commits into from
Mar 25, 2024

Conversation

melody-rs
Copy link
Member

Connections
#89

Description
This PR replaces wezterm with alacritty_terminal, which is on crates.io. It means that we've had to implement more functionality of a terminal emulator but we are at least no longer depending on a crate not intended for public use.

This PR also adds terminal configuration and fixes the way that Luminol playtests games. The config is not currently editable through a UI though, that'll probably be added in a separate pull request.
Additionally, terminals now automatically size themselves based on the ui they're placed in! This means we don't have any dragvalues to resize terminals anymore.

Testing
I've been testing by running various things through the terminal, each trying to test a different feature of the terminal.

  • nano: Inverted cell rendering, Ctrl+ shortcuts
  • nvim: Cursor rendering, vi mode handling, and mouse handling
  • btop: Scrolling and rendering speed
  • modshot + rdbg: Testing playtesting a game

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown -Z build-std=std,panic_abort
  • Run cargo build --release
  • If applicable, run trunk build --release

@melody-rs melody-rs added the dependencies Pull requests that update a dependency file label Mar 21, 2024
@melody-rs melody-rs added this to the v1.0 milestone Mar 21, 2024
@melody-rs melody-rs requested a review from a team as a code owner March 21, 2024 19:14
@melody-rs melody-rs requested a review from zimberzimber March 21, 2024 20:42
src/main.rs Outdated Show resolved Hide resolved
src/app/log_window.rs Outdated Show resolved Hide resolved
crates/term/src/widget/mod.rs Show resolved Hide resolved
crates/term/src/widget/mod.rs Outdated Show resolved Hide resolved
crates/term/src/widget/mod.rs Outdated Show resolved Hide resolved
assets/fonts/IosevkaTermNerdFont-Extended.ttf Outdated Show resolved Hide resolved
src/app/log_window.rs Outdated Show resolved Hide resolved
@melody-rs melody-rs requested a review from white-axe March 23, 2024 05:57
Copy link
Collaborator

@white-axe white-axe left a comment

Choose a reason for hiding this comment

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

The terminal still causes the screen to render every frame when it's focused, but this seems to be an egui or eframe bug since egui's TextEdit also causes this to happen in Linux native builds when focused but not in web builds. Everything else is good, though!

@melody-rs melody-rs merged commit 5cbe458 into Astrabit-ST:dev Mar 25, 2024
5 checks passed
@melody-rs melody-rs deleted the terminal-rewrite branch March 25, 2024 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants