507 Commits

Author SHA1 Message Date
j.spijker@ultimaker.com
edc71f12a3
Updated documentation and typing
Contributes to CURA-8558
2021-11-03 15:15:46 +01:00
j.spijker@ultimaker.com
0218703592
To be installed packages are still listed for the current session
A user might still need to interact with a **to be installed** package.
But the current package list doesn't list that package anymore.

Introduced a `getPackagesToInstall()` method in the Uranium PackageManager
to circumvent this issue.

Contributes to CURA-8558
2021-11-03 15:15:45 +01:00
j.spijker@ultimaker.com
080e3b9f27
To be removed packages are still listed for the current session
A user might still need to interact with a **to be removed** package and
it is also still being used in the current Cura session. But the current
package list doesn't list that package anymore.

Introduced a `getPackagesToRemove()` method in the Uranium PackageManager
to circumvent this issue.

Contributes to CURA-8558
2021-11-03 15:15:45 +01:00
j.spijker@ultimaker.com
8fad2e0f39
Changed section header for Installed Plugins
As agreed with UX changed: `Installed Cura Plugins` to `Installed Plugins`

Contributes to CURA-8558
2021-11-03 15:15:45 +01:00
Jaime van Kessel
7c5bfef318 Fix crash when switching between material & plugin tab 2021-11-02 16:47:08 +01:00
j.spijker@ultimaker.com
5db6e50dee
Fixed typo
not plug-ins but plugins

Contributes to CURA-8558
2021-11-02 16:21:27 +01:00
j.spijker@ultimaker.com
1b7b0b9caf
Sort the different sections and packages
The order in which UX defined the different sections are:
- Installed Cura Plugins
- Installed Materials
- Bundled Plugins
- Bundled Materials

All packages need to be order at least by section, but I also took
the liberty to sort the packages in these sections by Alphabet.

Contributes to CURA-8558
2021-11-02 16:21:27 +01:00
j.spijker@ultimaker.com
3f700e5d0c
Only show Footer when the packagelist is paginated
It doesn't make sense to show a footer when items are retrieved in one
go. Except when an error occurs.

Contributes to CURA-8558
2021-11-02 14:34:36 +01:00
j.spijker@ultimaker.com
c4c99f6657
Added sections to the packagelists
By providing a `section_title` with a string to the `package_data`
packages can be subdivided in sections, each with its own header.
For remote packages this will be `None` and therefore no sections are
created there.

Contributes to CURA-8558
2021-11-02 14:34:35 +01:00
j.spijker@ultimaker.com
397baebda4
Changed deprecated qml syntax
Contributes to CURA-8558
2021-11-02 14:34:35 +01:00
j.spijker@ultimaker.com
b53a9840f3
Moved ManagePackagesButton to its own file
For better readability

Contributes to CURA-8558
2021-11-02 14:34:35 +01:00
Jelle Spijker
86d5d315bc
Differentiate between local and remote packages
There is a distinction between packages which are already
installed on the local machine and packages which are
available on the remote server. Even with this difference
it is important that they are handled the same and can be
reused in the same GUI elements.

In order to reduce code duplication I created a parent object
PackageList which contains the base logic and interface for
the QML and let both RemotePackageList and LocalPackageList
inherit from this.

UX specified that the gear icon (Settings.svg) should be
separate from the tabs of material and plugins. This also
ment that the current tab  item couldn't set the pageTitle
anymore. This is now defined in the Package component and
set when the loader has loaded the external QML file.

Contributes to CURA-8558
2021-11-01 17:12:18 +01:00
Ghostkeeper
03e1fc34b4
Change page title depending on selected tab
Contributes to issue CURA-8557.
2021-10-29 15:51:41 +02:00
Jaime van Kessel
7e674a18b3 Change the logging of operationcancelled to debug instead of error
THe operation being cancelled is not an error; it's an expected action, since
it happens after the user closes the window.

CURA-8557
2021-10-29 11:34:11 +02:00
Jaime van Kessel
afe9c0c633 Change naming from plugin to packages
CURA-8557
2021-10-29 11:22:00 +02:00
Ghostkeeper
3e64b7cb66
Abort request when PackageList gets deleted
This is a consequence of lazy loading and the re-loading we do when the Marketplace window gets closed. This solves a crash with reproduction steps:
1. Open the Marketplace.
2. Quickly close the Marketplace.
3. Quickly re-open the Marketplace.
4. The API responds to the request made by the first opening of the Marketplace.

