Skip to content

Cannot remove audio file, keeps UI in blocked state on error. #3626

Description

@Floby

Describe the bug

It's not possible to remove an audio attachment to a post from the UI, no button visible (see first screen capture of edit UI).
When encountering a server error when trying to post (for example: file too big, cannot upload more than one audio attachment), then it is impossible to go back to a working state for the UI, as there is no button to reset the post form altogether as well.
Since the draft is persisted, no amount of navigation, logging out and logging in can fix the state, and it's then impossible to post with that account.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Home
  2. Click on text area for post
  3. Add audio attachment (.mp3, .ogg, .wav for example)
  4. click "edit"
  5. no button available to remove media, as would be there for visual attachments.
Image
  1. Add another audio media
  2. click Post
  3. Get server error (usually file too big or cannot upload 2 audio attachments with Mastodon)
  4. It is now impossible to fix the state.

Expected behavior

  • a "remove" button is available in the media edit modal and forgets the attachment for this post
  • alternatively, a "forget post" button is available in the post UI, resetting the form as a whole

Screenshot
Image

Note: this error is not exactly the one i described but this UI has been locked like this for several weeks now

Technical information

To help us debug the problem, please complete relevant information as much as you can:

Elk information

Server information

Desktop:

  • Browser: Firefox
  • Browser version: 150.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: bugSomething isn't workingc: uiEnhancing UIhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions