Skip to content

Commit

Permalink
Release/v4.0.0 beta.6 (#64)
Browse files Browse the repository at this point in the history
* chore: ASC-00000 - css module typescript config (#233)

* fix: ASC-21254 - align api signature for draft page (#210)

* fix: can't upload story

* fix: story image renderer

* fix: align comment tray component props

* fix: align story tab component props

* fix: change export name to align signature api

* fix: ddraft page

* fix: align signature api

* fix: fill color

* fix: ASC-21249 - align story tab component props (#203)

* fix: can't upload story

* fix: story image renderer

* fix: align comment tray component props

* fix: align story tab component props

* fix: change export name to align signature api

* fix: ddraft page

* fix: align signature api

* fix: story tab

* fix: ASC-21260 - align comment tray component props (#202)

* fix: can't upload story

* fix: story image renderer

* fix: align comment tray component props

* fix: align story tab component props

* fix: change export name to align signature api

* fix: ddraft page

* fix: align signature api

* fix: story tab

* fix: remove unused

* fix: comment tray

* fix: ASC-21404 - AmityViewStoryPage signature alignment  (#209)

* fix z-index

* fix: signature alignment

* fix: view story page

* feat: add to support 6 users for storybook (#238)

* feat: ASC-00000 - use more env from secrets (#239)

* feat: add to support 6 users for storybook

* fix: add to read env from secrets

* feat: ASC-00000 - add more storybook user (#240)

* feat: add to support 6 users for storybook

* fix: add to read env from secrets

* fix: add use secret on staging

* fix: permission (#244)

* fix: ASC-21393 - refactor customization 4.0  (#211)

* feat: add generateShadeColors func

* feat: add AmityUIKitManager

* chore: add tsdoc to AmityUIKitManager

* fix: merge from develop

* fix: AmityUIKit manager

* fix: remove unused

* fix: revert uikit 3

* fix: remove unused

* fix: export

* fix: move to main v4

* fix: move to v4

* fix: export path

* Refactor theme generation logic in
ThemeProvider.tsx

* fix: theme color generation

* fix: theme provider

* fix: remove unused

* feat: add Typography component with css

* fix: css

* fix: add queryClient provider

* fix: import

* fix: import

* fix: v4

* fix: conflict

* fix: draft page

* fix: setup

* fix: export

* fix: move mergedNavigationBehavior

* fix: remove unused

* fix: remove unused

* fix: uikit manager

* fix: uncomment

* fix: remove unused

* fix: remove unused

* fix: remove unused

* fix: remove unused files

* fix: remove

* fix: login

* fix: css var

* fix: css var

* fix: condition

* fix: css var

* fix: css var

* fix: hook

* fix: type

* fix: ASC-00000 - V4 fix customization (#248)

* fix: config structure

* fix: add hyperlink config

* fix: add validate

* fix: config and hyperlink

* fix: hyperlink

* fix: css

* fix: border radius

* fix: hyperlink

* fix: hyperlink

* fix: add storybook user

* fix: aspect ratio

* fix: hyperlink config css var

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix: css var module

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix: ASC-21789 - create story on view story page doesn't work (#249)

* fix: video

* fix: uncomment

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* feat(chat): ASC-0000 - Chat V4 big chunk 1 (#214)

* feat: add livechat ui

* feat: add chatButton and desktop view

* fix: bg color

* feat: move story to be under V4 storybook folder

* feat: add customComponent

* fix: change chat icon

* fix: remove unread notification

* fix: remove un-used hook

* fix: remove un-used

* fix: change style to module css

* fix: remove unused

* feat: add prefix`asc` to default css config

* fix: remove chatIcon

* fix: modal not open smoothly at the first time

* fix: remove un-used styling

* feat: update color pallate

* feat: update spacing

* feat: update color and fontSize

* fix: box shadow on header

* feat: re-structure folder to v4

* fix: import global css

* fix: use typograhy module css

* fix: remove unused

* feat: add message list and bubbles

* fix: wrap element

* fix: change file name

* feat: add compose bar

* feat: add home indicator

* feat: add sending a mesage action

* fix: sorting message to be asc

* feat: add badge for moderator

* fix: overflow message

* fix: sortBy segmentAsc

* feat: add message list pagination

* feat(chat): add draft-js as a compose bar

* feat: add loading indicator

* feat(chat): fix submit

* feat(chat): fix compose bar container

* feat: add viewing reply message

* fix: deleted message display

* fix: remove comment

* feat(chat): use default compose bar / remove draft-js

* feat(chat): remove draft

* feat(chat-state): asc-20903 done loading state

* feat(chat-state): asc-20903 restructure

* feat(chat-state): asc-20903 apply infinite scroll

* feat(chat-state): asc-20903 include error from sdk api to local hook

* feat(chat-state): asc-20903 add error state

* feat(chat-state): asc-20903 add error state

* feat(chat-mention): asc-00000 create message with mention

* feat: add popover action

* feat: add hover state for message action

* feat: add flag and mention button

* feat(chat-mention): asc-00000 click to mention

* feat: add more action

* fix: merge

* fix: hide mention and flag

* fix: ASC-20213 - fix message list (#219)

* fix: message list of the same user

* fix: z-index

* feat: confirm modal v3 to support dark mode

* fix: change to use i18n

* fix: TODO text display on Modal content

* fix: merge className

* fix: remove unused

* fix: bring overflow-y back

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix(chat): fix pagination issue (#223)

* feat(chat): ASC-21243 - create message with reply message (#218)

* feat(chat): reply placeholder

* feat(chat): create message with reply

* feat: ASC-00000 - dark mode hard code (#225)

* fix: dark theme color palatte

* fix: header color styling

* fix: colors on message bubble

* fix: color on popover

* fix: color on optionIcon

* fix(chat): asc-00000 -  fix loading state css broken (#221)

* fix(chat): asc-00000 loading state css missing

* fix(chat): asc-00000 loading state css missing

* feat(chat): ASC-20222 - connection offline alert (#213)

* feat(chat): asc-20222 - connection state

* feat(chat): asc-20222 - add more connection

* feat(chat): asc-20222 - update PR

* feat(chat): asc-20222 - update PR

* feat: update PR

* fix(chat): ASC-00000 - update mention payload (#224)

* fix(chat): update mention payload

* fix(chat): mention ALL

* fix: sample app to open sheet every selection

* fix: hide heart reaction

* feat: ASC-20213 - fix popover still show (#235)

* fix: popover still show

* fix: bring just ArrowTop code back

* fix: resize messagelist container (#232)

* feat: ASC-20213 - highlight mention message (#236)

* fix: popover still show

* fix: bring just ArrowTop code back

* feat: add hilight for mention message

* fix: truncate long text of replied message

* fix: change getTextWithMention to be a component

* fix: message not show as a new line

* feat: ASC-20213 - fix consequence message list (#237)

* fix: remove consequence message list

* fix: remove unused

* feat(chat): ASC-00000 - api alignment for chat header (#241)

* feat(chat): api alignment chat header

* Update src/v4/chat/components/AmityLiveChatHeader/livechatHeader.stories.tsx

* feat(chat): ASC-00000 - export AmityLiveChatHeader

* fix: ASC-21776 - reply message display on compose bar is over the screen (#242)

* fix: reply display message over the screen

* feat: remove comment

* feat(chat): duplicate useSocialMention => useMention and revert

* feat(chat): update pr

* fix(chat): ASC-00000 - change theme for message composer (#234)

* fix(chat): ASC-00000 - duplicate v4

* fix(chat): ASC-00000 - check message length before submit

* fix(chat): ASC-00000 -update styling

* fix(chat): ASC-00000 - update styling

* fix(chat): prettier remove code by accident

* fix(chat): remove styled component

* fix(chat): asc-21737 - update condition to prevent create duplicate message (#245)

* fix(chat): asc-21791 - fix mention payload (#243)

* feat(chat): update pr

* feat: ASC-20213 - message bubble api alignment (#247)

* fix: message bubble api aligment

* fix: to use action as params for message bubble

* feat: export elements

* fix: remove unused

* fix: change type name

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix: type name

* feat: expose component

* fix: wrong type name

* fix: modify expose component

* fix: storybook's name

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix(chat): ASC-21796 - query chat after connection back to normal + api alignment (#246)

* fix(chat): asc-21796 reload data when connection back to normal

* feat(chat): api alignment for message list

* feat(chat): export

* feat(chat): api align live chat page

* feat(chat): api align for composer

* feat(chat): update pr

* feat(chat): update pr

* feat(chat): remove all v4 component from useCustomComponent

* feat(chat): update pr - remove chat header

* feat(chat): ASC-00000 - compose bar api alignment (#250)

* feat(chat): composebar alignment

* feat(chat): update pr

* fix(chat): revert code (#251)

* feat: ASC-20213 - modal notification v4 (#252)

* fix: add confirm modal v4

* fix: change to use Notification v4

* fix: remove unused

* fix: duplicate icon to v4

* fix: move confirm model component

* fix: revert modal and confirm v3 components

* fix: revert notification v3

* fix: move Icon to v4 and remove unused icon

* fix(chat): revert code

* feat: ASC-20213 -  fix delete message display (#256)

* fix: move component to v4 folder

* fix: delete message

* feat(chat): update pr

* fix(chat): ASC-21734 - Fix UI Bug (#255)

* fix(chat): update mention ui

* fix(chat): update mention ui

* fix(chat): update delete word

* fix(chat): update mention ui

* fix(chat): update mention ui

* Update src/i18n/en.json

Co-authored-by: Pitchaya T. <[email protected]>

* feat(chat): update mention logic

* feat(chat): update pr

* feat(chat): revert text

* feat(chat): update mention logic

* fix(chat): popup width

* fix(chat): font-color in light mode

* fix(chat): placeholder

* fix(chat): fix moderator

* feat(chat): fix mention

* feat(chat): fix avatar in reply

* feat(chat): update pr

* feat(chat): use rem

* feat(chat): update pr

---------

Co-authored-by: Pitchaya T. <[email protected]>

* fix: ASC-20213 - bug staging (#257)

* fix: bug staging

* fix: revert overflow-x

* feat: ASC-20213 - livechat configuration merge (#253)

* feat: add generateShadeColors func

* feat: add AmityUIKitManager

* chore: add tsdoc to AmityUIKitManager

* fix: merge from develop

* fix: AmityUIKit manager

* fix: remove unused

* fix: revert uikit 3

* fix: remove unused

* fix: export

* fix: move to main v4

* fix: move to v4

* fix: export path

* Refactor theme generation logic in
ThemeProvider.tsx

* fix: theme color generation

* fix: theme provider

* fix: remove unused

* feat: add Typography component with css

* fix: css

* fix: add queryClient provider

* fix: import

* fix: import

* fix: color palette

* fix: change global.css file

* fix: v4

* fix: conflict

* fix: draft page

* fix: setup

* fix: export

* fix: move mergedNavigationBehavior

* fix: remove unused

* fix: remove unused

* fix: uikit manager

* fix: uncomment

* fix: remove unused

* fix: remove unused

* fix: remove unused

* fix: remove unused files

* fix: remove

* fix: login

* fix: typography and style files

* fix: typography

* fix: message type

* fix: type

* fix: add background to livechat page

* feat: add config for message bubble

* feat: fix cannot load next page

* fix: type

* feat: add placeholder for compose bar configuration

* feat: revert storybook user

* fix: use primary color from theme

* fix: nested component style

* fix: to pass class

* fix: change to be module.css

* fix: remove unused file

* fix: remove unused config

* fix: typography

* fix: default user avatar

* feat: upgrade ts-sdk

* fix: revet theme file

---------

Co-authored-by: Chaiwat Trisuwan <[email protected]>

* fix(chat): change tag

---------

Co-authored-by: ptchaya_p <[email protected]>
Co-authored-by: ptchaya_p <[email protected]>
Co-authored-by: Pitchaya T <[email protected]>
Co-authored-by: Chaiwat Trisuwan <[email protected]>

* feat(chat): ASC-0000 - export compose bar (#258)

* feat: export v4 provider (#259)

* Release/v4.0.0 beta.1 (#262)

* fix: update ts-sdk version

* chore(release): 4.0.0-beta.1

---------

Co-authored-by: Chaiwat Trisuwan <[email protected]>
Co-authored-by: bmo-amity-bot <[email protected]>

* fix: ASC-00000 - export type (#263)

* fix: export type

* fix: update version

* fix: ASC-00000 - fix provider v4 props (#261)

* fix: provider

* fix: provider

* fix: export

* fix: export

* fix: type

* fix: pnpm lock

* fix: deps

* Release/v4.0.0 beta.2 (#265)

* fix: export wrong path (#264)

* chore(release): 4.0.0-beta.2

---------

Co-authored-by: bmo-amity-bot <[email protected]>

* feat: ASC-20277 - flag unflag message (#267)

* feat: add report button on message action sheet

* feat: add flag ui on message bubble container

* fix: cannot click report button

* feat: add unFlag button

* fix: unflag button text id

* feat: add flag/unflag toast

* feat: add livechat toast

* fix: icon to support color changing

* fix: message and id for report, unreport

* fix: remove unused

* fix: use color from palette

* fix: ASC-00000 - remove sheet loading state (#271)

* fix: remove sheet in loading state

* fix: remove wrong return

* fix: ASC-21913 - type and optional field on config (#268)

* fix: type and optional field on config

* fix: remove undefined checking

* fix: use config from customization provider

* fix: add error state on delete message (#269)

* fix: ASC-21767 - mention border when got mention (#272)

* fix: mention border when got mention

* fix: remove console.log

* feat: ASC-21691 - add hyperlink style to primary color (#270)

* feat: add hyperlink style to primary color

* fix: remove className because Linktify does not support

* fix: remove nested selector and open to new tab

* fix(social): asc-00000 use internal path (#266)

* feat: ASC-17980 - global feed story targets tab and story target circle (#254)

* feat: add generateShadeColors func

* feat: add AmityUIKitManager

* chore: add tsdoc to AmityUIKitManager

* fix: merge from develop

* fix: AmityUIKit manager

* fix: remove unused

* fix: revert uikit 3

* fix: remove unused

* fix: export

* fix: move to main v4

* fix: move to v4

* fix: export path

* Refactor theme generation logic in
ThemeProvider.tsx

* fix: theme color generation

* fix: theme provider

* fix: remove unused

* feat: add Typography component with css

* fix: css

* fix: add queryClient provider

* fix: import

* fix: import

* fix: v4

* fix: conflict

* fix: draft page

* feat: global feed story tab

* fix: empty state

* fix: css module

* fix: official badge

* fix: css

* fix: css

* fix: css

* fix: update from comments

* fix: story tab item

* feat: feed v4

* fix: private condition

* fix: story

* fix: css

* fix: remove unused

* fix: story

* fix: remove unused

* fix: ignore type

* fix: progress ring

* fix: use clsx

* fix: remove ts-ignore

* fix: remove unused

* feat(chat): ASC-00000 - Muted + Banned channel (#276)

* feat(chat): isMuted done

* feat(chat): asc-00000 remove comment

* feat(chat): banned user

* feat(chat): update PR

* feat(chat): update PR

* feat(chat): ASC-00000 - fix composebar styling + limit 200 character (#275)

* fix(social): asc-00000 use  from v4 folder

* fix(chat): asc-00000 fix mention styling in composebar

* fix: update styling

* fix: compose bar styling

* feat: limit text

* feat: revert file

* feat: revert file

* feat: remove deprecated func

* fix: ASC-21913 - config type (#278)

* fix: type and optional field on config

* fix: remove undefined checking

* fix: use config from customization provider

* fix: use defaultConfig

* fix: add blocked word + not allowed link (#280)

* fix: icon (#281)

* fix: using v3 and v4 provider separately for each stories (#284)

* fix: ASC-00000 - confirm context (#285)

* fix: confirm context

* chore: Update src/social/components/Comment/index.tsx

Co-authored-by: Pitchaya T. <[email protected]>

* chore: remove unused code

---------

Co-authored-by: Pitchaya T. <[email protected]>

* fix: ASC-00000 - notification context (#286)

* fix: NotificationProvider

* fix: add NotificationProvider into UiKitProvider

* chore: move LiveChatNotificationProvider to chat

* fix: ASC-00000 - add login step on UiKitProvider (#287)

* fix: login

* fix: Update src/core/providers/UiKitProvider/index.tsx

* fix: message remain on compose bar after sending success (#289)

* fix: user muted state (#293)

* fix: ASC-22026 - moderator cannot send message on muted channel (#294)

* fix: user muted state

* fix: moderator cannot send message on muted channel

* fix: ASC-219999 - incorrect comment count color (#283)

* fix: font

* fix: story tab gap

* fix: modal

* fix: ASC-21979 - can't click header on video preview (#282)

* fix: use css var

* fix: move v4 story

* fix: move folder

* fix: remove index path

* fix: styled to css module

* fix: use v4 (#295)

* fix: ASC-20502 - shouldAllowCreation condition (#296)

* fix: shouldAllowCreation

* fix: type

* fix: ASC-20883 - remove latestComments prop (#290)

* fix: pass latestComments to CommentList component

* fix: remove latestComments prop

* fix: add v3 provider (#298)

* fix: ASC-21980 - hyper link background color (#299)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* feat: ASC-21665 - darkmode config (#279)

* fix: type and optional field on config

* fix: remove undefined checking

* fix: use config from customization provider

* feat: handle switch light/dark mode

* feat: add configuration live chat page

* feat: add config on livechat header

* feat: add theme configuration message list

* feat: add configuration theme on message composer

* fix: modal styling

* feat: add configuration for livechat notification

* fix: copy message to use livechat notification

* fix: pr review

* fix: pr

* fix: user preferred theme

* fix: ASC-21980 - fix remove link button style (#300)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* fix: button

* fix: character limit (#302)

* fix: change permission to check if user is a moderator (#304)

* fix: ASC-22060 - remove onBack() on draft page (#303)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* fix: button

* fix: hyperlink style

* fix: style

* fix: story tab item font color

* fix: css var

* fix: remove onBack()

* fix: css

* fix: remove unused

* fix: remove unused line

* fix: ASC-21980 - hyperlink style (#301)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* fix: button

* fix: hyperlink style

* fix: style

* fix: story tab item font color

* fix: css var

* fix: css

* fix: remove unused

* fix: remove line

* fix: ASC-22063 - fix story global feed pagination (#305)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* fix: button

* fix: hyperlink style

* fix: style

* fix: story tab item font color

* fix: css var

* fix: remove onBack()

* fix: story global feed pagination

* fix: add comment

* fix: remove new line

* fix: remove console.log

* fix: logic

* fix: story style

* chore: Update src/v4/styles/global.css

* fix: remove console.log

---------

Co-authored-by: Bonn <[email protected]>

* fix: official condition (#306)

* fix: ASC-19646 - notification error when failed create story (#307)

* fix: official condition

* fix: add error

* fix: ASC-22060 - navigate to community when create story (#308)

* fix: official condition

* fix: add error

* fix: navigate

* fix: ASC-21985 - navigate story target for global feed story (#309)

* fix: official condition

* fix: add error

* fix: navigate

* fix: story global feed navigate

* fix: onClose

* fix: ASC-22060 - create story on view story page (#310)

* fix: story global feed upload

* fix: remove console.log

* fix: navigate

* fix: ASC-21970 - story uploading state (#297)

* fix: font

* fix: story tab gap

* fix: use css var

* fix: modal

* fix: can't delete story

* fix: v4 component

* fix: hyperlink config

* fix: shouldAllowCreation

* fix: type

* fix: uploading state

* fix: remove console.log

* fix: use css var

* fix: modal

* fix: v4 component

* fix: hyperlink config

* fix: shouldAllowCreation

* fix: type

* fix: uploading state

* fix: remove console.log

* fix: storyRing state

* fix: remove fill in verified icon

* fix: story ring

* fix: icon

* fix: story

---------

Co-authored-by: Bonn <[email protected]>

* fix: notification style (#311)

* fix: add onAllStoriesEnd (#312)

* Release/v4.0.0 beta.3 (#314)

* chore: upgrade dependencies

* fix: cherry-pick bugs from v3

* chore(release): 4.0.0-beta.3

---------

Co-authored-by: bmo-amity-bot <[email protected]>

* chore(sdk): ASC-00000 - custom build ci (#316)

* chore: custom build ci

* chore: remove unused libs

* chore: fix ci

* chore: fix ci

* fix: revert ci

* fix: remove pnpm cache step

* fix: pnpm install step

* fix: ci

* fix: add NPM_TOKEN

* fix: update .npmrc

* fix: update pnpm-lock.yaml

* fix: path

* chore: add cache step

* feat: only creator or story permission can see impression (#319)

* feat: ASC-22084 - StoryPreview component for Console (#317)

* feat: story preview component for console

* fix: ui

* fix: story preview prop

* fix: export

* fix: story prop

* fix: story prop

* fix: trigger action

* fix: trigger action

* fix: trigger action

* fix: trigger action

* fix: action

* update readme (#323)

* feat: ASC-20558 - swipe down gesture to close story  (#321)

* feat: apply framer motion

* feat: add transition

* fix: swipe down for video

* fix: video story should pause when drag

* fix: remove unused libs

* fix: wrong spell function name

* fix: remove unused

* chore: change story component name

* fix: v4 avatar component

* feat: add ghost prop to button

* fix: remove unused

* fix: bottom sheet component

* fix: use rem

* fix: load more wrapper

* fix: draft page

* fix: load more button

* fix: hyperlink

* fix: css

* fix: icon

* fix: css

* fix: css

* fix: comment

* fix: story comment

* fix: remove unused

* fix: import

* fix: button dark theme

* fix: custom css

* fix: bottom sheet css

* fix: css

* fix: import

* fix: css

* fix: css

* fix: avatar

* fix: remove console.log

* fix: avatar

* fix: use clsx

* fix: whitespace

* fix: use icon from v4

* fix: icon

* fix: loading indicator

* fix: ASC-22263 - hyperlink background (#326)

* fix: hyperlink background

* fix: hyperlink icon color

* fix: css (#327)

* fix: ASC-22263 - hyperlink doesn't show in view story page (#328)

* fix: hyperlink background

* fix: hyperlink icon color

* fix: css (#327)

* fix: story

* fix: css

* fix: ASC-22264 - reply comment margin (#329)

* fix: hyperlink background

* fix: hyperlink icon color

* fix: css

* fix: add scroller

* fix: comment

* fix: ASC-21792 - comment list infinite scroll (#330)

* fix: hyperlink background

* fix: hyperlink icon color

* fix: css

* fix: add scroller

* fix: comment

* fix: scroll

* fix: comment list

* fix: reaction list

* fix: comment date css shrink

* fix: type

* fix: css

* fix: color

* fix: comment scroll

* fix: comment list

* fix: use intersection observer instead

* fix: padding

* Release/v4.0.0 beta.4 (#334)

* fix: github actions

* chore: dropdown instead of free-text

* chore: add none option

* chore: add none option for pre-release input

* fix: add NPM_TOKEN env

* chore(release): 4.0.0-beta.4

---------

Co-authored-by: bmo-amity-bot <[email protected]>

* fix: to support un config value (#340)

* fix: hyperlink long text (#335)

* fix: hyperlink custom text input max length (#336)

* fix: ASC-220001 - share story button (#337)

* fix: share story button

* fix: use avatar v4

* fix: remove unused

* fix: ASC-21590 - hyperlink ui (#347)

* fix: hyperlink long text

* fix: story hyperlink

* fix: story commu condition (#346)

* feat: ASC-22133 - custom reaction provider (#325)

* feat: add custom reaction provider

* feat: add to use reactionsContext

* fix: rename provider

* feat: ASC-22127 - reaction preview message bubble (#331)

* feat: add reaction preview container

* feat: add abbreviateCount function

* feat: add fallback reaction

* feat: update pr

---------

Co-authored-by: Kiattirat S <[email protected]>

* feat: ASC-22124 - message reaction picker (#332)

* feat: add reaction container and button

* feat: add active and hover state

* fix: storybook display

* fix: remove unused

* feat: add checking for active state

* feat: add open state on reaction picker

* feat: add hover state on Quick reaction button

* feat: seperate components

* feat: close picker when clicking outside

* feat: add handling on click reaction button

* fix: hover state

* Update src/v4/chat/components/LiveChatMessageContent/MessageReaction/index.tsx

* Delete src/v4/chat/hooks/useMessageReactions.ts

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* feat: ASC-22130 - add quick reaction (#339)

* feat: add handling for quick reaction button

* fix: add await to wait for add and remove reaction

* fix: reaction pickert style

* fix: storybook name

* fix: reaction picker storybook

* feat: add pageId, componentId and elementId

* fix: change internal component name and export

* fix: export from components

* fix: message reaction components name

* feat: add static file to include in storybook build

* fix: remove duplicated file

* fix: new design on my reaction

* fix: not use z-index

* fix: position of each reaction

* fix: remove border on reaction preview for my reaction style

* fix: remove unused

* feat(reaction): ASC-22136 - reaction panel (#344)

* feat: add handling for quick reaction button

* fix: add await to wait for add and remove reaction

* fix: reaction pickert style

* fix: storybook name

* fix: reaction picker storybook

* feat: add pageId, componentId and elementId

* fix: remove comment

* feat(reaction-list): add empty files

* feat(reaction): reuse reaction tab from social

* feat(reaction): pass openReaction func to child

* feat(reaction): render data from config

* feat(reaction): update panel style

* feat(reaction): update reaction list

* feat(reaction): update reaction list

* feat(reaction): add all state for reaction list

* feat(reaction): change unit

* feat(reaction): remove unused files

* feat(reaction): update PR

* feat(reaction): update PR

* feat(reaction): update PR

* fix: remove unused

* feat(reaction): update PR

---------

Co-authored-by: ptchaya_p <[email protected]>
Co-authored-by: Pitchaya T <[email protected]>

---------

Co-authored-by: Kiattirat S <[email protected]>

* fix: ASC-22623 - story video (#349)

* fix: story video

* fix: video

* fix: remove console.log

* feat(reaction): update condition (#350)

* fix(reaction): ASC-22611 - update missing ui and action to remove reaction from message (#348)

* fix: ASC-22611 - update ui

* fix(reaction): missing ui and action to remove reaction from message

* fix: ASC-22611 - update ui

* fix: ASC-22611 - update ui

* fix(reaction): hide 0 reaction count

* fix(reaction): update pr

* fix(reaction): export reaction list

* fix: create story condition (#352)

* fix: ASC-222740 - create story condition for global-admin role (#354)

* fix: create story condition

* fix: condition

* fix: condition

* fix: condition

* fix(reaction): ASC-22622 - fix reaction UI bugs (#355)

* fix(reaction): update pagination

* fix(reaction): use total reactor count from message / story / post / comments

* fix(reaction): update ui

* fix(reaction): update ui

* fix: ASC-22740 - create story permission condition to create story (#356)

* fix: create story condition

* fix: condition

* fix: condition

* fix: condition

* fix: condition

* feat(SDK): test build

* feat(SDK): upgrade ts-sdk version

* fix: ASC-21529 - view story wrapper css (#359)

* fix: css

* refactor: view story page condition

* fix: ASC-20521 - story delete condition (#360)

* fix: story delete condition

* fix: condition

* fix: ASC-20505 - condition for non member (#361)

* fix: condition for non member

* fix: hyperlink config

* fix: condition

* fix: hook (#362)

* fix: ASC-22947 - hyperlink config bottom sheet condition (#367)

* fix: hyperlink action condition

* fix: hyperlink css

* fix: remove unused

* fix: hyperlink config condition

* fix: ASC-22949 - video story bug when delete (#366)

* fix: video story bug when delete

* fix: remove console.log

* fix: condition

* fix: close bottom sheet condition (#365)

* fix: ASC-20502 - comment condition (#363)

* fix: comment condition

* fix: story comment compose bar condition

* fix: ASC-22484 - hyperlink config css (#345)

* fix: hyperlink config css

* fix: remove unused

* fix: remove unused

* fix: hyperlink

* fix: color bg

* fix: remove console log

* fix: type

* fix: type

* fix: hyperlink

* fix: ASC-20532 - deleted comment block (#364)

* fix: deleted comment block

* fix: css

* fix: remove unused props

* fix: css var

* fix: category card responsive styles (#372)

* fix: ASC-22947 - story can't add hyperlink (#373)

* fix: hyperlink action condition

* fix: hyperlink css

* fix: remove unused

* fix: hyperlink config condition

* fix: css

* fix: ASC-00000 - bring back v3 code (#358)

* Revert "fix: ASC-21481 - remove unnecessary request to prevent rate limit (#230)"

This reverts commit e9c82ec.

# Conflicts:
#	pnpm-lock.yaml
#	src/core/providers/UiKitProvider/index.tsx
#	src/social/components/CommentList/index.tsx
#	src/social/components/CommentList/styles.tsx
#	src/social/components/EngagementBar/UIEngagementBar.tsx

* fix: reply comment text

* Revert "fix: ASC-21481 - remove unnecessary request to prevent rate limit (#230)"

This reverts commit e9c82ec.

# Conflicts:
#	pnpm-lock.yaml
#	src/core/providers/UiKitProvider/index.tsx
#	src/social/components/CommentList/index.tsx
#	src/social/components/CommentList/styles.tsx
#	src/social/components/EngagementBar/UIEngagementBar.tsx

* fix: reply comment text

* fix: undefined .length

* fix: video should pause when click item in action menu (#375)

* fix: hyperlink text color (#376)

* fix: ASC-21507 - reset form when confirm remove hyperlink (#368)

* fix: hyperlink action condition

* fix: hyperlink css

* fix: remove unused

* fix: hyperlink config condition

* fix: reset form when confirm remove hyperlink

* chore(release): 4.0.0-beta.6

---------

Co-authored-by: Bonn <[email protected]>
Co-authored-by: Chaiwat Trisuwan <[email protected]>
Co-authored-by: Kiattirat Sujjapongse <[email protected]>
Co-authored-by: bmo-amity-bot <[email protected]>
  • Loading branch information
5 people authored Jun 18, 2024
1 parent a09cf8a commit 47f133c
Show file tree
Hide file tree
Showing 48 changed files with 958 additions and 596 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 4.0.0-beta.6 (2024-06-07)

## 4.0.0-beta.5 (2024-05-28)

## 4.0.0-beta.3 (2024-04-26)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amityco/ui-kit-open-source",
"version": "4.0.0-beta.5",
"version": "4.0.0-beta.6",
"engines": {
"node": ">=16",
"pnpm": ">=8"
Expand Down
7 changes: 6 additions & 1 deletion src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,12 @@
"storyCreation.hyperlink.form.linkTextLabel": "Customize link text",
"storyCreation.hyperlink.form.linkTextPlaceholder": "Name your link",
"storyCreation.hyperlink.form.linkTextDescription": "This text will show on the link instead of URL.",
"storyCreation.hyperlink.validation.invalidUrl": "Please enter a valid URL.",
"storyCreation.hyperlink.form.removeButton": "Remove link",
"storyCreation.hyperlink.removeConfirm.title": "Remove link",
"storyCreation.hyperlink.removeConfirm.content": "This link will be removed from story.",
"storyCreation.hyperlink.removeConfirm.cancel": "Cancel",
"storyCreation.hyperlink.removeConfirm.confirm": "Remove",
"storyCreation.hyperlink.validation.error.invalidUrl": "Please enter a valid URL.",
"storyCreation.hyperlink.validation.error.whitelisted": "Please enter a whitelisted URL.",
"storyCreation.hyperlink.validation.error.blocked": "Your text contains a blocklisted word.",

Expand All @@ -381,10 +381,15 @@
"storyViewer.commentSheet.disabled": "Comments are disabled for this story",
"storyViewer.commentSheet.replyingTo": "Replying to",
"storyViewer.toast.like.disabled": "Join community to interact with all stories",
"storyViewer.toast.comment.reported": "Comment reported",
"storyViewer.toast.comment.unreported": "Comment unreported",

"storyViewer.commentComposeBar.submit": "Post",

"storyDraft.button.shareStory": "Share story",
"storyDraft.notification.hyperlink.error": "Can’t add more than one link to your story.",

"storyTab.title": "Story",

"storyTab.title": "Story",

Expand Down
17 changes: 7 additions & 10 deletions src/social/components/CommentList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React, { memo } from 'react';
import { useIntl } from 'react-intl';

import Comment from '~/social/components/Comment';
import { NoCommentsContainer, TabIcon, TabIconContainer } from './styles';

import { TabIcon, TabIconContainer } from './styles';
import LoadMoreWrapper from '../LoadMoreWrapper';
import usePostSubscription from '~/social/hooks/usePostSubscription';
import { SubscriptionLevels } from '@amityco/ts-sdk';
Expand All @@ -11,6 +13,7 @@ interface CommentListProps {
parentId?: string;
referenceId?: string;
referenceType: Amity.CommentReferenceType;
// filterByParentId?: boolean;
readonly?: boolean;
isExpanded?: boolean;
limit?: number;
Expand All @@ -21,6 +24,8 @@ const CommentList = ({
referenceId,
referenceType,
limit = 5,
// TODO: breaking change
// filterByParentId = false,
readonly = false,
isExpanded = true,
}: CommentListProps) => {
Expand All @@ -41,7 +46,7 @@ const CommentList = ({
});

const loadMoreText = isReplyComment
? formatMessage({ id: 'collapsible.viewMoreReplies' })
? formatMessage({ id: 'collapsible.viewMoreReplies' }, { count: comments.length })
: formatMessage({ id: 'collapsible.viewMoreComments' });

const prependIcon = isReplyComment ? (
Expand All @@ -50,14 +55,6 @@ const CommentList = ({
</TabIconContainer>
) : null;

if (comments.length === 0 && referenceType === 'story' && !isReplyComment) {
return (
<NoCommentsContainer>
{formatMessage({ id: 'storyViewer.commentSheet.empty' })}
</NoCommentsContainer>
);
}

if (comments.length === 0) return null;

return (
Expand Down
10 changes: 0 additions & 10 deletions src/social/components/CommentList/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,3 @@ export const TabIconContainer = styled.div`
display: flex;
margin-right: 8px;
`;

export const NoCommentsContainer = styled.div`
${({ theme }) => theme.typography.body};
color: ${({ theme }) => theme.palette.base.shade2};
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
`;
4 changes: 2 additions & 2 deletions src/social/components/EngagementBar/UIEngagementBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const UIEngagementBar = ({
<CommentIcon /> <FormattedMessage id="comment" />
</SecondaryButton>
</InteractionBar>
{latestComments.length > 0 ? (
{latestComments?.length > 0 ? (
<CommentList referenceId={postId} referenceType={'post'} limit={COMMENTS_PER_PAGE} />
) : null}

Expand All @@ -91,7 +91,7 @@ const UIEngagementBar = ({
<NoInteractionMessage>
<FormattedMessage id="community.cannotInteract" />
</NoInteractionMessage>
{latestComments.length > 0 ? (
{latestComments?.length > 0 ? (
<CommentList
referenceId={postId}
referenceType={'post'}
Expand Down
1 change: 1 addition & 0 deletions src/social/components/Feed/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { memo, useCallback } from 'react';
import DefaultPostRenderer from '~/social/components/post/Post/DefaultPostRenderer';

import useCommunitiesList from '~/social/hooks/useCommunitiesList';
import PostCreator from '~/social/components/post/Creator';
import Post from '~/social/components/post/Post';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import styled from 'styled-components';
import EmptyState from '~/core/components/EmptyState';

export const Grid = styled.div`
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 16px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
`;

export const ListEmptyState = styled(EmptyState)`
Expand Down
31 changes: 16 additions & 15 deletions src/social/components/post/Post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import React, { memo } from 'react';
import usePost from '~/social/hooks/usePost';
import usePoll from '~/social/hooks/usePoll';
import DefaultPostRenderer from './DefaultPostRenderer';

import useSDK from '~/core/hooks/useSDK';
import useUser from '~/core/hooks/useUser';
import { PollRepository, PostRepository, SubscriptionLevels } from '@amityco/ts-sdk';

import usePostByIds from '~/social/hooks/usePostByIds';
import { useCustomComponent } from '~/core/providers/CustomComponentsProvider';
import useImage from '~/core/hooks/useImage';
import usePostFlaggedByMe from '~/social/hooks/usePostFlaggedByMe';
Expand All @@ -23,11 +24,13 @@ interface PostProps {

const Post = ({ postId, className, hidePostTarget, readonly, onDeleted }: PostProps) => {
const post = usePost(postId);
const avatarFileUrl = useImage({ fileId: post?.creator?.avatarFileId, imageSize: 'small' });

const { isFlaggedByMe, flagPost, unflagPost } = usePostFlaggedByMe(post);

const postedUser = useUser(post?.postedUserId);
const avatarFileUrl = useImage({ fileId: postedUser?.avatarFileId, imageSize: 'small' });
const childrenPosts = usePostByIds(post?.children);
const { userRoles } = useSDK();
const { isFlaggedByMe, toggleFlagPost } = usePostFlaggedByMe(post);
const postRenderFn = usePostRenderer(post?.dataType);
const { currentUserId } = useSDK();

usePostSubscription({
postId,
Expand All @@ -40,9 +43,7 @@ const Post = ({ postId, className, hidePostTarget, readonly, onDeleted }: PostPr
shouldSubscribe: () => !!post,
});

const pollPost = (post?.latestComments || []).find(
(childPost: Amity.Post) => childPost.dataType === 'poll',
);
const pollPost = (childrenPosts || []).find((childPost) => childPost.dataType === 'poll');

const poll = usePoll((pollPost?.data as Amity.ContentDataPoll)?.pollId);
const isPollClosed = poll?.status === 'closed';
Expand Down Expand Up @@ -74,21 +75,21 @@ const Post = ({ postId, className, hidePostTarget, readonly, onDeleted }: PostPr
return (
<>
{postRenderFn({
childrenPosts: post?.latestComments || [],
childrenPosts: childrenPosts || [],
handleClosePoll,
isPollClosed,
avatarFileUrl,
user: post?.creator,
user: postedUser,
poll,
className,
currentUserId: post?.postedUserId || undefined,
currentUserId: currentUserId || undefined,
hidePostTarget,
post,
userRoles: post?.creator?.roles || [],
userRoles,
readonly,
isFlaggedByMe,
handleReportPost: flagPost,
handleUnreportPost: unflagPost,
handleReportPost: toggleFlagPost,
handleUnreportPost: toggleFlagPost,
handleApprovePost,
handleDeclinePost,
handleDeletePost,
Expand Down
4 changes: 1 addition & 3 deletions src/social/hooks/collections/useCommentsCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ type useCommentsParams = {
referenceId?: string | null;
referenceType: Amity.CommentReferenceType;
limit?: number;
shouldCall?: () => boolean;
// breaking changes
// first?: number;
// last?: number;
Expand All @@ -18,7 +17,6 @@ export default function useCommentsCollection({
referenceId,
referenceType,
limit = 10,
shouldCall = () => true,
}: useCommentsParams) {
const { items, ...rest } = useLiveCollection({
fetcher: CommentRepository.getComments,
Expand All @@ -28,7 +26,7 @@ export default function useCommentsCollection({
referenceType,
limit,
},
shouldCall: () => shouldCall() && !!referenceId && !!referenceType,
shouldCall: () => !!referenceId && !!referenceType,
});

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export const AmityLiveChatMessageComposeBar = ({
multiline
disabled={disabled}
placeholder={
componentConfig?.placeholder_text ||
(typeof componentConfig?.placeholder_text === 'string' &&
componentConfig?.placeholder_text) ||
formatMessage({
id: 'livechat.composebar.placeholder',
})
Expand Down
7 changes: 5 additions & 2 deletions src/v4/chat/components/MessageQuickReaction/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback } from 'react';
import { useCustomization } from '~/v4/core/providers/CustomizationProvider';
import { useCustomReaction } from '~/v4/core/providers/CustomReactionProvider';
import { AmityReactionType, useCustomReaction } from '~/v4/core/providers/CustomReactionProvider';
import { QuickReactionIcon } from '~/v4/icons/QuickReactionIcon';
import { selectMessageReaction } from '~/v4/utils/selectMessageReaction';
import styles from './styles.module.css';
Expand Down Expand Up @@ -30,7 +30,10 @@ export const MessageQuickReaction = ({
elementConfig.reaction &&
reactionConfig.find((config) => config.name === elementConfig.reaction)
) {
selectMessageReaction({ reactionName: elementConfig.reaction, message });
selectMessageReaction({
reactionName: elementConfig.reaction as AmityReactionType['name'],
message,
});
}

onSelectReaction && onSelectReaction();
Expand Down
29 changes: 12 additions & 17 deletions src/v4/core/components/BottomSheet/BottomSheet.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,24 @@ Note that you might need to use !important for style overrides since the inner s
which have higher specificity.
*/

.react-modal-sheet-container {
color: var(--asc-color-base-default);
}

.react-modal-sheet-backdrop {
background-color: var(--asc-color-base-inverse, rgba(0, 0, 0, 0.5));
.bottomSheet__container {
background-color: var(--asc-color-base-background);
}

.react-modal-sheet-header {
.bottomSheet__header {
padding: 1rem;
display: flex;
padding-bottom: 1rem;
justify-content: center;
align-items: center;
gap: 0.5rem;
align-self: stretch;
background-color: var(--asc-color-base-background);
color: var(--asc-color-base-default);
border-bottom: 1px solid var(--asc-color-base-shade4);
}

.react-modal-sheet-content {
display: flex;
.bottomSheet__drag-indicator {
}

.bottomSheet__content {
background-color: var(--asc-color-base-background);
padding: 1rem;
color: var(--asc-color-base-default);
}

.bottomSheet__backdrop {
background-color: rgba(0, 0, 0, 0.5);
}
27 changes: 12 additions & 15 deletions src/v4/core/components/BottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,29 @@ interface BottomSheetProps {
headerTitle?: string;
cancelText?: string;
okText?: string;
className?: string;
}

export const BottomSheet = ({ children, headerTitle, ...props }: BottomSheetProps) => {
return (
<Sheet {...props}>
<Sheet.Container
className={styles['react-modal-sheet-container']}
style={{
backgroundColor: 'var(--asc-color-base-background)',
}}
>
<Sheet.Container className={styles.bottomSheet__container}>
<Sheet.Header
style={{
borderTopLeftRadius: '1.25rem',
borderTopRightRadius: '1.25rem',
backgroundColor: 'var(--asc-color-base-background)',
}}
/>
{headerTitle && (
<Sheet.Header className={styles['react-modal-sheet-header']}>
<Typography.Title>{headerTitle}</Typography.Title>
</Sheet.Header>
)}
<Sheet.Content className={styles['react-modal-sheet-content']}>{children}</Sheet.Content>
>
<Sheet.Header />
{headerTitle && (
<Sheet.Header className={styles.bottomSheet__header}>
<Typography.Title>{headerTitle}</Typography.Title>
</Sheet.Header>
)}
</Sheet.Header>
<Sheet.Content className={styles.bottomSheet__content}>{children}</Sheet.Content>
</Sheet.Container>
<Sheet.Backdrop className={styles['react-modal-sheet-backdrop']} onTap={props.onClose} />
<Sheet.Backdrop onTap={props.onClose} />
</Sheet>
);
};
4 changes: 2 additions & 2 deletions src/v4/core/components/ConfirmModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Confirm = ({
}
onCancel={onCancel}
>
<div className={styles.confirmModalContent}>{content}</div>
<div>{content}</div>
</Modal>
);

Expand All @@ -61,7 +61,7 @@ export const ConfirmComponent = () => {
confirmData?.onOk && confirmData.onOk();
};

return <Confirm {...confirmData} onCancel={onCancel} onOk={onOk} />;
return <Confirm {...confirmData} onCancel={onCancel} onOk={onOk} className={styles.background} />;
};

export default Confirm;
4 changes: 4 additions & 0 deletions src/v4/core/components/ConfirmModal/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
max-width: 22.5rem !important;
}

.background {
background-color: var(--asc-color-base-background);
}

.footer {
display: flex;
justify-content: flex-end;
Expand Down
Loading

0 comments on commit 47f133c

Please sign in to comment.