8476 Commits

Author SHA1 Message Date
Ghostkeeper
8c086b9fd7
Align everything to top
This seems to be the alignment in the design. Also gets rid of binding loops because we automatically adjust the height so you can't align to the centre or the bottom then.

Contributes to issue CURA-8561.
2021-11-09 15:58:37 +01:00
Ghostkeeper
abe8347523
Fix QML warning about not having parents
It seems that the ListView doesn't always set the parent element correctly if it's not yet in view. This is a workaround that seems to work fine to remove the QML warnings about parent not being defined.

Contributes to issue CURA-8561.
2021-11-09 15:54:42 +01:00
Ghostkeeper
2ce31d0e71
Add placeholder image
The 'CicleOutline' image doesn't exist. There is no design for this image so I'm adding the placeholder that the previous Marketplace had.

Contributes to issue CURA-8561.
2021-11-09 15:51:34 +01:00
Ghostkeeper
4014562cdc
Use rows and columns instead of anchors for layout
This is in my opinion much easier to follow and maintain.

It also fixes the layout. The original code had a lot of overlapping parts.

Contributes to issue CURA-8561.
2021-11-09 15:47:09 +01:00
Ghostkeeper
e0508b0f4f
Correct size and margins for package icon
Contributes to issue CURA-8561.
2021-11-09 15:08:33 +01:00
Remco Burema
bb51dc7d14
Gather and show required information.
Also add 'Downalod' icon. Still very much WIP and nonfunctional.

part of CURA-8561
2021-11-05 18:44:31 +01:00
Lorenzo Romagnoli
2cdda695e9
adjusted style of hover and button sizes (#10739)
adjusted style of hover and button sizes

Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2021-11-05 10:15:35 +01:00
Remco Burema
e93ecd3699
Move what is already there of 'package card' to it's own file.
part of CURA-8561
2021-11-05 09:26:27 +01:00
Jelle Spijker
a0467cd66f
Fixed hard crash when deconstructing RemotePackageList while parsing
Contributes to CURA-8558
2021-11-04 10:39:00 +01:00
Jelle Spijker
fd409215c4
Tooltip shows point
Per UX request

Contributes to CURA-8558
2021-11-04 10:05:35 +01:00
Jelle Spijker
cbf83e500d
Changed behaviour of hoover over button
Per request of UX

Contributes to CURA-8558
2021-11-04 10:04:59 +01:00
Jelle Spijker
a58891ce58
Fixed the loading spinner not spinning at first construction
Contributes to CURA-8558
2021-11-04 08:23:47 +01:00
Jelle Spijker
11b3b08198
Implemented code review suggestions
Contributes to CURA-8558
2021-11-04 08:23:46 +01:00
Jelle Spijker
e01e47b8fa
Performance increase for obtaining LocalPackages
The speed increase on the function when running Yappi
`LocalPackageList.updatePackages`
| original | now  |
|----------|------|
|  14 ms   | 4 ms |

Contributes to CURA-8558
2021-11-04 08:23:46 +01:00
Jelle Spijker
3a94fc0ced
Apply suggestions from code review
Applied code review comments

Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2021-11-03 17:58:16 +01:00
Jelle Spijker
e7aecb6c06
Fixed mypy typing failure
@ghostkeeper being nerd snipped
It's giving that typing failure because the section variable is re-used.
First as elements from self._getSections (strs) and then as elements
from sorted_sections.values() (List[PackageModel]s). Python has no
variable scopes within functions so the variable still exists after the
first for loop.

Contributes to CURA-8558
2021-11-03 16:29:35 +01:00
Jelle Spijker
07fcf8b533
Fixed missing qoutes
:face_palm:

Contributes to CURA-8558
2021-11-03 16:01:43 +01:00
Jelle Spijker
8785198a0e
Merge branch 'marketplace_redesign' into CURA-8558_introduce_manage_package_list 2021-11-03 15:54:40 +01:00
j.spijker@ultimaker.com
f9f43b79b0
Don't pollute the package_info with section_title
The previous implementation added a section_title to the package_info
which was also stored in the packages.json. The section_title is now
provided to the PackageModel as an extra optional argument.

Contributes to CURA-8558
2021-11-03 15:15:46 +01:00
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