Skip to content
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

Add wallets create group comp #906

Merged
merged 562 commits into from
Dec 1, 2023
Merged

Conversation

KlausMikhaelson
Copy link
Contributor

Added add wallets step in create group component

mohammeds1992 and others added 30 commits August 17, 2023 01:09
* feat: created architechture

* fix: added context values (#594)

* Chat dataprovider (#596)

* feat: data provider for chat component

* fix: replaced react.usestate to usestate

* fix: added props as the initial state and changed state name

* fix: reverted chat context changes and renamed values

* fix: added test page for chat ui components (#597)

* added chatbubble component (#602)

* feat: added chatbubble component

* fix: made the messageBubble's width to fit-content

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* fix: added theme

* Group chat bubble (#604)

* feat: moved test component to testui folder & replaced dummy data with sdk response

* feat: added twitter card and address for group chat received msg

* feat: made the messageaddress reusable, added account from context

* fix: removed unnecessary div and unused props and console logs

* feat: adding pfp in text bubbles

* fix: replaced hook with function and added pfp to messagebubble

* fix: fixed image alignment

* fix: changed border-radius of msg bubble and changed function name

* fix: fixed theme and decryptedPrivateKey name (#616)

* fix: fixed theme and decryptedPrivateKey name

* fix: fixed bug

* fix: fixed theme reviews

* Message list (#615)

* fix: message list comp

* fix: message list comp

* fix: added pagination

* fix: added pagination

* fix: pagination

* fix: create useChatData hook

* fix: fixed minor bug

* fix: socket issues fixed

* fix: added theme in msgbubble (#620)

* fix: added theme in msgbubble

* fix: fixed import

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* fix: exported the theme (#623)

* fix: exported the theme

* fix: fixed issues

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* Typebar component (#631)

* feat: added typebar UI

* feat: added functions to typebar

* fix: added icon

* fix: fixed theme issues

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* feat: added connectbutton

* fix: fixed connectbtn ui and remove disconnect and fixed error on disconnect

* fix: fixed create account getting called twice

* Profile Header Component (#636)

* feat: profile header

* feat: update profile header

* fix: update hooks

* fix: video icon ui

* feat: add group modal

* fix: add modal info

* fix: edit components

* fix: commit modal theme

* fix: updating UI

* fix: ensname

* fix: add notifs

* fix: remove alerts

* fix: remove alert logs

* fix: push fixes

* fix: conflicts

* Message container (#635)

* fix: added theme in msgbubble

* fix: fixed import

* fix: fixed message-list

* fix: added approve intent

* fix: added fixes

* fix: fixed socket bug

* fix: fixed message from socket

* fix: fixed minor issues

* fix: fixed typebar theming

* fix: fixed env issue

* fix: fixed message not updating issue

* refactor: added isConnected prop in msgContainer

* refactor: resolve merge conflicts

* fix: fixed request sending

* fix: fixed decryption

* fix: fixed env issue

* feat: added profile header in message container

---------

Co-authored-by: KlausMikhaelson <[email protected]>
Co-authored-by: Nilesh Gupta <[email protected]>

* fix: updated svg to react component

* fix: changed svg to tsx component

* fix: fixed review changes (#646)

* fix: fixed review changes

* fix: resolved issues

---------

Co-authored-by: Nilesh Gupta <[email protected]>

* Profile Header -> Chat Profile fixes (#647)

* feat: profile header

* feat: update profile header

* fix: update hooks

* fix: video icon ui

* feat: add group modal

* fix: add modal info

* fix: edit components

* fix: commit modal theme

* fix: updating UI

* fix: ensname

* fix: add notifs

* fix: remove alerts

* fix: remove alert logs

* fix: push fixes

* fix: conflicts

* fix: notifs

* fix: correct theme colors

* fix: renaming profileHeader

* fix: qa fixes

* fix: loader

* refactor: resolved issues

* fix: edit types

---------

Co-authored-by: Nilesh Gupta <[email protected]>

* fix: resolved package not added issue

* Fix: modal issue in group info && alert remove members (#653)

* fix: modal

* fix: update changes

* refactor: resolved issue

---------

Co-authored-by: Nilesh Gupta <[email protected]>

* fix: QA fixes (#654)

---------

Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Satyam <[email protected]>
Co-authored-by: KlausMikhaelson <[email protected]>
Co-authored-by: Kolade <[email protected]>
* feat: created architechture

* fix: added context values (#594)

* Chat dataprovider (#596)

* feat: data provider for chat component

* fix: replaced react.usestate to usestate

* fix: added props as the initial state and changed state name

* fix: reverted chat context changes and renamed values

* fix: added test page for chat ui components (#597)

* added chatbubble component (#602)

* feat: added chatbubble component

* fix: made the messageBubble's width to fit-content

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* fix: added theme

* Group chat bubble (#604)

* feat: moved test component to testui folder & replaced dummy data with sdk response

* feat: added twitter card and address for group chat received msg

* feat: made the messageaddress reusable, added account from context

* fix: removed unnecessary div and unused props and console logs

* feat: adding pfp in text bubbles

* fix: replaced hook with function and added pfp to messagebubble

* fix: fixed image alignment

* fix: changed border-radius of msg bubble and changed function name

* fix: fixed theme and decryptedPrivateKey name (#616)

* fix: fixed theme and decryptedPrivateKey name

* fix: fixed bug

* fix: fixed theme reviews

* Message list (#615)

* fix: message list comp

* fix: message list comp

* fix: added pagination

* fix: added pagination

* fix: pagination

* fix: create useChatData hook

* fix: fixed minor bug

* fix: socket issues fixed

* fix: added theme in msgbubble (#620)

* fix: added theme in msgbubble

* fix: fixed import

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* fix: exported the theme (#623)

* fix: exported the theme

* fix: fixed issues

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* Typebar component (#631)

* feat: added typebar UI

* feat: added functions to typebar

* fix: added icon

* fix: fixed theme issues

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* feat: added connectbutton

* fix: fixed connectbtn ui and remove disconnect and fixed error on disconnect

* fix: fixed create account getting called twice

* Profile Header Component (#636)

* feat: profile header

* feat: update profile header

* fix: update hooks

* fix: video icon ui

* feat: add group modal

* fix: add modal info

* fix: edit components

* fix: commit modal theme

* fix: updating UI

* fix: ensname

* fix: add notifs

* fix: remove alerts

* fix: remove alert logs

* fix: push fixes

* fix: conflicts

* Message container (#635)

* fix: added theme in msgbubble

* fix: fixed import

* fix: fixed message-list

* fix: added approve intent

* fix: added fixes

* fix: fixed socket bug

* fix: fixed message from socket

* fix: fixed minor issues

* fix: fixed typebar theming

* fix: fixed env issue

* fix: fixed message not updating issue

* refactor: added isConnected prop in msgContainer

* refactor: resolve merge conflicts

* fix: fixed request sending

* fix: fixed decryption

* fix: fixed env issue

* feat: added profile header in message container

---------

Co-authored-by: KlausMikhaelson <[email protected]>
Co-authored-by: Nilesh Gupta <[email protected]>

* fix: updated svg to react component

* fix: changed svg to tsx component

* fix: fixed review changes (#646)

* fix: fixed review changes

* fix: resolved issues

---------

Co-authored-by: Nilesh Gupta <[email protected]>

* Profile Header -> Chat Profile fixes (#647)

* feat: profile header

* feat: update profile header

* fix: update hooks

* fix: video icon ui

* feat: add group modal

* fix: add modal info

* fix: edit components

* fix: commit modal theme

* fix: updating UI

* fix: ensname

* fix: add notifs

* fix: remove alerts

* fix: remove alert logs

* fix: push fixes

* fix: conflicts

* fix: notifs

* fix: correct theme colors

* fix: renaming profileHeader

* fix: qa fixes

* fix: loader

* refactor: resolved issues

* fix: edit types

---------

Co-authored-by: Nilesh Gupta <[email protected]>

* fix: resolved package not added issue

* Fix: modal issue in group info && alert remove members (#653)

* fix: modal

* fix: update changes

* refactor: resolved issue

---------

Co-authored-by: Nilesh Gupta <[email protected]>

* fix: QA fixes (#654)

* Connect btn revamp (#668)

* fix: added theme in msgbubble

* fix: fixed import

* fix: fixed message-list

* fix: added approve intent

* fix: added fixes

* fix: fixed socket bug

* fix: fixed message from socket

* fix: fixed minor issues

* fix: fixed typebar theming

* fix: fixed env issue

* fix: fixed message not updating issue

* refactor: added isConnected prop in msgContainer

* refactor: resolve merge conflicts

* fix: fixed request sending

* fix: fixed decryption

* fix: fixed env issue

* feat: added profile header in message container

* feat: adding rainbowkit for btn

* fix: fix issues

* fix: addec onnect functionality

* fix: connect button

* fix: added hack for rainbowkit css

---------

Co-authored-by: KlausMikhaelson <[email protected]>
Co-authored-by: Nilesh Gupta <[email protected]>

* Typebar UI issue (#666)

* fix: fixed typebar space not working and theme

* fix: fixed gif and emoji

---------

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

* fix: fixed theme colours

* fix: added theme for brb

* fix: added filter  hat

* fix: merged with main

* fix: fixed msg border

* fix: fixed theme

* fix: fixed fonts

* fix: fixed bug

* Access control (#672)

* fix: fixed typebar space not working and theme

* feat: created access control UI

* feat: created verify access control hook

* fix: fixed access control hook issue

* feat: added access control verification

* feat: added onclick props for integration team to pass function and fixed btn ui

* fix: added link for learn more

* fix: fixed msg not updating in socket issue

* fix: added minor fix

---------

Co-authored-by: Monalisha Mishra <[email protected]>

* fix: fixed padding issues

* fix(f): fixed build issues

* fix: fix for chat status test

* Check rules access control (#678)

* fix: fixed typebar space not working and theme

* feat: created access control UI

* feat: created verify access control hook

* fix: fixed access control hook issue

* feat: added access control verification

* feat: added onclick props for integration team to pass function and fixed btn ui

* fix: added link for learn more

* fix: fixed msg not updating in socket issue

* 662 group access control v2 changes (#663)

* fix: spaces access API

* fix: custom endpoint doc impl

* Update README.md

* Update README.md

* fix: review comments change

* fix: read me update

* Update README.md

* Update README.md

* fix: origin in user creation (#665)

* fix: origin in user creation

* Update README.md

* fix: review comments

* 662 group access control v2 changes (#677)

* fix: spaces access API

* fix: custom endpoint doc impl

* Update README.md

* Update README.md

* fix: review comments change

* fix: read me update

* Update README.md

* Update README.md

* fix(spaces): broadcast changes and UX fixes (#674)

* fix: fix UI grid view (#642)

* fix: fix UI grid view

* refactor: conditional added

* fix: resolved muting/unmuting try catch error (#657)

* fix(spaces): fix livepeer broadcast (#656)

* fix(spaces): fix livepeer broadcast

* fix(spaces): fix data shown for unjoined space & promote listener logic

---------

Co-authored-by: Madhur Gupta <[email protected]>

* refactor(spaces): use local state instead of get from server while meta message fire (#676)

---------

Co-authored-by: Arnab Chatterjee <[email protected]>
Co-authored-by: Nilesh Gupta <[email protected]>

* feat: added verification option to show only on token gated groups

* fix: fixing group access control

---------

Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Mohammed S <[email protected]>
Co-authored-by: Madhur Gupta <[email protected]>
Co-authored-by: Arnab Chatterjee <[email protected]>
Co-authored-by: Nilesh Gupta <[email protected]>

* fix: fixed build

---------

Co-authored-by: Satyam <[email protected]>
Co-authored-by: KlausMikhaelson <[email protected]>
Co-authored-by: Kolade <[email protected]>
Co-authored-by: Nilesh Gupta <[email protected]>
Co-authored-by: Mohammed S <[email protected]>
Co-authored-by: Madhur Gupta <[email protected]>
Co-authored-by: Arnab Chatterjee <[email protected]>
Copy link

File: packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx

  • The import statement for CreateGroupModal should be on a separate line.
  • There is a commented code block that should be removed.
  • The prop chatFilterList is declared but not used.
  • The prop onVerificationFail is misspelled as onVerificatoinFail. It should be corrected to onVerificationFail.
  • The prop limit is misspelled as limt. It should be corrected to limit.
  • There is an unnecessary comma at the end of the prop verificationFailModalPosition.
  • There is an unnecessary semicolon after the closing tag of ChatViewComponentCard. It should be removed.

File: packages/app.tsx

  • The closing bracket of the customDarkTheme object is missing.
  • The checkForWeb3Data function is missing a closing brace and parenthesis.
  • The onChangeCAIP function is missing a closing parenthesis and brace.
  • The useEffect hook is missing a closing parenthesis and brace.

File: packages/uiweb/src/lib/components/chat/ChatProfile/AddWalletContent.tsx

  • The import statement for useGetChatProfile is unused and can be removed.
  • The searchedText parameter in the handleSearch function is missing a closing parenthesis.
  • The customSearchStyle object is missing a closing parenthesis and semicolon after the last property.
  • The closing brace for the handleSearch function is missing.
  • There is an unnecessary comma after the closing parenthesis of the if(newChatUser) condition.
  • The clearInput function is missing a closing parenthesis.
  • The addMemberToList function is missing a closing parenthesis before the closing brace.
  • The errorMessage declaration is missing a closing parenthesis before the if (errorMessage) condition.
  • There is an extra closing parenthesis after the closing parenthesis of the if(!isMemberAlreadyAdded) condition.
  • The removeMemberFromList function is missing a closing parenthesis before the closing brace.
  • The closing tag of the ClearIcon component is written as ></ClearIcon>. It should be self-closing <ClearIcon />.
  • The closing brace for the AddWalletContent component is missing.

File: packages/uiweb/src/lib/components/chat/types/index.ts

  • The GrouInfoType interface is misspelled. It should be corrected to GroupInfoType.
  • The closing brace for the CATEGORY object is missing.
  • The closing brace for the UNIT object is missing.
  • The SubCategoryKeys type is missing a closing parenthesis.
  • The DropdownCategoryValuesType type is missing a closing parenthesis.

File: packages/uiweb/src/lib/hooks/chat/useCreateGatedGroup.ts

  • The file is empty. Please check if this is intentional or if there is missing code.

File: packages/uiweb/src/lib/types/index.ts

  • The IMessage interface is missing a closing parenthesis.
  • The ITheme interface is missing a closing parenthesis.

All looks good.

Copy link

github-actions bot commented Dec 1, 2023

In the file packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx:

  • In the import statement, "@pushprotocol/uiweb" is misspelled. It should be "@pushprotocol/uiweb".
  • The comment block for the CreateGroupModal component is not closed properly. It should end with "*/".
  • The ChatView component has several props that are not aligned properly. They should each be on a new line with indentation.
  • The onClose prop of the CreateGroupModal component has an unnecessary arrow function. It can be simplified to onClose={console.log('in close')}.
  • The ChatViewComponentCard component is not defined. It should be imported from "../components/StyledComponents".

In the file packages/app/src/app/app.tsx:

  • The customDarkTheme object is missing a closing brace "}" at the end.

In the file packages/uiweb/src/lib/components/chat/ChatProfile/AddWalletContent.tsx:

  • The import statement for the CloseIcon is missing a semicolon at the end.

Overall, the code looks good with these fixes.

Copy link
Contributor

@mishramonalisha76 mishramonalisha76 left a comment

Choose a reason for hiding this comment

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

Also make sure the dark mode works too

Copy link

github-actions bot commented Dec 1, 2023

File: packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx

  1. In line 6, the import statement from '@pushprotocol/uiweb' is missing a semicolon at the end. It should be:
import { CreateGroupModal, MODAL_BACKGROUND_TYPE, MODAL_POSITION_TYPE } from "@pushprotocol/uiweb";
  1. In line 27, there is a typo in the closing tag of the CreateGroupModal component. It should be </CreateGroupModal> instead of </ChatViewComponentCard>.

  2. In line 42, the verificationFailModalPosition prop is missing a comma after the value. It should be:

verificationFailModalPosition={MODAL_POSITION_TYPE.RELATIVE},

File: packages/uiweb/src/lib/components/chat/ChatProfile/AddWalletContent.tsx

  1. In line 78, there is a missing closing parentheses ')' after the addWalletValidation function call. It should be:
if (errorMessage) {
  groupInfoToast.showMessageToast({
    toastTitle: 'Error',
    toastMessage: errorMessage,
    toastType: 'ERROR',
    getToastIcon: (size) => <MdError size={size} color="red" />,
  });
} else if(!isMemberAlreadyAdded) {
  handleMemberList((prev: any) => [...prev, { ...member, isAdmin: false }]);
}
  1. In line 168, there is a missing closing parentheses ')' after the handleSearch function call. It should be:
handleSearch={handleSearch}

@KlausMikhaelson KlausMikhaelson changed the base branch from alpha to main December 1, 2023 12:11
@KlausMikhaelson KlausMikhaelson changed the base branch from main to alpha December 1, 2023 12:21
@mishramonalisha76 mishramonalisha76 changed the base branch from alpha to main December 1, 2023 13:10
Copy link

github-actions bot commented Dec 1, 2023

In file packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx:

  • Line 9: Import paths should be relative to the file location, not absolute. Replace "@pushprotocol/uiweb" with "../../uiweb".

In file packages/uiweb/src/lib/components/chat/ChatProfile/AddWalletContent.tsx:

  • Line 11: Remove the import of the CloseIcon since it is not used in the component.
  • Line 119: Add a closing parenthesis ")" at the end of the addWalletValidation function call.

In file packages/uiweb/src/lib/components/chat/CreateGroup/AddWallets.tsx:

  • Line 6: Import path of the Span component should be "../../reusables" instead of "../../chat/types/index".
  • Line 27: Import the Type for GroupInfoType instead of GrouInfoType.
  • Line 34: Remove the import of the BackIcon since it is not used in the component.
  • Line 92: Add a closing parenthesis ")" at the end of the showError function call.
  • Line 120: Add a closing parenthesis ")" at the end of the createGatedGroup function call.
  • Line 141: Add a closing parenthesis ")" at the end of the showError function call.
  • Line 144: Add a closing parenthesis ")" at the end of the showError function call.
  • Line 155: Add a closing parenthesis ")" at the end of the createGroupService function call.
  • Line 162: Add a closing parenthesis ")" at the end of the showError function call.
  • Line 169: Add a closing parenthesis ")" at the end of the verifyAndCreateGroup function call.

Other than these minor corrections, the code looks good.

@mohammeds1992 mohammeds1992 self-requested a review December 1, 2023 13:47
@mohammeds1992 mohammeds1992 removed the request for review from pritipsingh December 1, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants