Submitty icon indicating copy to clipboard operation
Submitty copied to clipboard

[Feature:Forum] Add attachments when editing posts

Open DarthNyan opened this issue 1 year ago • 1 comments

Please check if the PR fulfills these requirements:

  • [ ] Tests for the changes have been added/updated (if possible)
  • [ ] Documentation has been updated/added if relevant
  • [ ] Screenshots are attached to Github PR if visual/UI changes were made

What is the current behavior?

Currently, users can't add attachments when they edit posts on the discussion forum.

What is the new behavior?

Closes #9795. Users can now add attachments while editing their posts and threads.

Other information?

The increments to post_box_id are due to the existing file upload code storing files in an array indexed by post_box_id - 1, and each reply/edit form has a unique id. The edit form's hardcoded id of 0 was trying to access index -1 and throwing an error, so I incremented every post_box_id by 1.

DarthNyan avatar Jan 16 '24 13:01 DarthNyan

Codecov Report

Attention: Patch coverage is 0% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 22.76%. Comparing base (70893ef) to head (25666f8). Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #10109      +/-   ##
============================================
- Coverage     22.79%   22.76%   -0.03%     
- Complexity     8352     8363      +11     
============================================
  Files           228      228              
  Lines         29907    29944      +37     
  Branches         75       75              
============================================
+ Hits           6817     6818       +1     
- Misses        23018    23054      +36     
  Partials         72       72              
Flag Coverage Δ
autograder 21.92% <ø> (ø)
js 27.09% <ø> (ø)
migrator 100.00% <ø> (ø)
php 19.69% <0.00%> (-0.03%) :arrow_down:
python_submitty_utils 71.65% <ø> (ø)
submitty_daemon_jobs 91.01% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Jan 16 '24 13:01 codecov[bot]

I am writing cypress test for this, i tested and some time it looks like this @DarthNyan @IDzyre @jeffrey-asm @williamlin6803 @bmcutler any reason for this performed submitty_install_site and after uploading for 3,4 time it looks like this.

Screenshot 2024-04-10 at 12 06 29 PM

https://github.com/Submitty/Submitty/assets/119070053/c2db4b04-8a85-47a5-a2b9-e5106a010679

manzil-infinity180 avatar Apr 10 '24 06:04 manzil-infinity180