As of now I've added a enum (Pane) which holds either a TerminalPane, or a PluginPane, and derefs to the PaneTrait (previously just Pane) trait.
Things I need to know:
[ ] What methods from the PaneTrait trait to move to PluginPane and TerminalPane respectively
[ ] Wether zellij-server/src/panes/mod.rs is an acceptable (new) home for both the Pane enum and the PaneTrait trait (PaneTrait seems kind of out of place in zellij-server/src/tab/mod.rs)
[ ] Wether I should rename PaneTrait to something better (and what)
Other Ideas and suggestions are more than welcome
Regarding the methods that should be moved
Here is a quick list of methods that I think might be better off outside of PaneTrait:
Methods that I might be better off in TerminalPane
Q: Why make this Draft instead of just coding away?
A: Because I prefer gathering info and tips before doing a somewhat huge amount of changes over having to scrap 90% of my code because it doesnt conform to the general vision of the Maintainers
Q: Why this?
A: Because Im currently working on another (smaller) change, and I dont want to have to write Spagetti Code to make it work. And Im sure the Maintainer(s) dont want me to either.
Refactor Pane somewhat according to https://github.com/zellij-org/zellij/blob/1dbd14f277ceff89588adf6d8db10d856c310e69/zellij-server/src/tab/mod.rs#L206
As of now I've added a enum (
Pane
) which holds either a TerminalPane, or a PluginPane, and derefs to thePaneTrait
(previously justPane
) trait.Things I need to know:
PaneTrait
trait to move toPluginPane
andTerminalPane
respectivelyzellij-server/src/panes/mod.rs
is an acceptable (new) home for both thePane
enum and thePaneTrait
trait (PaneTrait
seems kind of out of place inzellij-server/src/tab/mod.rs
)PaneTrait
to something better (and what)Other Ideas and suggestions are more than welcome
Regarding the methods that should be moved
Here is a quick list of methods that I think might be better off outside of
PaneTrait
:Methods that I might be better off in
TerminalPane
https://github.com/zellij-org/zellij/blob/1dbd14f277ceff89588adf6d8db10d856c310e69/zellij-server/src/tab/mod.rs#L483
https://github.com/zellij-org/zellij/blob/1dbd14f277ceff89588adf6d8db10d856c310e69/zellij-server/src/tab/mod.rs#L486
https://github.com/zellij-org/zellij/blob/1dbd14f277ceff89588adf6d8db10d856c310e69/zellij-server/src/tab/mod.rs#L493
Methods that might be better off in
PluginPane
https://github.com/zellij-org/zellij/blob/1dbd14f277ceff89588adf6d8db10d856c310e69/zellij-server/src/tab/mod.rs#L475-L477
Q&A
Q: Why make this Draft instead of just coding away?
A: Because I prefer gathering info and tips before doing a somewhat huge amount of changes over having to scrap 90% of my code because it doesnt conform to the general vision of the Maintainers
Q: Why this?
A: Because Im currently working on another (smaller) change, and I dont want to have to write Spagetti Code to make it work. And Im sure the Maintainer(s) dont want me to either.