Display version alongside source, and use a combobox to switch between them
AbandonedPublic

Authored by ngraham on Jan 19 2018, 3:38 AM.

Details

Summary
  • Joined the version number and source together to communicate their relationship when more then one source is present
  • Implemented a combobox to switch versions instead of blue-colored link text and an overlay

This patch includes a string change, so it cannot go into 5.12.

Errata:

  • This new UI makes https://bugs.kde.org/show_bug.cgi?id=389186 more visible (though it's already present, just less visible with the current UI)
  • Ubuntu provides long and ugly version strings most of the time, which sometimes makes the combobox overflow the window when it's narrow--and typical width-limiting/eliding measures don't seem to work with QQC comboboxes
Test Plan

Tested in KDE Neon.

Krita, before:

Krita, after:

Endless Sky, before:

Endless Sky, after:

Blender, before:

Blender, after:

Mobile UI, before:

Mobile UI, after:

Version chooser UI, before:

Version chooser UI, after:

Diff Detail

Repository
R134 Discover Software Store
Branch
arcpatch-D9976
Lint
No Linters Available
Unit
No Unit Test Coverage
ngraham requested review of this revision.Jan 19 2018, 3:38 AM
ngraham created this revision.
ngraham edited the summary of this revision. (Show Details)Jan 19 2018, 3:43 AM
ngraham edited the summary of this revision. (Show Details)Jan 19 2018, 5:10 AM
ngraham added a subscriber: romangg.
romangg added inline comments.Jan 19 2018, 5:18 AM
libdiscover/resources/AbstractResource.cpp
224

Can you keep it const when adding const qualifier to state()?

ngraham added inline comments.Jan 19 2018, 5:22 AM
libdiscover/resources/AbstractResource.cpp
224

I'm afraid I'm not sure what you mean, being a novice at this. Can you ELI5?

romangg added inline comments.Jan 19 2018, 5:29 AM
libdiscover/resources/AbstractResource.cpp
224

Sure. The const qualifier specifies that this function does not change any member variables in AbstractResource. If you still try to change one in the function, you get a compile error. This happens also if you call some other non-const member function inside the const function. You removed the qualifier probably because you now call state() below and it wouldn't compile otherwise.

But the state() function from its very name could be made const probably just as well (maybe this should be put in a separate patch, this one here then depends on). And then displayOrigin() can stay const.

ngraham added inline comments.Jan 19 2018, 2:56 PM
libdiscover/resources/AbstractResource.cpp
224

Thanks for the very clear explanation; now I understand. Looks like state() is a virtual function that gets overridden by child classes? I'll see if I can figure out what to do here.

ngraham updated this revision to Diff 25640.Jan 19 2018, 3:07 PM

Make state() into const functions

Restricted Application added a project: Plasma. · View Herald TranscriptJan 19 2018, 3:07 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham marked 4 inline comments as done.Jan 19 2018, 3:08 PM
ngraham edited reviewers, added: andreaska; removed: andreask.Jan 19 2018, 4:14 PM
januz awarded a token.Jan 19 2018, 5:46 PM
This comment was removed by colomar.
andreaska accepted this revision.Jan 19 2018, 7:20 PM

Design look good

This revision is now accepted and ready to land.Jan 19 2018, 7:20 PM

I think that when at the bottom, having the combobox is okay because it's not too prominent. The only problem I see is that it means that changing a combobox changes the content above it, which is not usually expected behavior for a combobox.

ngraham updated this revision to Diff 25692.Jan 20 2018, 8:18 PM

Merge master and fix the issue of "installed:" getting appended to the origin string

ngraham edited the summary of this revision. (Show Details)Jan 20 2018, 8:19 PM
ngraham updated this revision to Diff 25887.Jan 24 2018, 3:24 PM
  • Merge branch 'master' into arcpatch-D9976
apol requested changes to this revision.Jan 24 2018, 3:29 PM

I think it's premature the adoption of the combo box, adding the version could make sense.

libdiscover/backends/PackageKitBackend/PackageKitResource.cpp
126

Seems like we are hitting a bug in PackageKit-Qt here, this is not right.

This revision now requires changes to proceed.Jan 24 2018, 3:29 PM
ngraham edited the summary of this revision. (Show Details)Jan 24 2018, 3:31 PM
ngraham edited the test plan for this revision. (Show Details)
ngraham added inline comments.
libdiscover/backends/PackageKitBackend/PackageKitResource.cpp
126

I filed a bug on them and they said they expect us to process the string.

ngraham abandoned this revision.Jan 25 2018, 3:17 AM

Source-and-version-unification patch: D10091

Will produce a ComboBox patch if and when that's accepted, as it doesn't make as much sense without first unifying the source and version.