Skip to content

Conversation

@JackTheSparow
Copy link
Member

@JackTheSparow JackTheSparow commented Dec 10, 2025

Fixes #9307

Fixed the checkbox enabled problem when file is deleted after selecting from local files. Checkbox automatically gets refreshed if file is deleted and not uploaded.

image

After Deleting File

image

Copy link
Member

@Saby-Bishops Saby-Bishops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a screenshot of the output, and include the relevant issue number in the PR description for easier tracking.

@JackTheSparow
Copy link
Member Author

Please add a screenshot of the output, and include the relevant issue number in the PR description for easier tracking.

Done^ Please check

@JackTheSparow JackTheSparow changed the title fix file downloadable checkbox in add resources (Fixes #9307) resources: smoother file downloadable icon (fixes #9307) Dec 10, 2025
Copy link
Member

@jessewashburn jessewashburn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice that it refreshes after you remove an attachment, but you should not be able to do this, per the original issue (checked even when there is no attachment):

image

Also, If you include fixes #9307 in the body of the PR, it is much easier for the reviewers to directly link to the original issue.

@JackTheSparow JackTheSparow force-pushed the 9307-file-downloadable-is-selectable branch from e67c215 to 47710f6 Compare December 16, 2025 19:13
Copy link
Member

@Mutugiii Mutugiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Steps to replicate:

  1. Upload item
  2. Select File downloadable
  3. Delete the item

Copy link
Member

@Mutugiii Mutugiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional note, the showDownloadCheckbox and disableDownload variables are basically inverses most of the time. Sticking to one is ideal to reduce maintenance overhead

this.file = null;
this.fileInput.clearFile();
this.disableDownload = !this.existingResource.doc?._attachments || this.attachmentMarkedForDeletion;
this.disableDownload = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setting this to always true leads to a regression when editing a resource with a downloadable attachment.

Steps to test:

  1. Open an existing resource that already has an attachment (Edit mode).
  2. Attach a new file -> "Choose File"
  3. Remove the newly attached file
    Result: The "File downloadable" checkbox disappears

@dogi dogi changed the title resources: smoother file downloadable icon (fixes #9307) resources: smoother icon downloading (fixes #9307) Jan 6, 2026
@dogi dogi merged commit adb0791 into master Jan 6, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File downloadable shouldn’t be selectable if no file has been uploaded

7 participants