[UrlButton] Disable when there is no URL
ClosedPublic

Authored by broulik on Mar 25 2020, 1:20 PM.

Details

Summary

The tooltip would be empty and the button would do nothing

Test Plan


FormLayout buddy label adopts the enabled of its buddy, so maybe that needs to be force back on in Discover. Also kinda behavior change

Diff Detail

Repository
R169 Kirigami
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Mar 25 2020, 1:20 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptMar 25 2020, 1:20 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Mar 25 2020, 1:20 PM
ngraham added a subscriber: ngraham.

If button.url is undefined, then the whole thing won't work in the first place. Maybe instead the control could disable itself automatically, or change its color to red to indicate a broken link?

apol added a subscriber: apol.Mar 25 2020, 2:51 PM

disabling as suggested would make sense, thanks for looking into this!

broulik updated this revision to Diff 78460.Mar 25 2020, 3:28 PM
broulik retitled this revision from [UrlButton] Don't show tooltip if it would be empty to [UrlButton] Disable when there is no URL.
broulik edited the summary of this revision. (Show Details)
broulik edited the test plan for this revision. (Show Details)
  • Disable completely
broulik edited the test plan for this revision. (Show Details)Mar 25 2020, 3:28 PM
ngraham accepted this revision.Mar 25 2020, 3:58 PM

Nice.

This revision is now accepted and ready to land.Mar 25 2020, 3:58 PM
apol accepted this revision.Mar 25 2020, 5:41 PM
This revision was automatically updated to reflect the committed changes.