Skip to content

Conversation

@HoonBaek
Copy link
Contributor

@HoonBaek HoonBaek commented Sep 1, 2023

  • Improve the index_d_ts
    • Add props types for Channel/component/FileViewer
    • Add props types for ui/FileViewer
    • Import CoreMessageType and SendableMessageType from SendbirdUIKitGlobal
    • Use destructuring import for SendbirdUIKitGlobal
  • Add ChangeLog for v3.6.8
## [v3.6.8] (Sep 1 2023)
### Feats:
* Update `ui/FileViewer` to support multiple images
  * Modify the props structure
    ```typescript
    export enum ViewerTypes {
      SINGLE = 'SINGLE',
      MULTI = 'MULTI',
    }
    interface SenderInfo {
      profileUrl: string;
      nickname: string;
    }
    interface FileInfo {
      name: string;
      type: string;
      url: string;
    }
    interface BaseViewer {
      onClose: (e: React.MouseEvent) => void;
    }
    interface SingleFileViewer extends SenderInfo, FileInfo, BaseViewer {
      viewerType?: typeof ViewerTypes.SINGLE;
      isByMe?: boolean;
      disableDelete?: boolean;
      onDelete: (e: React.MouseEvent) => void;
    }
    interface MultiFilesViewer extends SenderInfo, BaseViewer {
      viewerType: typeof ViewerTypes.MULTI;
      fileInfoList: FileInfo[];
      currentIndex: number;
      onClickLeft: () => void;
      onClickRight: () => void;
    }
    export type FileViewerComponentProps = SingleFileViewer | MultiFilesViewer;
    ```
* Export misc. utils
  * `Channel/utils/getMessagePartsInfo`
  * `Channel/utils/compareMessagesForGrouping`
  * `Message/hooks/useDirtyGetMentions`
  * `ui/MessageInput/hooks/usePaste`
* Provide fetchChannelList method via ChannelListContext

### Fixes:
* Apply some props which is related to the `metadata` to the ChannelListQuery
  * Add metadataKey, metadataValues, and metadataStartsWith to the Channel.queries.channelListQuery
  * How to use
    ```javascript
    <Channel or ChannelProvider
      queries={{
        channelListQuery: {
          metadataKey: 'isMatching',
          metadataValues: ['true'],
        }
      }}
    />
    ```
* Improve types of `ui/FileViewer` and `Channel/component/FileViewer`
  * Add some props that have been missed
* Fix `<ImageRenderer />` not converting number to pixel string
* Modify the yypes on useChannelContext & useThreadContext
  * `useChannelContext.setQuoteMessage` should accept `UserMessage | FileMessage`
  * `useThreadContext.sendMessage` should be `string`

* Add props types for Channel/component/FileViewer
* Add props types for ui/FileViewer
* Import CoreMessageType and SendableMessageType from SendbirdUIKitGlobal
* Use destructuring import for SendbirdUIKitGlobal
Copy link
Contributor

@chohongm chohongm left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@AhyoungRyu AhyoungRyu left a comment

Choose a reason for hiding this comment

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

👍

HoonBaek and others added 3 commits September 1, 2023 14:16
Co-authored-by: Ahyoung Ryu <irene.ryu@sendbird.com>
Co-authored-by: Ahyoung Ryu <irene.ryu@sendbird.com>
@HoonBaek HoonBaek merged commit 907d261 into main Sep 1, 2023
@HoonBaek HoonBaek deleted the release/v3.6.8 branch September 1, 2023 05:24
@HoonBaek HoonBaek restored the release/v3.6.8 branch September 1, 2023 05:42
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.

4 participants