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

feat: UI overhaul #40

Merged
merged 40 commits into from
Oct 27, 2024
Merged

feat: UI overhaul #40

merged 40 commits into from
Oct 27, 2024

Conversation

sminez
Copy link
Owner

@sminez sminez commented Oct 20, 2024

This PR involves pulling all of the UI related logic out of the main Editor and Buffer structs so that it is handled centrally in a way that is easier to reason about. It also introduces the concept of a Window to draw a distinction between the contents of a given Buffer and the user interface view of that Buffer.

Management of these windows is going to follow the UI paradigm of acme where the user can decide a number of columns and then move windows between those columns. Unlike acme it is not required that all open buffers have their own window, which means that there is some work to be done around how the user manages and decides when they want to open a new window vs replace the contents of an existing one.

Demo

ad-ui-overhaul-2024-10-27_13.17.03.mp4

Future work

  • Improvements to automatic window placement
  • Caching of rendered content to improve rendering times (not too bad currently but could definitely be better)
  • Use of hints from the Editor to determine what needs to be re-rendered
  • Better visual indication of the active buffer
  • Acme style window tags (see Add acme style window tags #26 for details)

@sminez sminez marked this pull request as ready for review October 26, 2024 15:06
@sminez
Copy link
Owner Author

sminez commented Oct 27, 2024

There is still going to be work to do to improve the UI behaviour and there are likely going to be changes made to both the key bindings and the semantics of the UI operations so I'm not going to call things "stable" at this point but they are working well enough that I'm going to merge this and play around with it for a while before publishing a new release.

@sminez sminez merged commit 9c96e2a into develop Oct 27, 2024
7 checks passed
@sminez sminez deleted the ui-overhaul branch October 27, 2024 13:30
@srenatus
Copy link

Wohoo. This is really nice. I've got the diff view open to remember the new keybindings, but it is really nice to have more than one window in an ad session ❤️ thanks!

@sminez
Copy link
Owner Author

sminez commented Oct 28, 2024

Thanks @srenatus! I want / need to get some auto-generated docs for the key bindings into :help in the same way as the built in commands so that things are easier to check. I have a few ideas about how to handle that but it'll take a bit of work to sort it out so it'll take some time before I can land it I'm afraid.

@srenatus
Copy link

It's fine, no need to rush this from my end 👍 Thanks!

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