Skip to content

Attachment width, word wrapping #3113

@hoppedmalt

Description

@hoppedmalt

Search before asking

  • I had searched in the issues and found no similar issues.

Operating System

  • macOS
  • Windows
  • Linux

Operating System Version

No response

It happens on the web browser too?

Yes, it happens on the web browser too

Rocket.Chat Desktop App Version

4.9.1

Rocket.Chat Server Version

7.10.0

Describe the bug

Text format attachments are forced into 360px width resulting in line width issues, difficulties in formatting automatic messages.

How to Reproduce

Text format message sent via webhook has text format attachment - I don't know how to reproduce them other way. In the database the message looks like this:

    alias: 'grafana cat',
    msg: '[FIRING:1, RESOLVED:1]  (Admin)',
    attachments: [
      {
        collapsed: true,
        color: '#FF0000',
        text: '\n' +
          '[firing] *Disk usage warning (90%)* severity: warning instance: redactedhost.redacteddomain.tld\n' +
          'Annotations:\n' +
          '- URL: [link](https://redactedmonitor.redacteddomain.tld/grafana/d/c24574a8-22aa-42e6-8f42-bdc954c44bf9/alert-metrics?orgId=1&var-instance=redactedhost.redacteddomain.tld&viewPanel=3)\n' +
          '\n' +
          'Silence: [link](https://redactedmonitor.redacteddomain.tld/grafana/alerting/silence/new?alertmanager=grafana&matcher=__alert_rule_uid__%3DkVktozxVz&matcher=device%3D%2Fdev%2Fvda3&matcher=fstype%3Dxfs&matcher=instance%3Dredactedhost.redacteddomain.tld&matcher=job%3Djobiswork&matcher=mountpoint%3D%2F&matcher=severity%3Dwarning&orgId=1)\n' +
          '\n' +
          '\n' +
          '\n' +
          '[resolved] *Megaraid status* instance: redactedhost2.redacteddomain.tld\n' +
          'Annotations:\n' +
          '- URL: [link](https://redactedmonitor.redacteddomain.tld/grafana/d/f7a1a070-9002-42b9-8457-096392a06de0/new-dashboard?orgId=1&var-Host=redactedhost2.redacteddomain.tld)\n' +
          '\n' +
          'Silence: [link](https://redactedmonitor.redacteddomain.tld/grafana/alerting/silence/new?alertmanager=grafana&matcher=__alert_rule_uid__%3Dbe202e31-a1bf-4dac-ab8a-9888a90c63f6&matcher=controller%3D0&matcher=instance%3Dredactedhost2.redacteddomain.tld&matcher=job%3Djobiswork&orgId=1)\n' +
          '\n',
        title: '[FIRING:1, RESOLVED:1]  (Admin)'
      }
    ],

Describe your Expected behavior

100% of available horizontal space usable before text format attachment wraps.

Image

Anything else

Happens every time, has happened every time for years.

Are you willing to submit a code contribution?

  • Yes, I am willing to submit a Pull Request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions