nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.38k stars 4.07k forks source link

[Bug]: stable25, nextcloud/server@d4b4135 breaks file action menu items using an img tag #36154

Closed rotdrop closed 1 year ago

rotdrop commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

See #35517, from there:

IMHO, the changes to apps.scss break file-actions which use an img-tag for their icons: the width is now 0, what remains is two times the padding which only makes for 28px instead of the necessary 44px.

And:

What I see is that removing the dimensions of the img tag make it size 0. There two different "icon-providers" in the file-actions menu, the correctly working ones use a span:

<a href="#" class="menuitem action action-download permanent" data-action="Download">
    <span class="icon icon-download"></span>
    <span>Herunterladen</span>
</a>

The other ones have an img tag:

<a href="#" class="menuitem action action-mount-archive permanent" data-action="mount-archive">
  <img class="icon" src="/core/img/actions/external.svg">
  <span>Archiv einhängen</span>
</a>

In my view the img has width and height 16px and a padding of 14px. Now, as we have box-sizing=border-box the actual width is then set to 0 and just the padding remains.

Steps to reproduce

  1. Clone the the stable25 nextcloud server branch (used: f74ba9cb5d1)
  2. Have a look at a file action menu item for an using an img tag to display its icon Screenshot_20230116_105510 Screenshot_20230116_105553

Expected behavior

Icon should have the appropriate size (that it is not visible at all is caused by the padding consuming all of the 16px of available space, caused by box-sizing=border-box).

Installation method

None

Operating system

Other

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "dev1.home.claus-justus-heine.de"
        ],
        "default_phone_region": "DE",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.3.1",
        "overwrite.cli.url": "https:\/\/dev1.home.claus-justus-heine.de",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "query_log_file": "",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "loglevel": 0,
        "logfilemode": 432,
        "theme": "",
        "maintenance": false,
        "debug": true,
        "verbose_exceptions": true,
        "session_lifetime": 300,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "dbindex": 0
        },
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.debug": false,
        "files_no_background_scan": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\SVG",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\OpenDocument"
        ],
        "app_install_overwrite": [
            "dokuwikiembedded",
            "roundcube",
            "keeporsweep",
            "bruteforcesettings",
            "whiteboard",
            "gpgmailer",
            "cafevdb",
            "redaxo4embedded",
            "ocr",
            "appointments",
            "bav",
            "ownpad",
            "polls",
            "tasks",
            "user_sql",
            "ldap_contacts_backend",
            "forms",
            "files_external_ftp",
            "audioplayer",
            "apporder",
            "circles",
            "richdocumentscode",
            "twofactor_admin",
            "files_texteditor",
            "files_markdown"
        ],
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauth": 1,
        "mail_sendmailmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.17.0
  - announcementcenter: 6.4.0
  - appointments: 1.14.9
  - audioplayer: 3.3.1
  - bav: 0.0.3
  - cafevdbmembers: 0.0.1
  - calendar: 4.2.1
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - collectives: 2.1.1
  - comments: 1.15.0
  - contacts: 5.1.0-alpha.1
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - dokuwikiembedded: 0.0.3
  - event_update_notification: 2.0.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_archive: 1.1.0
  - files_external: 1.17.0
  - files_markdown: 2.3.6
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_texteditor: 2.15.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - forms: 3.0.3
  - groupfolders: 13.1.0
  - ldap_write_support: 1.7.0
  - libresign: 6.2.4
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - mail: 2.2.2
  - maps: 0.2.0
  - notes: 4.6.0
  - notifications: 2.13.1
  - notify_push: 0.5.0
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - pdf_downloader: 1.1.1-rc1
  - photos: 2.0.1
  - polls: 4.1.0-beta6
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - redaxo4embedded: 0.0.3
  - richdocuments: 7.1.0
  - richdocumentscode: 22.5.802
  - roundcube: 1.0.0
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - support: 1.8.0
  - suspicious_login: 4.2.1
  - systemtags: 1.15.0
  - tasks: 0.14.5
  - terms_of_service: 2.0.0
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_admin: 4.1.9
  - twofactor_backupcodes: 1.14.0
  - twofactor_email: 2.7.1
  - twofactor_gateway: 0.20.0
  - twofactor_nextcloud_notification: 3.5.0
  - twofactor_totp: 6.4.1
  - updatenotification: 1.15.0
  - user_ldap: 1.15.0
  - user_sql: 4.7.1
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0
Disabled:
  - admin_audit: 1.9.0
  - apporder: 0.15.0
  - bruteforcesettings: 2.4.0
  - cafevdb: 8.0.1
  - documentserver_community: 0.1.13
  - electronicsignatures: 2.0.1
  - encryption
  - external: 5.0.0
  - fileslibreofficeedit: 1.1.0
  - gpgmailer: 0.0.4
  - ldap_contacts_backend: 1.4.0
  - scanner: 0.2.3
  - side_menu: 3.5.0
  - testing
  - twofactor_u2f: 6.3.0
  - user_backend_sql_raw: 1.3.0
  - whiteboard: 0.0.3
  - workflow_pdf_converter: 1.10.0

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

rotdrop commented 1 year ago

BTW, this also affects that "Edit locally" menu entry.