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

Commit-Tree Rebuild #21

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Commit-Tree Rebuild #21

wants to merge 10 commits into from

Conversation

forgottosave
Copy link
Collaborator

@forgottosave forgottosave commented Oct 17, 2024

Description

This is a bigger rebuild of the commit-tree part of the ostree-tui, to support drag-and-drop functionality of commits for intuitive commit promotion & deletion. It also would solve #17, and partially #14, if during promotion the according confirmation window contains the modifiable strings.
Detailed prototype images & descriptions might follow soon.

Features

  • Drag-and-drop commits onto branches to promote them
  • Drag-and-drop the latest commits on branches into a trash-bin to remove them (e.g. because of an accidental promotion)
  • Keep keyboard-only control with new key-bindings:
    • p & →/← for promotion & branch selection
    • d for deletion
  • Show previews of actions before they are implemented & ask for confirmation. The promotion-confirmation window could also include metadata strings, that could be modified by the user

Work to do

  • implement commit deletion in cpplibostree
  • rebuild the commit-tree & implement...
    • ... sticky windows from ftxui::window to snap back after letting go & order them in a list
    • ...overlay detection for sticky windows
    • ...promotion & deletion UI action (preview + confirmation window)
    • ...keyboard shortcuts to trigger the promotion & deletion

@forgottosave forgottosave added state: 👷🏻 in development Currently worked on ✨ feature New feature or request labels Oct 17, 2024
@forgottosave forgottosave self-assigned this Oct 17, 2024
@forgottosave forgottosave marked this pull request as draft October 17, 2024 07:08
This was linked to issues Oct 17, 2024
debatable if it should be in util instead, but could be changed later if wanted
This is still WIP and should only show what a snappy window could look like. Still A LOT of code duplication from the original window implementation and should be changed to inheritance or something
Reusing the old commit tree for demo purposes. There are heavy changes to be made, if drag-and-drop onto branches should be supported.
replaced by CommitComponent, as its complexity porbably won't allow for any reuse as a general snappy-window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request state: 👷🏻 in development Currently worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Commits "Removeable" Use Mouse Input in Commit Tree
1 participant