I couldn't get it to truncate it if the double ellipsis is the only text on the line, like if the description contains a white line and more than 2 lines in total. It then looks like a double ellipsis (6 dots instead of 3). Doesn't look the worst, but a bit strange, but it's really difficult to fix.
Contributes to issue CURA-8561.
It seems to correctly place the elide character now. One more detail that's incorrect is that it shows two elision characters if it's eliding due to maximum line count. I'll see what I can do...
Contributes to issue CURA-8561.
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.
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.
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.
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.
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
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
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.
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.
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.
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.
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
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.
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.