Saturday, July 20, 2019

LabPlot has got some beautifying and lots of datasets

Hello everyone! The second part of this year's GSoC is almost over, so I was due to let you know the progress made in the last 3 weeks. I can assure you we haven't lazed since then. I think I managed to make quite good progress, so everything is going as planned, or I could say that even better. If you haven't read about this year's project or you just want to go through what has already been accomplished you can check out my previous post.

So let's just go through the new things step by step. I'll try to explain the respective feature, and also give examples using videos or screenshots. 

The first step was to improve the welcome screen and make it easily usable, dynamic, clean and intuitive for users. This step was very important since the welcome screen is what the users will first get in contact with when they start using LabPlot. 
We had a great idea, which was to make a screenshot of the main window whenever the user saves a project. This screenshot will be saved with the project itself and will be used as a thumbnail for Recent and Example projects in the welcome screen. The code section, that deals with making and saving the screenshot, is already committed on the master branch. You can see these thumbnails put to use in the following picture:

Thumbnails put to use

As you might recall, when I wrote the last post, the only section of the welcome screen which wasn't functional was the examples section. Implementing this feature was the next step. You could already catch a glimpse of it in the previous picture. Me and my mentors really like QtCreator's Example section, so that's where I got my inspiration. The example projects are shown in a GridView, and they look quite nice, thanks to the thumbnails. Every example project has a name and one or more tags assigned to itself. Just like in QtCreator's approach, the example projects are searchable based on their names and also on one or more tags. There is a search bar providing this functionality. Unfortunately, we didn't manage to create example projects just yet, so I used some temporary projects for implementing and testing, and also these will be shown in the following demo video:

 
The functionality of the Example Projects section

The next step was to make the section and also their content more dynamic. In my last post, these sections/widgets (whichever name you prefer) were static, having a fixed size and their content wasn't adapting really well to the resizing of the main window. As I said that was only a prototype. During the last weeks, I managed to make it really dynamic, as a modern welcome screen should be. The result is pretty nice, at least according to my mentors :). So how does this work? When the user drags the mouse over the frame of a section a line appears, with which the user can easily resize a section just by dragging it. If the user doesn't like the layout he/she created, it can always be reset to the original layout. You can see how it works in the next video:

  
Resizing the welcome screen and its content

Another new feature is also connected to the welcome screen. I made it possible for LabPlot to save the layout of the welcome screen whenever it's closed (either because opening/creating a project or because of closing the application). When the welcome screen is displayed next time, it's layout isn't the standard one (to which the user can reset the current layout in the settings) but the saved one. It seemed a good idea and it might be useful since no one would modify the layout, if he/she liked it. This feature is presented in the next video:

  
Save welcome screen's layout

Lastly but not least, the welcome screen got another new feature. Now the user can maximize a section, so he/she can interact with the given section much more easily. When the section doesn't need to be maximized, then the user can minimize it and the former layout is restored. This function is particularly useful since there are many sections and they might not be big enough without the others getting particularly small. This was the issue that resulted in figuring out and implementing this idea. The maximizing and minimizing can be done with the icon in the upper-left corner of every section. In addition to this, I also added a go forward and go backwards icon/button to the "Release section" since its implemented using a WebView and users can navigate away from the starting page:

 
Maximizing&Minimizng the welcome screen's widgets

Some other changes were made to the categorizing of datasets too. We thought it would be better to organise the datasets into collections (for example collection of R Datasets etc.) then into categories and subcategories. This made possible having a single file for a dataset collection, rather than having a metadata file for every dataset (as it previously was implemented). This, of course, caused some changes in the ImportDatasetWidget and DatasetMetadataManagerWidget, but their functionality stayed the same:

 
Changes on ImportDatasetWidget and DatasetMetadataManagerWidget

As you might remember from the post, our main problem was that uploading with KNS3 is disabled for an indefinite amount of time due to errors caused by the library. This made us question whether we should use it at all or not. Given the mentioned problem and the fact that we found the library's functionality quite limited for our purposes, we decided not to use it. Instead, we'll provide a considerable collection of datasets, which should suffice. I already managed to collect and categorize not less than 1000 datasets. And I'm planning to collect some more.

Finally, I'd like to say some words about the next steps. We still have to make some "real" example projects so the users can explore the possibilities provided by LabPlot. I'll have to proceed with the collecting of datasets, in order to provide the users of LabPlot with a considerable dataset collection. As the finish line is getting closer, there won't be new "big features", maybe some minor new ideas, if some will come up, but instead I'd like to focus on cleaning, documenting, refactoring and optimising the code so it will be fit to be brought to the master branch.  I'd also like to search for hidden bugs and errors, to make the new and already implemented features more or less flawless. Some tests should also be written for the dataset management part of the code.

This is it for now. I will continue to work on the project alongside Kristóf and Alexander. I truly enjoy working with them, mostly the "brainstorming part", I think we form a quite good team. I'm thankful to them, for their guidance. When anything new will be finished and running I'll let you know. 

See you soon!
Bye!


No comments:

Post a Comment