= Mini project 2024: Easy command history navigation through the History browser panel = || Title: || '''Easy command history navigation through the History browser panel''' || || Student Name: || Linda Karlovska || || Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation] || || Mentor Name: || Anna Petrasova, Martin Landa || || !GitHub Repository: || [https://github.com/lindakladivova view repository] || || Budget: || 1000 € (via GRASS GIS [https://grasswiki.osgeo.org/wiki/Student_Grants Student Grants]) == Abstract == This project builds upon the work initiated during the OSGeo sprint in Prague in the summer of 2023 which involved creating a new History Browser panel facilitating the access to command history. Starting December 8th, the new History Browser panel is already available in the GRASS development version (see the PR https://github.com/OSGeo/grass/pull/3234). However, it offers only a simple single-level display of commands from the history log and the option for launching module dialogs pre-filled based on the command history. == Goal == The core part of the work will be devoted to expanding the basic functionality of the History Browser by providing the following enhancements: - Changing the plain text format of the history log (.wxgui_history) to JSON, allowing more information to be stored for each executed command, such as execution time, runtime duration, status code, region settings, if a mask was set, etc. - Creating a context menu with options for "Run Command" and "Show Info." "Show Info" will display a small dialog about the respective process stored in the JSON file. - Adding a symbol (green checkmark, yellow dot, or red cross) in front of each command in the tree based on the command's status value (completed, in progress, failed). - Branching the tree based on the date of command execution (commands from a specific day could be rolled up). - Filtering commands based on the status (completed, in process, failed) == Timeline == {{{#!th style="background: #ddd" rowspan=2 '''Time Period''' }}} {{{#!th style="background: #ddd" colspan=2 '''Milestones''' }}} |----------------------- {{{#!th style="background: #ddd" Tasks }}} {{{#!th style="background: #ddd" Status }}} |----------------------- {{{#!td January 8 - January 12 \\ ''Week 1'' }}} {{{#!td '''Add pop-up command menu with an item for delete command from history + history tree refactoring''' - https://github.com/OSGeo/grass/pull/3342 }}} {{{#!td \\ Merged \\ }}} |----------------------- {{{#!td January 15 - January 19 \\ ''Week 2'' }}} {{{#!td '''History tree refactoring''' - https://github.com/OSGeo/grass/pull/3342 }}} {{{#!td \\ Merged \\ }}} |----------------------- {{{#!td January 22 - January 26 \\ ''Week 3'' }}} {{{#!td ''' Changing the plain text format of the history log (.wxgui_history) to JSON and showing info about the command from history ''' - https://github.com/OSGeo/grass/pull/3365 }}} {{{#!td \\ In progress \\ }}} |----------------------- {{{#!td January 29 - February 2 \\ ''Week 4'' }}} {{{#!td '''Changing the plain text format of the history log (.wxgui_history) to JSON and showing info about the command from history''' }}} {{{#!td \\ \\ }}} |----------------------- {{{#!td February 5 - February 9 \\ ''Week 5'' }}} {{{#!td '''Showing info about the command from history within expanded command node''' }}} {{{#!td \\ \\ }}} |----------------------- {{{#!td February 12 - February 16 \\ ''Week 6'' }}} {{{#!td '''Adding a symbol in front of each command in the tree based on the command's status (completed, in progress, failed, aborted)''' }}} {{{#!td \\ \\ }}} |----------------------- {{{#!td February 19 - February 23 \\ ''Week 7'' }}} {{{#!td '''Branching the tree based on the date of command execution''' }}} {{{#!td \\ \\ }}} {{{#!td February 26 - March 1 \\ ''Week 8'' }}} {{{#!td '''Filtering commands based on the status''' }}} {{{#!td \\ \\ }}} |----------------------- == Progress reports == == Report for weeks 1 and 2 == '''1) What did I complete?'''\\ The first simple implementation of the history browser panel (peek at https://github.com/OSGeo/grass/pull/3234) had some flaws, mainly in terms of class hierarchy, so a bigger intervention was needed. So, week one was all about making the code neater and more logical. I dived into improving the code quality and logic as part of the PR https://github.com/OSGeo/grass/pull/3342 since in this PR the problematic structure was fully shown. At the beginning of the second week, this PR was successfully merged. Big thanks to Tomas Zigo for the suggestions and testing! In the middle of the second week, I started to prepare the biggest PR of this project https://github.com/OSGeo/grass/pull/3365 which focuses on two things: first, it changes the way how the new history log is stored - newly it is going to be the JSON format. Second, it shows the info about commands - execution time, runtime duration, status, region settings, and if a mask was set. We originally planned to show this info in a new Command Info dialog (see Figure 1), but during the implementations, we decided that it would be cooler to have it right at the bottom of the history browser. '''2) What am I going to achieve for the next two weeks?'''\\ I'm sticking with https://github.com/OSGeo/grass/pull/3365 for the next two weeks. Firstly, the JSON format structure needs revisions. Secondly, I will rework how the info shows up - the info will be shown directly at the bottom of the history browser after calling !OnItemSelected event. As this PR is the most important part of the project, it will probably require a couple of iterations. '''3) Is there any blocking issue?'''\\ No, it isn't. [[Image(first_suggestion_info_dialog.jpg, 1200px, title=Figure 1: The original idea of displaying command info in the separate dialog, align=left)]]