summaryrefslogtreecommitdiffstats
path: root/src/process/process_module.rs
AgeCommit message (Collapse)Author
2021-06-19Rename ProcessModule to ModuleTim Oram
2021-06-17Remove modules creation from process moduleTim Oram
Move the initialization of the different modules from the process module and instead do the initialization in the main function.
2021-06-17Remove public module refs from process moduleTim Oram
2021-06-17Remove public module refs from view moduleTim Oram
2021-06-12Move the render stage to a separate threadTim Oram
This decouples the render of the view from the process loop and renders the view in a separate thread.
2021-06-12Remove RenderContext from input handlingTim Oram
Remove the remaining cases of the RenderContext from the input handling functions and remove the parameter.
2021-06-12Refactor external editor command runningTim Oram
Move the triggering of the external command to the process module and refactor external editor to use it instead. This also allows the view to be removed from all modules.
2021-06-12Convert from inputs to eventsTim Oram
2021-06-12Move input reading from viewTim Oram
2021-06-12Add render contextTim Oram
Add a render context to move towards not passing the view into the modules. The render context currently contains information around the size of the view.
2021-06-12Avoid view_data resize in modulesTim Oram
Instead of having every module perform a resize of the view_data, return a mutable reference and have the view do a resize in all cases where possible.
2021-03-23Componentize the help systemTim Oram
This moves the help system out of the process module and into a reusable component.
2021-03-07Add support for multiple key bindingsTim Oram
This allows a user to provide a list of key bindings for a particular action.
2021-02-04Update rustfmt configuration with new optionsTim Oram
Re-evaluate the configurations for rustfmt, make some changes and reformat everything. The biggest change is how imports are formatted.
2021-01-27Rewrite display and input to use CrosstermTim Oram
The project has pushed the limits of what curses can support on Windows systems. Crossterm has far superior support for creating cross platform TUI applications.
2021-01-27Add mutable to cursesTim Oram
2020-11-21Make ProcessModule::handle_input requiredTim Oram
Update the ProcessModule trait to make the handle_input function a required function on structs that implement the trait.
2020-11-18Add tests for process::help and fix some issuesTim Oram
2020-10-29Move git interactive to todo file moduleTim Oram
The GitInteractive stuct is one of the oldest structs in the project and was initially used as a catch-all for any functionality that was shared across the application. Overtime the functionality of this file has been moved into the various modules of the project. At this point, the only thing the struct handles is the direct interactions with the rebase todo file and it's lines. This finally moves the global stuct into a module.
2020-10-25Remove process function from process moduleTim Oram
The process function from the process module was only being used in the external editor system. The usage in the external editor system was only used as a faux on activate hook. Since the existing activate function can instead be used to perform the same action, the process function can be removed. This change removes the last usage of the process function and then completely removes the usage of the process function from the project.
2020-10-01Convert activate to use ProcessResultTim Oram
The way that Result was used to handle errors in activate does not allow an error to return the user to another state. This converts the activate function to use ProcessResult that supports error results and state change.
2020-09-21Use anyhow in process module traitTim Oram
Update the activate function in the process module trait to use anyhow for error handling and update any usages of the error to use the new error type.
2020-09-20Refactor and test external editorTim Oram
The external editor module has not seen any attention in some time and was showing some warts. This refactors the module to remove some dead code and unneeded complexity. This allowed for the error process result to be simplified, view to not be provided to the process function and for two of the internal states to be removed/combined. Tests have also been added to ensure that the module works as expected.
2020-09-19DRY up process moduleTim Oram
The process module has always been fairly repetitive and adding a new module required updates to several places in the file. This change refactors the process module to use dynamic dispatch to call the functions on the ProcessModule trait dynamically. This required the error, help and window size error systems to be modified to implement the ProcessModule. The show commit module has been refactored to use the error module. And the state and modules have been extracted into their own Modules struct.
2020-09-17Move error handling to process moduleTim Oram
The error handling module needed to have state provided to it from other modules, which meant that the other modules needed to understand how the error module worked. This was awkward and fragile. This moves the error handling code into the process module and makes it a global system. This has the advantage of not requiring tracking of the previous state and allows for the removal of the HandleInputResult struct.
2020-09-02Refactor help to not be a process moduleTim Oram
The help process module always needed to have knowledge of the different modules in the project, which was very awkward. This updates the help system to be part of the process module and moves the help data into the modules. This also allowed the removal of the visual boolean on the List state, that was only used when rendering the help module.
2020-09-01Remove RefCell for state in Process moduleTim Oram
The RefCell in the Process module was no longer needed, so remove it.
2020-09-01Cleanup the render stage in the Process moduleTim Oram
This reworks the interaction between the Process and View module.
2020-07-29Remove most usages of pub(crate)Tim Oram
I was overzealous in my application of `pub(crate)` in a project that does not provide an external library. This removes most of the usages of `pub(crate)`, though I am sure there are more that could be safely converted to use `pub`.
2020-07-29Enable all rustc lintsTim Oram
2019-12-28Update visibility to be required minimumTim Oram
This change updates the usages of `pub` to be the minimum level of visibility needed. This also required cleaning up some of the use statements to use a simpler set of imports.
2019-07-03Move remaining code form application to processTim Oram
2019-06-04Move process loop out of applicationTim Oram