Version 47 (modified by 3 years ago) ( diff ) | ,
---|
GSoC 2021: First steps towards a new GRASS GIS Single-Window GUI
Title: | First steps towards a new GRASS GIS Single-Window GUI |
Student Name: | Linda Kladivova |
Organization: | OSGeo - Open Source Geospatial Foundation |
Mentor Name: | Anna Petrasova, Martin Landa, Vaclav Petras, Stefan Blumentrath |
GSoC proposal: | View proposal |
GitHub Repository: | view repository |
Abstract
This project will mainly focus on extensive Graphical User Interface (GUI) refactoring necessary to prepare GRASS GIS for Single-Window GUI. As the result, I will introduce a very simple Single-Window layout and importantly a good programming base allowing further convenient extension and improvement with additional functions.
Goal
The goal is to create a simple Single-Window GUI (the standard solution in most of the software) which ensures all panels in the form of dockable panes to be visible immediately after startup. Of course, especially long-term users can prefer the existing Multi-Window GUI, so the original option will be retained. For more information, please have a look at a separate page where I present a proposal in detail: https://trac.osgeo.org/grass/wiki/wxGUIDevelopment/SingleWindow.
To sum up the schedule: From June 7th to June 20th (2 weeks), I plan to work on the GUI refactoring - separation of main GUI window code, creating a new Workspace Manager as well as a new Layer Manager class. From June 21st to July 11th (3 weeks) I plan to create a new Map Display panel needed for the Single-Window layout and to adapt toolbars in other panels (this would also be the topic for the first evaluation). From July 12th to July 25th (2 weeks) I will work on general factory class allowing me to preserve a Multi-Window layout as well as to create a new Single-Window layout. From July 26th to August 22th (4 weeks) I will work on the integration of all panels (Data, Display, Modules, Console, Python, Map Display notebook) to a basic Single-Window structure.
Timeline
Time Period | Milestones | |
---|---|---|
Tasks | Status | |
May 17 - 6 June |
|
|
June 7 - June 13 | The basic skeleton: arrangement of basic widgets
|
|
June 14 - June 20 | wxGUI refactoring
|
|
June 21 - June 27 | wxGUI refactoring
|
|
June 28 - July 4 | wxGUI refactoring:
|
|
July5 - July 11 | Map Display notebook pane:
| |
July 12 - July 18 | Adapting the code for Single-Window GUI:
| evaluation |
July 19 - July 25 | Adapting the code for Single-Window GUI:
| |
July 26 - August 1 | Simple Single-Window GUI:
| |
August 2 - August 8 | Simple Single-Window GUI:
| |
August 9 - August 15 | Finishing up, testing, documentation | |
August 16 - August22 |
| |
Bonding period report
Introduce myself in dev list, get in contact with my mentors and discuss the design of functions
After being accepted as a student for GSoC 2021, on May 25 I introduced myself and my project to grass dev lists (1). I also set up the video call with my mentors - Anna Petrasova, Vaclav Petras, Martin Landa, and Stefan Blumentrath that I already well know from the previous year, and our other cooperation regarding my master thesis. We met on May 25 and discussed various Single-Window GUI options and their possible shortcomings. We decided to set up a parallel environment determined for the independent Single-Window layout development. Finally, we agreed on our regular video call time (once per two weeks).
Prepare the wiki page about the project
I created my project wiki page (2) and added the link to the GSoC 2021 Accepted proposals page (3). The wiki page includes - General information about the project (title, mentors, links to the proposal and GitHub repository, etc.), a brief description of the project, goal, and timeline of tasks and deliverables.
I will keep my wiki page up to date and will add weekly reports following the instructions in the GSoC Recommendations for Student page (4).
Set up the GitHub repository of the project
I already have GitHub GRASS fork in usage (5) so I only added the link to the GSoC 2021 Accepted proposals page (3), to my wiki page (2) and shared it with my mentors. My repository is licensed under the GNU General Public License v3.0, according to the license of GRASS GIS.
Two PRs regarding Single-Window GUI already merged
The first PR https://github.com/OSGeo/grass/pull/1591 deals with general refactoring. The second one creates the parallel environment where I am gonna further independently develop the Single-Window GUI, see https://github.com/OSGeo/grass/pull/1604. I also created the PR https://github.com/OSGeo/grass/pull/1598 enhancing GRASS for version 8.0. It implements easier switching between mapsets in different locations since we would like GRASS to be as user-friendly as possible. All mentioned PRs are already merged to master. Meantime, I played with wx.aui demo in order to create a prototype of the Single-Window GRASS GUI. However, it is still not decided if we use wx.lib.agw.aui python library or traditional wx.aui C++ library. Therefore, I also compared those approaches. The traditional wx.AUI seems the same in terms of functionality except missing pane minimizing. Next week we need to decide which attitude should be selected.
Plans for next week:
- Start developing Single-Window GUI
- Integrate main parts that do not involve much refactoring
- Have a meeting with mentors on Wednesday
- Decide which library will be used (but could be probably changed even later)
(1) https://lists.osgeo.org/pipermail/grass-dev/2021-May/095168.html
(2) https://trac.osgeo.org/grass/wiki/GSoC/2021/SingleWindowLayout
(3) https://wiki.osgeo.org/wiki/Google_Summer_of_Code_2021_Accepted
(4) https://wiki.osgeo.org/wiki/Google_Summer_of_Code_Recommendations_for_Students
(5) https://github.com/lindakladivova/grass
Weekly reports
Week 1
1) What did I complete this week?
This week I started to develop Single-Window GUI in the prepared parallel environment. I arranged basic widgets (Data Catalog, Display, Modules, Console, Python), you can have a look at this PR: https://github.com/OSGeo/grass/pull/1621. After a discussion with mentors and other members of the GRASS community, it was finally decided to use Map Display as the center content pane. At the same time, we decided to use the python wx.lib.agw.aui library for Single-Window GUI development. This library contains a bunch of interesting functions as e.g. grouping dockable panes into notebooks. The state after the arrangement of the basic widgets looks as follows:
At the same time, I also fixed a bug https://github.com/OSGeo/grass/issues/1636 (https://github.com/OSGeo/grass/pull/1637).
2) What am I going to achieve for next week?
The task for the next week will be to allow to create a new Map Display as a wx.Panel (now it is only in the form of wx.Frame) and integrate this Map Display as a center content pane.
3) Is there any blocking issue?
No, it isn't.
Week 2
1) What did I complete this week?
I focused on the GUI refactoring. In order to add Map Display to the notebook widget, we need to have it in the form of wx.Panel. I divided the work into several steps.
- This week I changed the way of creating Map Display status bar (which is now independent of the parent widget) - https://github.com/OSGeo/grass/pull/1646.
- However, this PR caused the bug related to the workspace saving(https://github.com/OSGeo/grass/issues/1657) which I corrected ASAP (by https://github.com/OSGeo/grass/pull/1665).
- Meantime, I started more complex PR changing the way the Map Display is built (see https://github.com/OSGeo/grass/pull/1656). The core lies in adding the intermediate wx.Panel widget. This PR aims at more general refactoring of Map Display creation, do not change the code in the Single Layout parallel environment - adapting the S-W GUI is planned to be another step forward.
2) What am I going to achieve for next week?
I plan to finish the refactoring of Map Display related stuff (see https://github.com/OSGeo/grass/pull/1656) and utilize it in the Single-Window GUI environment. It will lead to a new Map Display notebook widget (composed of wx.Panel Map Displays). This notebook will be then used as the content pane.
3) Is there any blocking issue?
No, it isn't.
Week 3
1) What did I complete this week?
I focused on the GUI refactoring. In order to add Map Display to the notebook widget, we need to have it in the form of wx.Panel. This week I worked quite hard on the main refactoring PR (see https://github.com/OSGeo/grass/pull/1675). The core lies in adding the intermediate wx.Panel widget. However, this PR influences quite many things much more than we first expected. I am changing the way how Map Display is built which has an impact on single map display stuff as well as double frame stuff. So that, this PR also requires very intense testing since all things then go straight to the master - adapting the independent Single-Window GUI environment is planned to be another step forward.
2) What am I going to achieve for next week?
I plan to finish the refactoring of Map Display related stuff (see https://github.com/OSGeo/grass/pull/1675) and test this PR very intensively.
3) Is there any blocking issue?
No, it is not. However, next week on Saturday I am going on four day holiday to Slovakia. I hope I will be able to merge this big refactoring PR by Friday.
Week 4
1) What did I complete this week?
As the last week, I focused on the GUI refactoring. I worked on the main refactoring PR (see https://github.com/OSGeo/grass/pull/1675). In terms of the main Map Display I am done here. However, me and mentors realized that changes influence also other Map Frames - particularly g.gui.rdigit, d.mon, Map Swipe, Ground Control Point and IClass frame.
There were two ways to proceed. First, I started with the statusbars for all the frames that we need newly to be created based on wx.Statubar widget (see https://github.com/OSGeo/grass/pull/1689). Then we came up with another concept, namely delegating methods using metaprogramming. Although this path seemed cheap at first (we talked about it very intensively on videocall on Wednesday), after a few hours of studying, we came to the conclusion that it is inappropriate in our case. And this decision again opened PR https://github.com/OSGeo/grass/pull/1689.
Meantime, I also discovered the bug related to hiding statusbar and toolbars that does not work properly for above-mentioned map frames as e.g. Map Swipe. I set up the issue for it (see https://github.com/OSGeo/grass/issues/1691).
To sum it up, this week was not so productive in terms of code, but key in determining what to do next.
2) What am I going to achieve for next week?
In the next step, the focus will be on the completion of https://github.com/OSGeo/grass/pull/1689, which will then allow the completion of the large https://github.com/OSGeo/grass/pull/1675.
3) Is there any blocking issue?
No, it is not. However, as I have already mentioned I am on holiday till Tuesday... and I am looking forward to new energy coming after the rest. :-)
Week 5
1) What did I complete this week?
2) What am I going to achieve for next week?
3) Is there any blocking issue?
Week 6
1) What did I complete this week?
2) What am I going to achieve for next week?
3) Is there any blocking issue?
Week 7
1) What did I complete this week?
2) What am I going to achieve for next week?
3) Is there any blocking issue?
Week 8
1) What did I complete this week?
2) What am I going to achieve for next week?
3) Is there any blocking issue?
Week 9
1) What did I complete this week?
2) What am I going to achieve for next week?
3) Is there any blocking issue?
Week 10
1) What did I complete this week?
2) What am I going to achieve for next week?
3) Is there any blocking issue?
Week 11
1) What did I complete this week?
2) What am I going to achieve for next week?
3) Is there any blocking issue?
Final Report
Attachments (8)
-
single_layout_week1.png
(117.5 KB
) - added by 4 years ago.
Arrangement of the widgets except Map Display
-
startuplayout.png
(408.0 KB
) - added by 3 years ago.
Single-Window GUI startup layout
-
startupGUI.jpg
(351.7 KB
) - added by 3 years ago.
Single-Window GUI startup layout after merging PRs #17853 and #1785
-
two_tabs_side_by_side(1).jpg
(281.5 KB
) - added by 3 years ago.
Map displays can be placed side by side
-
another_arrangement.jpg
(205.9 KB
) - added by 3 years ago.
Example of another possible widget arrangement
-
another_possible_arrangement.jpg
(240.8 KB
) - added by 3 years ago.
Example of another possible widget arrangement
-
all_panes_minimized.jpg
(255.1 KB
) - added by 3 years ago.
All panes are minimized
-
multi-window.PNG
(253.2 KB
) - added by 3 years ago.
Multi-Window GUI