summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/tags_controller.go
AgeCommit message (Collapse)Author
2024-04-12standardize 'Commit Sha' to 'Commit Hash'pikomonde
2024-01-28Display more keybindings on-screenJesse Duffield
2024-01-28Improve keybinding descriptionsJesse Duffield
This adds a bunch of tooltips to keybindings and updates some keybinding descriptions (i.e. labels). It's in preparation for displaying more keybindings on-screen (in the bottom right of the screen), and so due in part to laziness it shortens some descriptions so that we don't need to manage both a short and long description (for on-screen vs in-menu). Nonetheless I've added a ShortDescription field for when we do want to have both a short and long description. You'll notice that some keybindings I deemed unworthy of the options view have longer descriptions, because I could get away with it.
2024-01-23Set groundwork for better disabled reasons with range selectJesse Duffield
Something dumb that we're currently doing is expecting list items to define an ID method which returns a string. We use that when copying items to clipboard with ctrl+o and when getting a ref name for diffing. This commit gets us a little deeper into that hole by explicitly requiring list items to implement that method so that we can easily use the new helper functions in list_controller_trait.go. In future we need to just remove the whole ID thing entirely but I'm too lazy to do that right now.
2024-01-19Enforce single-item selection in various actionsJesse Duffield
We want to show an error when the user tries to invoke an action that expects only a single item to be selected. We're using the GetDisabledReason field to enforce this (as well as DisabledReason on menu items). I've created a ListControllerTrait to store some shared convenience functions for this.
2024-01-19Add SetSelection function for list contexts and use it in most placesJesse Duffield
The only time we should call SetSelectedLineIdx is when we are happy for a select range to be retained which means things like moving the selected line index to top top/bottom or up/down a page as the user navigates. But in every other case we should now call SetSelection because that will set the selected index and cancel the range which is almost always what we want.
2024-01-09Fix checking out a tag when a branch with the same name existsStefan Haller
2023-10-08Add inline status for pushing tags and deleting remote tagsStefan Haller
2023-10-08Don't report errors from within a WithWaitingStatusStefan Haller
We can just return our error to WithWaitingStatus, it will take care of reporting it.
2023-08-10Allow deleting remote tags/branches from local tag/branch views (#2738)Federico
2023-07-22Better tag creation UXJesse Duffield
Previously we used a single-line prompt for a tag annotation. Now we're using the commit message prompt. I've had to update other uses of that prompt to allow the summary and description labels to be passed in
2023-07-10Use an interface for tasks instead of a concrete structJesse Duffield
By using an interface for tasks we can use a fake implementation in tests with extra methods
2023-07-09Use first class task objects instead of global counterJesse Duffield
The global counter approach is easy to understand but it's brittle and depends on implicit behaviour that is not very discoverable. With a global counter, if any goroutine accidentally decrements the counter twice, we'll think lazygit is idle when it's actually busy. Likewise if a goroutine accidentally increments the counter twice we'll think lazygit is busy when it's actually idle. With the new approach we have a map of tasks where each task can either be busy or not. We create a new task and add it to the map when we spawn a worker goroutine (among other things) and we remove it once the task is done. The task can also be paused and continued for situations where we switch back and forth between running a program and asking for user input. In order for this to work with `git push` (and other commands that require credentials) we need to obtain the task from gocui when we create the worker goroutine, and then pass it along to the commands package to pause/continue the task as required. This is MUCH more discoverable than the old approach which just decremented and incremented the global counter from within the commands package, but it's at the cost of expanding some function signatures (arguably a good thing). Likewise, whenever you want to call WithWaitingStatus or WithLoaderPanel the callback will now have access to the task for pausing/ continuing. We only need to actually make use of this functionality in a couple of places so it's a high price to pay, but I don't know if I want to introduce a WithWaitingStatusTask and WithLoaderPanelTask function (open to suggestions).
2023-05-25Use sentence case everywhereJesse Duffield
We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE. Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything is in 'Sentence case' there's no need for the distinction. I've got a couple lower case things I've kept: namely, things that show up in parentheses.
2023-04-30lots of changesJesse Duffield
2023-04-30standardise controller helper methodsJesse Duffield
2023-04-30Begin refactoring guiJesse Duffield
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the gui package purely for the sake of better encapsulation
2022-03-30pkg/gui: Rename IPopupHandler::Ask() to Confirm()Moritz Haase
Follow the JavaScript naming scheme for user interaction (alert, prompt, confirm) as discussed in #1832.
2022-03-17refactor controllersJesse Duffield
2022-03-17controller for viewing sub commitsJesse Duffield
2022-03-17refactor contextsJesse Duffield
2022-03-17more refactoringJesse Duffield
2022-03-17refactor keybindingsJesse Duffield
2022-03-17no more indirectionJesse Duffield
2022-03-17standardise namingJesse Duffield
2022-03-17add actions abstractionJesse Duffield
2022-03-17refactor contexts codeJesse Duffield
2022-03-17fix some thingsJesse Duffield
2022-03-17start moving commit panel handlers into controllerJesse Duffield
more and more move rebase commit refreshing into existing abstraction and more and more WIP and more handling clicks properly fix merge conflicts update cheatsheet lots more preparation to start moving things into controllers WIP better typing expand on remotes controller moving more code into controllers