Issue Task Resolved

#111078Show the QR code button disabled without a URL

Benjamin Kott 10/15/26, 11:29 updated 10/15/26, 15:20

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

  1. Gerrit Code Review pushed patch set 1 for main to change 96716 status New Under Review 10/15/26, 11:46

  2. Gerrit Code Review pushed patch set 2 for main to change 96716 10/15/26, 13:26

  3. Gerrit Code Review pushed patch set 3 for main to change 96716 10/15/26, 13:39

  4. Gerrit Code Review pushed patch set 1 for 14.3 to change 96724 10/15/26, 14:15

  5. Gerrit Code Review pushed patch set 2 for 14.3 to change 96724 10/15/26, 15:02

  6. Benjamin Kott commented and changed status Under Review Resolved done 0 % 100 % 10/15/26, 15:20

    Applied in changeset commit:2b122a7e52420c92deec9cf91076aa374aeee403.