#111078Show the QR code button disabled without a URL
Description
Problem
The two buttons for the frontend page in the document header behave differently without a URL:
ComponentFactory::createViewButton()without preview attributes returns the “View webpage” button disabled.ComponentFactory::createQrCodeButton()with an empty URL returns an enabled button that opens a modal with nothing to encode.
A module that shows both buttons has to leave the QR code button out or disable it by hand.
Proposal
createQrCodeButton() renders the button disabled for an empty URL, as createViewButton() does without preview attributes. The signature stays as it is.
This builds on #111075, which gives GenericButton and the pseudo button elements their disabled state.
Use case
The preview module shows its document header also without a preview (no page selected, a folder, no site), with the view button and the QR code button disabled alike.
Reviews 2
History 16
-
Gerrit Code Review pushed patch set 1 for main to change 96716 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-15T11:46:14+00:00" > 10/15/26, 11:46 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96716 <span data-processor="relativetime" data-value="2026-10-15T13:26:58+00:00" > 10/15/26, 13:26 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96716 <span data-processor="relativetime" data-value="2026-10-15T13:39:37+00:00" > 10/15/26, 13:39 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 96724 <span data-processor="relativetime" data-value="2026-10-15T14:15:02+00:00" > 10/15/26, 14:15 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 96724 <span data-processor="relativetime" data-value="2026-10-15T15:02:27+00:00" > 10/15/26, 15:02 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-15T15:20:15+00:00" > 10/15/26, 15:20 </span>
Applied in changeset commit:2b122a7e52420c92deec9cf91076aa374aeee403.