-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
New Attachment Upload UX with Real-Time Previews #44889
New Attachment Upload UX with Real-Time Previews #44889
Commits on Jul 12, 2024
-
ReportUtils: simplify optimistic comment constructor logic
- Consolidated the logic for generating `htmlForNewComment` and `textForNewComment`. - Cleaned up redundant checks for file and text presence. - Optimized creation of the `reportAction` object.
Configuration menu - View commit details
-
Copy full SHA for bf4c208 - Browse repository at this point
Copy the full SHA bf4c208View commit details -
ReportUtils: extract attachment HTML generation to a separate function
- Introduced a new function `getAttachmentHtml` to handle the generation of attachment HTML. - Updated `addComment` function to use `getAttachmentHtml` for cleaner code. - Ensured `textForNewComment` is parsed from `htmlForNewComment` for consistency.
Configuration menu - View commit details
-
Copy full SHA for ccfa861 - Browse repository at this point
Copy the full SHA ccfa861View commit details -
ReportUtils: rename getAttachmentHtml to getUploadingAttachmentHtml
Renamed the function `getAttachmentHtml` to `getUploadingAttachmentHtml` for better clarity and consistency. The new name more accurately reflects its purpose in generating HTML for uploading attachments.
Configuration menu - View commit details
-
Copy full SHA for c7fdc5a - Browse repository at this point
Copy the full SHA c7fdc5aView commit details -
Enhance attachment handling in getUploadingAttachmentHtml function
- Improved `getUploadingAttachmentHtml` function to handle image and video attachments. - Added conditions to check for MIME types and generate appropriate HTML for image and video sources. - Updated `htmlForNewComment` to remove an extra newline character.
Configuration menu - View commit details
-
Copy full SHA for f5fcb32 - Browse repository at this point
Copy the full SHA f5fcb32View commit details -
fix: prevent error when custom attachment source attribute is undefined
Added nullish coalescing operator to ensure `attribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE]` is defined before using `split()`, preventing potential runtime errors.
Configuration menu - View commit details
-
Copy full SHA for 605990b - Browse repository at this point
Copy the full SHA 605990bView commit details -
ReportUtils: improve attachment HTML generation logic
- Return HTML string directly within conditionals for image and video attachments. - Ensure a generic message is returned for other file types. - Adjust the HTML for new comments to conditionally include line breaks when an attachment is present. ```
Configuration menu - View commit details
-
Copy full SHA for b2b1544 - Browse repository at this point
Copy the full SHA b2b1544View commit details -
VideoRenderer: correct video source URL resolution logic
Refactor the order of URL resolution priorities to fix issues with video rendering. Now, the video source URL will first check the ATTACHMENT_SOURCE_ATTRIBUTE, then 'src', and finally 'href'.
Configuration menu - View commit details
-
Copy full SHA for 5d8d376 - Browse repository at this point
Copy the full SHA 5d8d376View commit details -
ReportUtils: improve attachment handling for non-media files
Updated the fallback case for handling non-media files in `src/libs/ReportUtils.ts`. Instead of using a generic uploading message, we now present a link to the file for better user experience.
Configuration menu - View commit details
-
Copy full SHA for cce5e7e - Browse repository at this point
Copy the full SHA cce5e7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for feed1af - Browse repository at this point
Copy the full SHA feed1afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 75756e5 - Browse repository at this point
Copy the full SHA 75756e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d017246 - Browse repository at this point
Copy the full SHA d017246View commit details -
CONST: add optimistic source attribute for attachments
- Introduced `ATTACHMENT_OPTIMISTIC_SOURCE_ATTRIBUTE` in constants. - Updated `ReportUtils` to include the new optimistic source attribute in the HTML output for images, videos, and other file types.
Configuration menu - View commit details
-
Copy full SHA for 72077d4 - Browse repository at this point
Copy the full SHA 72077d4View commit details -
libs/isReportMessageAttachment: improve attachment message check logi…
…c in .ts 🧩 - Extracted attachment regex pattern into a constant `ATTACHMENT_PATTERN` - Simplified the return condition by leveraging the extracted constant - Fix function parameter documentation
Configuration menu - View commit details
-
Copy full SHA for 0e34971 - Browse repository at this point
Copy the full SHA 0e34971View commit details -
AttachmentCommentFragment: update attachment uploading detection
Updated the `isUploading` condition to use `html.contains(CONST.ATTACHMENT_OPTIMISTIC_SOURCE_ATTRIBUTE)` instead of comparing it to `CONST.ATTACHMENT_UPLOADING_MESSAGE_HTML`, because `CONST.ATTACHMENT_UPLOADING_MESSAGE_HTML` is being removed
Configuration menu - View commit details
-
Copy full SHA for 556f795 - Browse repository at this point
Copy the full SHA 556f795View commit details -
ContextMenuActions: update attachment detection logic
Since `CONST.ATTACHMENT_UPLOADING_MESSAGE_HTML` is no longer used it's removed from the check
Configuration menu - View commit details
-
Copy full SHA for 40d07c4 - Browse repository at this point
Copy the full SHA 40d07c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7a0608 - Browse repository at this point
Copy the full SHA b7a0608View commit details -
isReportMessageAttachment: Update to pass unit tests
- The message "Uploading Attachment..." no longer exists - we don't need to test for such text to match an attachment action - All attachments use the `CONST.ATTACHMENT_SOURCE_ATTRIBUTE` it can be used to distinct them - Attachments in upload use the same attribute as well
Configuration menu - View commit details
-
Copy full SHA for d28d2e0 - Browse repository at this point
Copy the full SHA d28d2e0View commit details -
Remove
uploading-attachment
custom model from BaseHTMLEngineProviderThe `uploading-attachment` custom model is removed as it is no longer used.
Configuration menu - View commit details
-
Copy full SHA for 27ca9a8 - Browse repository at this point
Copy the full SHA 27ca9a8View commit details
Commits on Jul 16, 2024
-
ReportUtils: Enhance data attribute generation
- Enhanced data attribute generation by converting to an array and using `Array.prototype.filter` to remove falsy values. - Added additional attributes for file width and height.
Configuration menu - View commit details
-
Copy full SHA for feeb9c4 - Browse repository at this point
Copy the full SHA feeb9c4View commit details
Commits on Jul 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2903070 - Browse repository at this point
Copy the full SHA 2903070View commit details
Commits on Jul 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 58c4237 - Browse repository at this point
Copy the full SHA 58c4237View commit details -
🐛 fix(AnchorForAttachmentsOnly): update download icon visibility logic
Modified the condition for displaying the download icon in `BaseAnchorForAttachmentsOnly.tsx`. The icon will now only show if the `sourceID` is provided and the application is not offline. This change ensures that the download button does not appear while the file is still uploading and lacks a final hosted URL
Configuration menu - View commit details
-
Copy full SHA for 715ae21 - Browse repository at this point
Copy the full SHA 715ae21View commit details
Commits on Jul 29, 2024
-
🐛 fix(components/AnchorForAttachmentsOnly): add sourceID check to dow…
…nload logic Update the download logic to include a check for the presence of sourceID alongside existing conditions for isDownloading and isOffline, preventing potential errors when attempting to download attachments without a valid source ID.
Configuration menu - View commit details
-
Copy full SHA for 4008f07 - Browse repository at this point
Copy the full SHA 4008f07View commit details -
♻️ refactor(components/Attachments): improve attachment file name ext…
…raction Update the logic for extracting attachment file names by using the original file name attribute if available. This enhances clarity and ensures that the most accurate file name is utilized, falling back to the source only when necessary.
Configuration menu - View commit details
-
Copy full SHA for cab7749 - Browse repository at this point
Copy the full SHA cab7749View commit details -
🐛 fix(components/AttachmentModal): prevent downloading local file sou…
…rces Added a check to ensure local file sources (file: or blob:) are not included in the download options. This avoids redundancy and potential issues with file not found when attempting to download local files.
Configuration menu - View commit details
-
Copy full SHA for 955009b - Browse repository at this point
Copy the full SHA 955009bView commit details
Commits on Jul 30, 2024
-
🐛 fix(report/ContextMenu): hide download option for uploading files
Added a check to ensure the download option is hidden for resources that are currently being uploaded. This prevents users from attempting to download files that are not yet available, improving the user experience.
Configuration menu - View commit details
-
Copy full SHA for c147141 - Browse repository at this point
Copy the full SHA c147141View commit details -
🐛 fix(libs/ReportUtils): revert translationKey assignment for attachm…
…ents Restores original logic to set translationKey only when the comment is an attachment
Configuration menu - View commit details
-
Copy full SHA for c2c7ec9 - Browse repository at this point
Copy the full SHA c2c7ec9View commit details