This crashed because when the Marketplace first opened, it made a request to the API with the HttpRequestManager. This request takes a while to respond to. If you close and re-open the Marketplace, the PackageList gets destroyed and a new one gets made. The HttpRequestManager eventually gets a response and wants to call the callback of the first PackageList, but that one got destroyed in the Qt engine so it'll throw an error saying that the object doesn't exist any more.

Contributes to issue CURA-8557.
2021-10-29 10:10:57 +02:00
Ghostkeeper
4b86f7bb29
Revert "Only show plugin and material packages"
This reverts commit cdf05a56065321d9fc15767490d846680f3dc63f.
It's no longer necessary since we filter on package type now anyway.

Contributes to issue CURA-8557.
2021-10-28 21:45:58 +02:00
Ghostkeeper
cbd1b8fbf7
Implement filter on PackageList
The filter affects the URL. So we can't just start a request in the init. We need to request once all of the properties have been set.
We also can't start the request when the filter changes, because there will be more filters and we don't want to start multiple requests. It needs to be manual.

Contributes to issue CURA-8557.
2021-10-28 18:59:03 +02:00
Ghostkeeper
4191f98440
Switch pages to Materials when tab is clicked
And back to plug-ins when that tab is clicked.
Sadly, linking the content dynamically doesn't seem to work, with a custom property.

Contributes to issue CURA-8557.
2021-10-28 18:23:14 +02:00
Ghostkeeper
5f884321ea
Add design for tabs of package type selector
The width here is implementation-defined. Looks like it matches the design though. Seems like the design has 0 margins.

Contributes to issue CURA-8557.
2021-10-28 18:08:51 +02:00
Ghostkeeper
38b7f17615
Add basic tab bar to select pages
Contributes to issue CURA-8557.
2021-10-28 17:49:32 +02:00
Ghostkeeper
c31665f069
Move list of packages QML to a re-usable component
We'll need to have the same design for plug-ins and for materials.

Contributes to issue CURA-8557.
2021-10-28 17:34:55 +02:00
Jelle Spijker
cdf05a5606
Only show plugin and material packages
It was showing all packages available in the marketplace.
This included `cloud` DF integrations. It will now filter
on packages and plugins.

Contributes to CURA-8556
2021-10-28 16:08:51 +02:00
Jelle Spijker
31dcf21a3e
Disable horizontal scrollbar
The layout of the plugin/material cards should take care
of the text and rendering. The dimensions of these cards
therefor should not require a horizontal scrollbar
2021-10-28 16:08:51 +02:00
Remco Burema
e3d90f16a1
Close new marketplace window when signing out or in
Because otherwise you can either see plugins you might not have the rights to, or not see plugins you do have the rights to.

part of CURA-8556
2021-10-27 17:42:00 +02:00
Jaime van Kessel
7bbc91b7a5 Clear contents of net marketplace if window is closed
CURA-8556
2021-10-27 16:11:02 +02:00
Ghostkeeper
a3c364d65a
Clarify import documentation
Contributes to issue CURA-8556.
2021-10-25 16:28:25 +02:00
Ghostkeeper
2d434a02e3
Align horizontal position of label to pixels
Contributes to issue CURA-8556.
2021-10-25 16:24:49 +02:00
Ghostkeeper
f14a512718
Use ListView instead of Column
The ListView works in mostly the same way, except it loads its contents asynchronously as they come into view.

Contributes to issue CURA-8556.
2021-10-25 16:17:23 +02:00
Ghostkeeper
6b6b6f613f
Remove superfluous pyqtSlot marking
This can already be set via the isLoading property. What's more, it really only ever needs to be called from Python. I just added the fset because we have the setter anyway.

Contributes to issue CURA-8556.
2021-10-25 15:43:41 +02:00
Ghostkeeper
476321be5c
Remove log entry for when Marketplace QML fails to load
This is already logged with a warning by the QML engine.

Contributes to issue CURA-8556.
2021-10-25 15:38:54 +02:00
Ghostkeeper
77d1bebbdb
Put PackageList in Marketplace namespace
This way it's not available to the rest of Cura, especially since PackageList is not such an uncommon name. It could give name collisions. Moreover, the rest of Cura doesn't need to have a list of packages from the Marketplace, so it's better separation.

