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

Refactor/merge Visual and Panels mode #384

Open
XVilka opened this issue Jan 18, 2021 · 2 comments
Open

Refactor/merge Visual and Panels mode #384

XVilka opened this issue Jan 18, 2021 · 2 comments
Labels
help wanted Extra attention is needed panel refactor Refactoring requests visual

Comments

@XVilka
Copy link
Member

XVilka commented Jan 18, 2021

Currently, both modes are implemented completely independently, sometimes with code duplication/copy-paste.
I propose to reduce the code and feature duplication by:

  1. Migrate Visual mode from commands to the API: Refactor Visual mode (librz/core/tui/visual.c) to use API instead of commands #382
  2. Migrate Panels mode from command to the API: Refactor Panels mode (librz/core/tui/panels.c) to use API instead of commands #383
  3. Migrate Visual menus code from commands to the API: Refactor Visual Menus /librz/core/tui/vmenus* to use API instead of commands #491
  4. Only after the three above are finished, determine what code is logically/semantically share by both and extract it into other file or RzCons or RzUtils.
  5. Determine what features overlap, and consider the merge of both modes.

Please note, that many features that are present in Visual mode are missing in the Panels mode, and there is a significant difference how these modes operate:

  • Visual mode has the concept of rotation - press p/P to switch between representations
  • Panels mode has the concept of panes and useful for custom arrangement.

Thus, we might consider keeping the both modes as is from the user point of view, but reduce the code and feature duplication to the minimum.

@ret2libc
Copy link
Member

ret2libc commented Aug 3, 2021

I think this is not going to happen anytime "soon" and by soon I mean at least a year, considering the many projects we have opened right now. I propose to close this issue for now as a way to try to keep the list of issues manageable.

@stale stale bot removed the stale label Aug 3, 2021
@XVilka
Copy link
Member Author

XVilka commented Aug 3, 2021

No, it's important issue and there is a lot of duplicated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed panel refactor Refactoring requests visual
Projects
None yet
Development

No branches or pull requests

2 participants