[PR #333] [MERGED] Refactor content viewer components and use for multpart and request body #255

Closed
opened 2025-12-29 07:20:04 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/333
Author: @gschier
Created: 12/28/2025
Status: Merged
Merged: 12/28/2025
Merged by: @gschier

Base: mainHead: refactor/generic-text-viewers


📝 Commits (10+)

  • 6fe1203 Refactor text viewers to be generic and HttpResponse-independent
  • eae1760 Enhance multipart and request body viewers with content-type routing
  • e96cde7 Refactor MultipartViewer to be generic and support request bodies
  • ba0a4ac Add PdfViewer support for request bodies and multipart parts
  • 11d6125 Add AudioViewer and VideoViewer support for request bodies and multipart parts
  • 89e7a81 Add error handling and memoization to MultipartViewer
  • 20834db Fix PdfViewer to properly handle Uint8Array data
  • a21cd7b Fix ArrayBuffer detachment by copying data before passing to MultipartViewer
  • 21b9367 Fix ArrayBuffer detachment in MultipartViewer Part component
  • 6c1032d Fix TypeScript errors and add memoization to MultipartViewer Part component

📊 Changes

16 files changed (+324 additions, -115 deletions)

View changed files

📝 src-tauri/yaak-http/src/types.rs (+8 -2)
📝 src-web/components/HttpResponsePane.tsx (+30 -4)
📝 src-web/components/RequestBodyViewer.tsx (+59 -9)
📝 src-web/components/RouteError.tsx (+1 -1)
📝 src-web/components/core/FormattedError.tsx (+3 -1)
📝 src-web/components/core/Icon.tsx (+2 -2)
📝 src-web/components/responseViewers/AudioViewer.tsx (+18 -3)
📝 src-web/components/responseViewers/CsvViewer.tsx (+3 -6)
📝 src-web/components/responseViewers/HTMLOrTextViewer.tsx (+42 -5)
📝 src-web/components/responseViewers/JsonViewer.tsx (+3 -9)
📝 src-web/components/responseViewers/MultipartViewer.tsx (+79 -25)
📝 src-web/components/responseViewers/PdfViewer.tsx (+18 -5)
📝 src-web/components/responseViewers/SvgViewer.tsx (+9 -9)
📝 src-web/components/responseViewers/TextViewer.tsx (+23 -19)
📝 src-web/components/responseViewers/VideoViewer.tsx (+18 -3)
📝 src-web/components/responseViewers/WebPageViewer.tsx (+8 -12)

📄 Description

CleanShot 2025-12-28 at 09 32 25@2x

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/333 **Author:** [@gschier](https://github.com/gschier) **Created:** 12/28/2025 **Status:** ✅ Merged **Merged:** 12/28/2025 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `refactor/generic-text-viewers` --- ### 📝 Commits (10+) - [`6fe1203`](https://github.com/mountain-loop/yaak/commit/6fe1203314a9bec8f04167e0be7abde17070a5b2) Refactor text viewers to be generic and HttpResponse-independent - [`eae1760`](https://github.com/mountain-loop/yaak/commit/eae17606fb1fa78d05826cf60ed7dd9e60ebbe7b) Enhance multipart and request body viewers with content-type routing - [`e96cde7`](https://github.com/mountain-loop/yaak/commit/e96cde7aade1f0b8665d0620875366d6b24ef4f6) Refactor MultipartViewer to be generic and support request bodies - [`ba0a4ac`](https://github.com/mountain-loop/yaak/commit/ba0a4aced6b87ff0dc2da80fc30c3f562cda80dd) Add PdfViewer support for request bodies and multipart parts - [`11d6125`](https://github.com/mountain-loop/yaak/commit/11d6125c9c8a41135a27ed38281928418c54cb4d) Add AudioViewer and VideoViewer support for request bodies and multipart parts - [`89e7a81`](https://github.com/mountain-loop/yaak/commit/89e7a8157b1d3505194c2915dd1b25593168b6bd) Add error handling and memoization to MultipartViewer - [`20834db`](https://github.com/mountain-loop/yaak/commit/20834dbdc0892106962f66d61c9687a833de4a15) Fix PdfViewer to properly handle Uint8Array data - [`a21cd7b`](https://github.com/mountain-loop/yaak/commit/a21cd7bc359cc243acc9c0b60fa7d6ac6fff4374) Fix ArrayBuffer detachment by copying data before passing to MultipartViewer - [`21b9367`](https://github.com/mountain-loop/yaak/commit/21b93679f0ca1e1ff07fa36f25a8e01350678e6f) Fix ArrayBuffer detachment in MultipartViewer Part component - [`6c1032d`](https://github.com/mountain-loop/yaak/commit/6c1032dc27d9a6d7d4cf32c0181e2dc42a3e89dd) Fix TypeScript errors and add memoization to MultipartViewer Part component ### 📊 Changes **16 files changed** (+324 additions, -115 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/yaak-http/src/types.rs` (+8 -2) 📝 `src-web/components/HttpResponsePane.tsx` (+30 -4) 📝 `src-web/components/RequestBodyViewer.tsx` (+59 -9) 📝 `src-web/components/RouteError.tsx` (+1 -1) 📝 `src-web/components/core/FormattedError.tsx` (+3 -1) 📝 `src-web/components/core/Icon.tsx` (+2 -2) 📝 `src-web/components/responseViewers/AudioViewer.tsx` (+18 -3) 📝 `src-web/components/responseViewers/CsvViewer.tsx` (+3 -6) 📝 `src-web/components/responseViewers/HTMLOrTextViewer.tsx` (+42 -5) 📝 `src-web/components/responseViewers/JsonViewer.tsx` (+3 -9) 📝 `src-web/components/responseViewers/MultipartViewer.tsx` (+79 -25) 📝 `src-web/components/responseViewers/PdfViewer.tsx` (+18 -5) 📝 `src-web/components/responseViewers/SvgViewer.tsx` (+9 -9) 📝 `src-web/components/responseViewers/TextViewer.tsx` (+23 -19) 📝 `src-web/components/responseViewers/VideoViewer.tsx` (+18 -3) 📝 `src-web/components/responseViewers/WebPageViewer.tsx` (+8 -12) </details> ### 📄 Description <img width="986" height="604" alt="CleanShot 2025-12-28 at 09 32 25@2x" src="https://github.com/user-attachments/assets/69ec95fc-0372-46f6-a853-7289cd2e07b8" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 07:20:04 +01:00
adam closed this issue 2025-12-29 07:20:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/yaak#255