Skip to content

Add support for 3D/CAD file formats preview #34794

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

kerwin612
Copy link
Member

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 20, 2025
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/dependencies modifies/frontend labels Jun 20, 2025
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 20, 2025

I think we need a pure frontend "render plugin" mechanism

  1. Register "fronend render plugin"
  2. Plugin read page information (for example: file name)
  3. If the plugin is able to render it, read the "raw" content, then replace the "fileview" element.

I don't think we should hard-code too many file types in backend.

@kerwin612 kerwin612 force-pushed the feat/support-preview-3d-file branch from eba2b22 to 057ee0e Compare June 21, 2025 06:16
@github-actions github-actions bot removed the modifies/go Pull requests that update Go code label Jun 21, 2025
@kerwin612 kerwin612 requested review from delvh, lunny and wxiaoguang June 21, 2025 06:17
@kerwin612 kerwin612 force-pushed the feat/support-preview-3d-file branch from 057ee0e to 448effb Compare June 21, 2025 06:22
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Jun 21, 2025
@lunny lunny added this to the 1.25.0 milestone Jun 23, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 26, 2025
@wxiaoguang
Copy link
Contributor

Can we merge "initPdfViewer" into the new framework? I think it can also benefit from the new design.

@kerwin612
Copy link
Member Author

Can we merge "initPdfViewer" into the new framework? I think it can also benefit from the new design.

OK, I will also refactor the PdfViewer.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 27, 2025

@silverwind maybe need to completely prevent developers from constructing HTML content by JS. Too many XSS problems. #34794 (review) #34794 (review)

@wxiaoguang

This comment was marked as outdated.

@wxiaoguang

This comment was marked as outdated.

@wxiaoguang wxiaoguang force-pushed the feat/support-preview-3d-file branch from e8e3074 to 2e7fe6e Compare June 28, 2025 15:31
@wxiaoguang
Copy link
Contributor

Simplified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/dependencies modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants