SUMMARY For Fedora, we want to be able to display a page to enable the installation of the OpenH264 codec. We however want to be able to completely skip the page if the package is already installed. See: https://pagure.io/fedora-kde/plasma-welcome-fedora/pull-request/4 I haven't found yet if it's possible with the existing code or if we need changes in plasma-welcome. STEPS TO REPRODUCE 1. Open plasma-welcome on Fedora Rawhide with https://pagure.io/fedora-kde/plasma-welcome-fedora/pull-request/4 OBSERVED RESULT The OpenH264 install page is always displayed, whether or not the package is already installed. EXPECTED RESULT The OpenH264 install page is displayed only if the package is not already installed. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora KDE Rawhide ADDITIONAL INFORMATION See: https://pagure.io/fedora-kde/plasma-welcome-fedora/pull-request/4
I don't believe this can be done at present. Right now, Discover's page exposes whether Discover is installed: let discover = _createPage("Discover.qml"); if (discover.application.exists) { _pushPage(discover); } else { discover.destroy(); } It should be possible for GenericPage to include a property that can be overridden for whether a page should be included. We can then use this internally and in distro pages. I'll investigate!
Basing this on the result of a command could be a problem. At present, I'd suggest using a Kirigami.PlaceholderMessage (anchors.centerIn; width: parent.width - Kirigami.Units.gridUnit * 2; visible: ...) to communicate that no action needs to be taken. I'd say this is probably preferable anyway, as users would know that even if currently installed, they will have the option to do so there if that were not the case.
Given the proposed UX, I think showing a big blank "Yay, you have this random video codec, click Next now!" would be a bit silly. I think the request makes sense in general. For the moment, could you integrate the OpenH264 content into another existing custom page, so that you could hide it when not relevant on that page?