Skip to content

[Chat] File Sharing Refactor#4464

Merged
jpeng-ms merged 25 commits intomainfrom
john/split-data-model
Apr 19, 2024
Merged

[Chat] File Sharing Refactor#4464
jpeng-ms merged 25 commits intomainfrom
john/split-data-model

Conversation

@jpeng-ms
Copy link
Copy Markdown
Member

@jpeng-ms jpeng-ms commented Apr 15, 2024

What

This PR contains the following changes:

  • Split data model into download and upload specific by introducing AttachmentMetadataWithProgress
  • Updated uploadOptions to include handleAttachmentSelection and handleAttachmentRemoval
  • Deprecate AttachmentUploadAdapter by making it internal
  • Renamed UploadManager to UploadTask

Why

Address review feedback

How Tested

CI

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2024

CallWithChat bundle size is increased❗.

  • Current size: 6268648
  • Base size: 6267228
  • Diff size: 1420

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2024

Chat bundle size is increased❗.

  • Current size: 2148925
  • Base size: 2147926
  • Diff size: 999

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2024

Calling bundle size is not changed.

  • Current size: 4877609
  • Base size: 4877609
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2024

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 49590 / 79196
62.61%
49590 / 79196
62.61%
1025 / 2280
44.95%
2879 / 4729
60.87%
Current 49633 / 79322
62.57%
49633 / 79322
62.57%
1025 / 2284
44.87%
2887 / 4738
60.93%
Diff 43 / 126
-0.04%
43 / 126
-0.04%
0 / 4
-0.08%
8 / 9
0.06%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2024

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 25159 / 39155
64.25%
25159 / 39155
64.25%
681 / 1222
55.72%
1993 / 3153
63.2%
Current 25168 / 39180
64.23%
25168 / 39180
64.23%
681 / 1222
55.72%
2008 / 3165
63.44%
Diff 9 / 25
-0.02%
9 / 25
-0.02%
0 / 0
0%
15 / 12
0.24%

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

registerCompletedUploads: (metadata: AttachmentMetadata[]) => AttachmentUploadTask[];
// (undocumented)
updateUploadMetadata: (id: string, metadata: AttachmentMetadata) => void;
updateUploadMetadata: (id: string, metadata: AttachmentMetadataWithProgress | AttachmentMetadata) => void;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should only take the AttachmentMetadataWithProgress shouldn't it?

Comment thread packages/communication-react/review/beta/communication-react.api.md Outdated
Comment thread packages/communication-react/review/beta/communication-react.api.md
Comment thread packages/communication-react/review/beta/communication-react.api.md Outdated
Comment thread packages/react-components/src/components/AttachmentUploadCards.tsx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

/**
* Optional array of active attachment uploads where each object has attributes
* of a attachment upload like name, progress, errorMessage etc.
* Optional array of type {@linkAttachmentMetadataWithProgress}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* Optional array of type {@linkAttachmentMetadataWithProgress}
* Optional array of type {@link AttachmentMetadataWithProgress}

/**
* Optional array of active attachment uploads where each object has attributes
* of a attachment upload like name, progress, errorMessage etc.
* Optional array of type {@linkAttachmentMetadataWithProgress}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* Optional array of type {@linkAttachmentMetadataWithProgress}
* Optional array of type {@link AttachmentMetadataWithProgress}


/**
* Metadata containing basic information about the uploaded attachment.
* Metadata containing basic information about attachment.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* Metadata containing basic information about attachment.
* Metadata containing basic information about the attachment.

Comment thread packages/react-components/src/types/Attachment.ts Outdated
Comment thread packages/react-components/src/types/Attachment.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

@jpeng-ms jpeng-ms merged commit f09bf36 into main Apr 19, 2024
@jpeng-ms jpeng-ms deleted the john/split-data-model branch April 19, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants