Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Rewrite major parts of the file browser #1873

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

MoritzWeber0
Copy link
Member

@MoritzWeber0 MoritzWeber0 commented Oct 2, 2024

Breaking API change: filename was renamed to path in /api/v1/sessions/{session_id}/files/download to make it consistent with the the list files endpoint.

  • The UI got an overhaul - margins are fixed and more icons for different cases were added (added files, modified files, expanded folder)
  • The workspace is now expanded per default
  • Download of single files (not directories) was added, resolves Download single files in file browser #1286
  • Replaced brute force to find a path with path traversal, which is a lot more efficient
  • Use the generated OpenAPI client, fix API docs to use ZIP as response
  • Migrate to TailwindCSS
  • Remove custom "Overwrite file" dialog, replace with ConfirmationDialog.
  • Remove NestedTreeControl, resolves Remove usage of NestedTreeControl #1732
  • Separate handling for files which replace existing files
  • Stream downloading directory directory without loading to memory
  • Fix a bug that files with special characters couldn't be downloaded (archive had a size of 0KB)

Resolves #118 except upload limit (will be kept to reduce load on the backend) + different file icons for different extensions (not planned).

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.06%. Comparing base (8601089) to head (35c1aa1).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
backend/capellacollab/sessions/files/routes.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1873      +/-   ##
==========================================
- Coverage   84.44%   84.06%   -0.38%     
==========================================
  Files         197      197              
  Lines        6549     6716     +167     
  Branches      729      768      +39     
==========================================
+ Hits         5530     5646     +116     
- Misses        859      904      +45     
- Partials      160      166       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Oct 2, 2024

A Storybook preview is available for commit 37fc7a3.
➡️ View Storybook
➡️ View Chromatic build

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@MoritzWeber0 MoritzWeber0 changed the title refactor: Rewrite major parts of the file browser feat: Rewrite major parts of the file browser Oct 4, 2024
@MoritzWeber0 MoritzWeber0 changed the title feat: Rewrite major parts of the file browser feat!: Rewrite major parts of the file browser Oct 4, 2024

This comment has been minimized.

Breaking API change: `filename` was renamed to `path`
in `/api/v1/sessions/{session_id}/files/download` to
make it consistent with the the list files endpoint.

- The UI got an overhaul - margins are fixed and more icons
  for different cases were added (added files, modified files, expanded folder)
- The workspace is now expanded per default
- Download of single files (not directories) was added
- Replaced brute force to find a path with path traversal, which is a lot more efficient
- Use the generated OpenAPI client, fix API docs to use ZIP as response
- Migrate to TailwindCSS
- Remove custom "Overwrite file" dialog, replace with ConfirmationDialog.
- Remove `NestedTreeControl`
- Separate handling for files which replace existing files
- Stream downloading directory directory without loading to memory
- Fix a bug that files with special characters couldn't be downloaded (archive had a size of 0KB)
Copy link

sonarcloud bot commented Oct 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

github-actions bot commented Oct 4, 2024

This report was generated by comparing 37fc7a3 with 8601089.
If you would like to check difference, please check here.

change detected

ArtifactName: reg

item count
pass 298
change 12
new 0
delete 0
📝 Report

Differences

Session Components_File Browser_Download Preparation_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Download Preparation_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Files_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Files_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Loading Files_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Loading Files_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Upload In Progress_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Upload In Progress_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Upload New File_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Upload New File_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Upload Processed By Backend_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_File Browser_Upload Processed By Backend_mobile.png

actual Actual
expected Expected
difference Difference

@MoritzWeber0 MoritzWeber0 merged commit ead6b4f into main Oct 4, 2024
32 checks passed
@MoritzWeber0 MoritzWeber0 deleted the file-tree branch October 4, 2024 12:44
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.

Remove usage of NestedTreeControl Download single files in file browser File upload improvements
2 participants