-
Notifications
You must be signed in to change notification settings - Fork 504
✨ Import of documents #1609
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
base: main
Are you sure you want to change the base?
✨ Import of documents #1609
Conversation
|
Size Change: +18.5 kB (+0.44%) Total Size: 4.19 MB
|
d823f39 to
2c07a42
Compare
2c07a42 to
d6bc397
Compare
|
🚀 Preview will be available at https://1609-docs.ppr-docs.beta.numerique.gouv.fr/ You can use the existing account with these credentials:
You can also create a new account if you want to. Once this Pull Request is merged, the preview will be destroyed. |
2282095 to
eeeaa0c
Compare
d3c9562 to
970fcd5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
a9c28e9 to
9cef0a0
Compare
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Refactored converter services based on PR #1609 review comments: - Renamed parameter to `data` across all convert methods for consistency - Replaced recursive call with explicit sequential calls for readability - Hardcoded CONVERSION_API_SECURE=True in Production class for security - Removed unused YdocConverter import from viewsets.py - Updated tests to match new error message wording Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
df60fc6 to
e71eb79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 30 out of 35 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGrid.tsx
Show resolved
Hide resolved
Refactored converter services based on PR #1609 review comments: - Renamed parameter to `data` across all convert methods for consistency - Replaced recursive call with explicit sequential calls for readability - Hardcoded CONVERSION_API_SECURE=True in Production class for security - Removed unused YdocConverter import from viewsets.py - Updated tests to match new error message wording Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
1e06ed7 to
33ef8dc
Compare
Refactored converter services based on PR #1609 review comments: - Renamed parameter to `data` across all convert methods for consistency - Replaced recursive call with explicit sequential calls for readability - Hardcoded CONVERSION_API_SECURE=True in Production class for security - Removed unused YdocConverter import from viewsets.py - Updated tests to match new error message wording Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
33ef8dc to
cbd85a0
Compare
Refactored converter services based on PR #1609 review comments: - Renamed parameter to `data` across all convert methods for consistency - Replaced recursive call with explicit sequential calls for readability - Hardcoded CONVERSION_API_SECURE=True in Production class for security - Removed unused YdocConverter import from viewsets.py - Updated tests to match new error message wording Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
cbd85a0 to
dde68a3
Compare
Adapt the docs grid title bar to align with the new design. We will add a upload button in a future iteration.
Add import document area with drag and drop support in the docs grid component. We can now import docx and and md files just by dropping them into the designated area. We are using the `react-dropzone` library to handle the drag and drop functionality.
Updated docspec service image from 2.0.0 to 2.4.4 to include latest features and bug fixes. Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
Added comprehensive tests covering DocSpec converter service, converter orchestration, and document creation with file uploads. Tests validate DOCX and Markdown conversion workflows, error handling, service availability, and edge cases including empty files and Unicode filenames. Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
Refactored converter services based on PR #1609 review comments: - Renamed parameter to `data` across all convert methods for consistency - Replaced recursive call with explicit sequential calls for readability - Hardcoded CONVERSION_API_SECURE=True in Production class for security - Removed unused YdocConverter import from viewsets.py - Updated tests to match new error message wording Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
Added Helm templates for docspec deployment and service to enable document specification conversion in the Kubernetes environment. Updated Tiltfile, compose.yml, and Helm values to configure docspec integration alongside the backend converter service for document import functionality.
dde68a3 to
fa2be3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frontend perspective works perfectly !
Bravo ! 🎉
We can try the feature here https://1609-docs.ppr-docs.beta.numerique.gouv.fr/
See: #1609 (comment)
Some tests files if you need:
|
Holy molly ! Let me try it. |
lunika
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job !
|
|
||
| content = serializers.CharField(required=False) | ||
| websocket = serializers.BooleanField(required=False, write_only=True) | ||
| file = serializers.FileField(required=False, write_only=True, allow_null=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no check on the file size. You should check what is made in the FileUploadSerializer
The max_length should be set to 255. The filename will be used as document title. And the title max length is 255.
Purpose
We can now import docx and and md files just by dropping them into the docs grid area.
To do so we added a new container "docspec", which uses the docspec service to convert these formats to Blocknote format.
Import of (markdown) documents. See #1567 #1569.
Demo
Docs.1.online-video-cutter.com.mp4