Skip to content

Fix Discussion Forum show/hide thread attachments toggle text #12477

Description

@faisalnjs

Describe the bug
There are two toggles for Discussion Forum attachments, the "Attachments" button and the "More" button > "Show Attachments" dropdown item. When using both together, content may not be toggled correctly based on the text shown to the user and the current state of the content.

This is a common bug in programs that have multiple toggles for the same content. This should be fixed so that it works as intended and accurate text is shown to the user.

Expected behavior
Dropdown item text, specifically where the text changes based on the content current state ("Show Attachments" or "Hide Attachments"), should be updated on content toggle to reflect the accurate state of the content. This issue should also be fixed for all applicable contexts throughout Submitty.

To Reproduce
Steps to reproduce the behavior:

  1. Open Submitty
  2. Navigate to course with Discussion Forum
  3. Navigate to course Discussion Forum
  4. Open an existing thread with at least one attachment
  5. Click the "More" button > "Show Attachments" dropdown item
  6. Click the "Attachments" button
  7. Click the "More" button
  8. See error

Configuration

  • N/A; any; all

Screenshots

Bug

Image

No bug 1

Image

No bug 2

Image

No bug 3

Image

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting TriageBrand New Issue - not yet reviewed & prioritized by the Submitty Project Managersbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions