Skip to content

Alternate Path for Emails for Longer Testimonies #1964

@Mephistic

Description

@Mephistic

Problem

When submitting especially long testimonies, users can run into errors when trying to use the mailto link to send the legislator email with their mail client. Different mail clients have different rules around how long the body of a mailto link can be. Trying to send an email for a very long testimony can result in a 400 HTTP error once they've left MAPLE if they surpass this limit, which is an annoying user experience.

e.g. The limit is ~4,096 characters for Gmail - this count includes the subject, recipients, and body of the intended email (after URI encoding). We first ran into this bug when a user attempted to send an ~8,000 character email. For reference, the MAPLE testimony length limit is ~10,000 characters (body only, before URI encoding).

We don't want to modify the MAPLE testimony length limit (because that would limit the expressiveness of the testimony on the MAPLE site itself), and we intentionally are not sending these emails ourselves on our users' behalfs.

To remedy this problem, we should add an alternate user experience for users when publishing testimony that we believe may go over the size limit for mail clients. We should warn users that the mailto link may not work and let them know that they may have to copy/paste manually into their email client.

Success Criteria

  • Add a warning to the Publish Testimony flow when the user attempts to submit testimony longer than 2500 characters
    • 2500 is an estimate, as different email clients may have different rules, but we feel this is a good first guess that we can adjust later if need be.
    • It should be clear that this testimony is fine to publish on MAPLE, but that they may run into issues sending the email.

Additional Links

  • Design: ???
    • It may be worth thinking on the design here - even if only to get a rough idea of the error states. (e.g. do we want to disable the "Send Email" button? When it's clicked, should we instead open a modal with instructions to copy/paste into your email client? Can we populate some of the data if we take that approach (e.g. maybe just subject/recipients and make users copy/paste the body?)?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions