Skip to content

Abstract the GUI logic into it's own package #965

@mjarkk

Description

@mjarkk

Topic
Lazygit has become quite complicated over time and to understand the UI logic in the code is also becoming quite a bit more complicated than just understanding GoCui.
If someone wants to add something to lazygit with a tiny bit UI complication they have to understand GoCui and the Lazygit's UI system and i guess that this doesn't help a lot with attracting new developers.
Beside that there is also a point to make about the amount of layers lazygit now has before something is drawn to the terminal (lazygit code > lazygit ui system > gocui > termbox)

Your thoughts
To reduce the complexity it would be nice if lazygit had one package like lazyui that does all the UI work so in lazygit there is no code for building the UI only the definition code for the UI.

My second point was just something to think about i don't think it's necessarily needed to be reduced but usually more layers in code means slower programs and more places for errors to occur.

Currently the lazygit UI works but the code gives me the impression from that simpsons dad meme:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionmaintenanceFor refactorings, CI changes, tests, version bumping, etc

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions