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

Merged
merged 5 commits into from
Nov 19, 2024
Merged

Commit-Tree Rebuild #21

merged 5 commits into from
Nov 19, 2024

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
  • Keep keyboard-only control with new key-bindings:
    • arrow keys for commit selection
    • p for promotion
    • →/← for branch selection in promotion
    • some shortcut / key-binding for confirmation / cancel
  • Ask for confirmation of actions before they are implemented

Work to do

implement...

  • due to the increasing complexity of the project: refactor OSTreeTUI::main() into a proper separate class
  • commitComponent similar to ftxui::window to hold a commit and its info
  • order them in a list
  • overlay detection with branches for commit promotion
  • promotion UI action (preview + confirmation window)
  • keyboard navigation
  • keyboard shortcuts to trigger & operate the promotion
  • code cleanup

Followup PRs

The following features got moved to followup PRs (mainly to keep this one from blowing up in size):

@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
@forgottosave forgottosave force-pushed the topic-commit_tree_rebuild branch 3 times, most recently from cb514e8 to 1e2c598 Compare October 21, 2024 16:25
@forgottosave forgottosave force-pushed the topic-commit_tree_rebuild branch 2 times, most recently from 5cedf10 to 3c1f194 Compare November 6, 2024 17:19
@forgottosave forgottosave removed a link to an issue Nov 6, 2024
2 tasks
@forgottosave forgottosave force-pushed the topic-commit_tree_rebuild branch 3 times, most recently from b03fa37 to f641db9 Compare November 11, 2024 15:58
@forgottosave forgottosave marked this pull request as ready for review November 11, 2024 17:23
@forgottosave forgottosave requested a review from COM8 November 11, 2024 17:23
@forgottosave forgottosave added state: 👁️ review Ready for review state: 👷🏻 in development Currently worked on and removed state: 👷🏻 in development Currently worked on state: 👁️ review Ready for review labels Nov 11, 2024
@forgottosave forgottosave force-pushed the topic-commit_tree_rebuild branch from 9552da4 to b97c324 Compare November 13, 2024 12:13
@forgottosave forgottosave added state: 👁️ review Ready for review and removed state: 👷🏻 in development Currently worked on labels Nov 13, 2024
Copy link
Member

@COM8 COM8 left a comment

Choose a reason for hiding this comment

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

This is part 1 of my review. I left a few comments.

Why is scripts/check_clang_format.sh and scripts/run_clang_format.sh

src/core/CMakeLists.txt Outdated Show resolved Hide resolved
src/core/OSTreeTUI.hpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.hpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.hpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.hpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.hpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.hpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.hpp Outdated Show resolved Hide resolved
src/core/commit.hpp Outdated Show resolved Hide resolved
.clang-format Show resolved Hide resolved
Copy link
Member

@COM8 COM8 left a comment

Choose a reason for hiding this comment

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

Nothing major any more

src/core/OSTreeTUI.cpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.cpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.cpp Outdated Show resolved Hide resolved
src/core/OSTreeTUI.cpp Show resolved Hide resolved
src/util/cpplibostree.cpp Outdated Show resolved Hide resolved
@forgottosave forgottosave added state: ✅ done Finished & Reviewed and removed state: 👁️ review Ready for review labels Nov 19, 2024
* Implement snappy windows
* Rebuild commit list
* Add drag-n-drop branch selection
* Create Promotion Window
* Implement scrolling
* Make branch change with arrow keys possible
* Add selected-commit highlight
* Improve commit scrolling and selection
* Make commit list focusable by keyboard
* Fix keyboard navigation in promotion window
* Fix promotion colors
@forgottosave forgottosave force-pushed the topic-commit_tree_rebuild branch from eb1d993 to 948af8a Compare November 19, 2024 08:11
@forgottosave
Copy link
Collaborator Author

Manually squashed all 65 commits into 5 bigger ones. Now rebasing them onto main.

@forgottosave forgottosave merged commit 2076b04 into main Nov 19, 2024
21 of 22 checks passed
@forgottosave forgottosave mentioned this pull request Nov 30, 2024
2 tasks
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: ✅ done Finished & Reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Mouse Input in Commit Tree
2 participants