Skip to content

feat: Use UploadHandler in documentation #4317

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

Draft
wants to merge 15 commits into
base: latest
Choose a base branch
from

Conversation

caalador
Copy link
Contributor

fixes #4304

@caalador caalador force-pushed the issues/4304-downloadHandler branch from d950ac9 to 3456b23 Compare May 16, 2025 11:00
Copy link

github-actions bot commented May 16, 2025

AI Language Review

  • In the .java source files, the changes to use InMemoryUploadHandler and UploadHandler seem to be consistent across the modified examples. However, ensure the examples clearly explain when and why one should choose between different types of UploadHandler implementations, as this choice may not be immediately obvious to new users.
  • Each example initializes InMemoryUploadHandler at the beginning of each class. Consider adding brief comments explaining the purpose of these handlers for clarity, particularly for less experienced developers.
  • In several .java files, such as UploadFileBuffer, methods use formatting like System.out.printf() for console output. Ensure consistency in using logging instead of System.out.print* methods where appropriate. This follows best practices for production-level reliability and flexibility.
  • In the AsciiDoc documentation, ensure all transformations of the Receiver component to UploadHandler have clear migration instructions included for developers who might be using previous patterns.
  • When explaining UploadHandler implementations, consider elaborating on usage boundaries such as memory limitations in InMemoryUploadHandler compared to FileUploadHandler, which uses the file system.
  • Ensure consistency in the usage of inline code blocks in the documentation (e.g., always using backticks ... for method names), as inconsistencies can diminish readability.
  • In the AsciiDoc sections transitioning from Receiver to UploadHandler, specify which methods or practices are obsolete or outdated to prevent confusion among users who might refer to older documentation.

@caalador caalador changed the title feat: Use UploadHanlder in documentation feat: Use UploadHandler in documentation May 16, 2025
@caalador caalador force-pushed the issues/4304-downloadHandler branch from 3456b23 to ed6c5c6 Compare May 16, 2025 11:14
@caalador caalador force-pushed the issues/4304-downloadHandler branch from ed6c5c6 to 90cb0c5 Compare May 16, 2025 11:14
caalador added 2 commits May 16, 2025 15:01
fix sample code in asciidoc
vaadin/flow#21443 makes the method protected
so it shouldn't be mentioned in the doc.
@mshabarov mshabarov self-requested a review May 19, 2025 11:31
Copy link
Contributor

@mshabarov mshabarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to other comments, I'd would add to the article a description for UploadEvent, UploadMetadata and
(can be borrowed from downloads docs) also for TransferContext, allowInert, urlPostfix and disableMode.

@caalador caalador marked this pull request as ready for review May 23, 2025 06:59
@mshabarov
Copy link
Contributor

Converted to draft to not being merged before RC/GA

@mshabarov mshabarov marked this pull request as draft May 23, 2025 10:53
@mshabarov
Copy link
Contributor

Methods getRequestSizeMax, getFileSizeMax and getFileCountMax of UploadHandler should be documented.
Also responseHandled is mentioned in examples, but not described in a sentence.

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.

Documentation for the new Upload API
2 participants