Skip to content

Conversation

@chrstinalin
Copy link
Contributor

Fixes: mozilla/addons#15105

Description

Makes it clearer that a file or text is still attached to an action and prevent defaulting to the initial menu.

Testing

  1. Enable waffle flag enable-activity-log-attachments
  2. Upload a file or input text as attachment from reviewer actions
  3. Refreshes that contain the cached input will continue to show that input. Hard refreshes will reset.

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.

@chrstinalin chrstinalin requested review from a team and KevinMind and removed request for a team October 31, 2024 20:07
});
};

$('#id_attachment_file').prop('files').length && showFileWrapper();
Copy link
Contributor

@KevinMind KevinMind Nov 1, 2024

Choose a reason for hiding this comment

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

My jquery days are long gone but my understanding is this code will execute one time on page load, or when that element is in the dom? It's not totally clear since there is no explicit event trigger. Is it possible to do that somehow or maybe add a comment indicating when this code is/should be executed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Once on page load, yeah -- initExtraReviewActions() is called on document ready.

I could add a comment, but it feels like something that would really be relevant to the entire function rather than a comment singling out this particular line within it?

Copy link
Contributor

@KevinMind KevinMind left a comment

Choose a reason for hiding this comment

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

Verified working with a question 🚢

@chrstinalin chrstinalin merged commit 0175d22 into mozilla:master Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: After refreshing the review page is not visible if a file was uploaded

2 participants