Contributes to issue CURA-8556.
2021-10-25 15:35:28 +02:00
Jaime van Kessel
43b8476572 Remove unneeded parenthesis
CURA-8556
2021-10-25 10:38:36 +02:00
Jaime van Kessel
37ccf5b823 Add missing return types on init
CURA-8556
2021-10-25 10:37:02 +02:00
Ghostkeeper
daf450142b
Implement error handling and showing error state
If an error occurs, the error message is stored in the list model, so that it can be shown with the list.

Contributes to issue CURA-8556.
2021-10-25 01:56:57 +02:00
Ghostkeeper
bca2f36186
Use states rather than individually switching properties
This is necessary because we'll add a fourth state here: An error state. This would get quite complex otherwise.

Contributes to issue CURA-8556.
2021-10-25 01:28:37 +02:00
Ghostkeeper
1ab677f5dd
Add state for when it's loading
This has a slight bug in that the icon will immediately change to an arrow once loading has completed, but will slowly rotate back to angle 0. You don't see this, since the new plug-ins will come in between. The new plug-ins will always be a full page, or otherwise the icon disappears altogether and it's not visible anyway. But if you hold down the scrollbar while loading and quickly scroll down when loading completed, you can see this happen. I don't think anyone will really mind though.

Contributes to issue CURA-8556.
2021-10-21 18:37:02 +02:00
Ghostkeeper
e3cd5606f0
Make load more button load more packages
This adds the functionality of the button.

Contributes to issue CURA-8556.
2021-10-21 18:26:29 +02:00
Ghostkeeper
46ad1ad077
Add disabled state for load more button
Can't click on the button then.

Contributes to issue CURA-8556.
2021-10-21 18:25:33 +02:00
Ghostkeeper
8776294932
Set loading state to False once parsing has completed
This allows the user to request the next one.

Contributes to issue CURA-8556.
2021-10-21 18:23:19 +02:00
Ghostkeeper
35ec8f7190
Add basic layout for button to load more packages
Contributes to issue CURA-8556.
2021-10-21 18:06:52 +02:00
Ghostkeeper
27da03d862
Add a property to see whether there are any more packages to load
Contributes to issue CURA-8556.
2021-10-21 17:10:32 +02:00
Ghostkeeper
1320d8c9f4
Add a simplistic design for a card for each package
It just displays the package name for now.

Contributes to issue CURA-8556.
2021-10-21 17:09:12 +02:00
Ghostkeeper
031c8efbe6
Implement pagination for package list
The simplest way I can think of.
Currently we only call the request function once, so we can only get the first page. Before calling it multiple times, we should check if there are more pages by checking if the request URL is an empty string.

Contributes to issue CURA-8556.
2021-10-21 16:56:53 +02:00
Ghostkeeper
b585c02207
Add background to page content, and restructure margins
To display the background across the entire bottom side and not with the margins of the column, we have to restructure where the margins are a bit.

Contributes to issue CURA-8556.
2021-10-21 16:35:54 +02:00
Ghostkeeper
38038b3752
Store items directly in listModel when parsing them
No need to use a custom list in Python and update the ListModel from that. This is much simpler and more efficient.

Contributes to issue CURA-8556.
2021-10-21 16:10:23 +02:00
Ghostkeeper
6415a2649e
Parse responses from package API call
Only positive responses so far. Error handling is not implemented yet.

Contributes to issue CURA-8556.
2021-10-21 16:02:46 +02:00
Ghostkeeper
3138452f94
Allow PackageList to be used as a model from QML
QML is leading here and holding the pointers for creation and destruction.

Contributes to issue CURA-8556.
2021-10-21 15:46:46 +02:00
Ghostkeeper
4337e81b77
Make request to Marketplace API when package list loads
We don't parse the response just yet, but this is part of the work.

Contributes to issue CURA-8556.
2021-10-21 15:33:37 +02:00
Ghostkeeper
5851ad52c6
Add property to tell if the list is currently loading or loading more
We'll need to display a spinner of some kind in the front-end, I think.

Contributes to issue CURA-8556.
2021-10-21 15:15:56 +02:00