358 Commits

Author SHA1 Message Date
Remco Burema
c1f2da8820
Layout fixes.
Prevent 'height' based binding loops.

part of CURA-8561
2021-11-11 17:30:43 +01:00
Remco Burema
51de234082
Links, hovers, ensmallify layout.
part of CURA-8561
2021-11-10 18:09:36 +01:00
10r3n20
887ac4aef8 Merge branch 'CURA-8561_introduce_plugin_card' of github.com:ultimaker/cura into marketplace_redesign 2021-11-10 09:56:22 +01:00
Ghostkeeper
1efdd9205b
Use primary colour for verified icon
Contributes to issue CURA-8561.
2021-11-09 17:47:32 +01:00
Ghostkeeper
d186912596
Correcter font sizes according to design
Contributes to issue CURA-8561.
2021-11-09 17:45:44 +01:00
Ghostkeeper
d526e3be8c
Easier layout shifting when icons are invisible
The Row element automatically hides them and removes any spacing if they are invisible.

Contributes to issue CURA-8561.
2021-11-09 17:40:10 +01:00
Ghostkeeper
f498952830
Give text colours to text
This way it's still visible in the dark theme, rather than black on black.

Contributes to issue CURA-8561.
2021-11-09 17:32:22 +01:00
Ghostkeeper
4119cf4209
Fix layout of author button
Bold, correct position and add the icon.

Contributes to issue CURA-8561.
2021-11-09 17:30:52 +01:00
Ghostkeeper
234475547e
Use correct font for all text elements
Contributes to issue CURA-8561.
2021-11-09 17:25:02 +01:00
Ghostkeeper
c56240f276
Use correct icon for external links
Contributes to issue CURA-8561.
2021-11-09 17:22:01 +01:00
Ghostkeeper
5a698bd91f
Truncate double ellipsis where possible
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.
2021-11-09 17:20:37 +01:00
Ghostkeeper
7b7cb43b02
Improved elision
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.
2021-11-09 16:58:30 +01:00
Ghostkeeper
57093f0ef6
Hide Read More button if not truncated
There would be nothing to read.

Contributes to issue CURA-8561.
2021-11-09 16:34:21 +01:00
Ghostkeeper
c8741898bf
Decent attempt at inlining Read More button
Not perfect yet. The elide is missing, for one.

Contributes to issue CURA-8561.
2021-11-09 16:28:12 +01:00
Ghostkeeper
468c2b89e1
Use wrapping for package description
Contributes to issue CURA-8561.
2021-11-09 16:09:58 +01:00
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
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
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
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
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
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
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
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
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
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
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