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

fix: made Group Chat Modal More Persistent #1339

Merged
merged 6 commits into from
Jul 2, 2024

Conversation

abhishek-01k
Copy link
Collaborator

@abhishek-01k abhishek-01k commented Jun 4, 2024

Modal in the group chat has been modified and now it doesn't close on the clickaway triggered. Also, added a boolean prop to make it go away when the clickaway is triggered

#1338

Fixes Issue

Closes: #1388

Changes proposed

  • Modified the CreateGroupModalProps by adding a prop of boolean type closeonClickAway which will keep a track to close the modal when their is a clickaway on the frontend side. By default the closeonClickAway will be false.
  • Modified the CreateGroupModalProps by changing the prop clickAwayClose to onClose to handle the clickAway from the dapp side.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Note to reviewers

To check the functionality follow these methods:

On dapp side, where we are importing CreateGroupModal

  • If you pass closeonClickAway = true along with onClose function from the dapp side, the modal will be non persistent i.e, it will close when their is a clickaway
    <CreateGroupModal onClose={() => handleClose()} closeonClickAway/>

  • if you pass only onClose function on the dapp, the modal will be persistent and it will not close if you click outside the modal.
    <CreateGroupModal onClose={() => handleClose()}/>

Modal in the group chat has been modified and now it doesn't close on the clickaway triggered. Also,
added a boolean prop to make it go away when the clickaway is triggered

#1338
Copy link

github-actions bot commented Jun 4, 2024

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

  1. There is a missing closing parenthesis ) after the setModal={setModal} in the return statement for GROUPINFO_STEPS.CRITERIA case.
  2. There are missing closing braces } for the handlePrevious and onClose functions.

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

  1. In the handleAddWallets function, there is a missing closing parenthesis ) at the end.
  2. In the handlePreviousfromAddWallets function, there is a missing closing parenthesis ) at the end.
  3. There is a missing return statement before <AddGroupMembers in the CREATE_GROUP_STEP_KEYS.ADD_MEMBERS case.
  4. There is a missing closing brace } at the end of the file.

In the file packages/uiweb/src/lib/components/chat/reusables/Modal.tsx:

  1. In the ModalHeader component, the <Span> tag before the cursor property is missing the closing angle bracket >.
  2. In the ModalHeader component, the <Span> tag before the cursor property is missing the </Span> closing tag.

Please make the necessary corrections to resolve these issues.

Copy link
Collaborator

@rohitmalhotra1420 rohitmalhotra1420 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Let's do a exp release for this change and test it out on DApp.

Copy link

github-actions bot commented Jun 7, 2024

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

  1. In the handlePrevious function, there is a missing closing curly brace after setShowAddMoreWalletModal(false);.

File: packages/uiweb/src/lib/components/chat/CreateGroup/CreateGroupModal.tsx

  1. In the switch case CREATE_GROUP_STEP_KEYS.ADD_MEMBERS, add a return statement before <AddGroupMembers ... to return the component.
  2. In the switch case default, add a return statement before <CreateGroupDetail ... to return the component.
  3. Inside the CreateGroupModal component, the handleAddWallets function is missing a closing curly brace.
  4. Inside the CreateGroupModal component, the handlePreviousfromAddWallets function is missing a closing curly brace.

File: packages/uiweb/src/lib/components/chat/UserProfile/UpdateUserProfileModal.tsx

  1. In the handleRemove function, there is a missing closing curly brace after resetting setImageSrc(null);.
  2. In the handleUpload function, there is a missing closing curly brace after clicking the file upload input.

Overall the code seems to be structured properly with minor issues mentioned above. Please address those and run a thorough check before finalizing the changes.

All looks good.

Copy link
Collaborator

@rohitmalhotra1420 rohitmalhotra1420 left a comment

Choose a reason for hiding this comment

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

PR looks good. Just wanted to know what's the reason for updated yarn.lock files?

@abhishek-01k
Copy link
Collaborator Author

Created an exp release for this version -> 1.0.0-exp.13

Copy link

github-actions bot commented Jul 1, 2024

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

  1. There is a missing closing curly brace after the function inside the useClickAway hook.
  2. The 'initialize' object passed to useState should be updated using a function to avoid stale state issues.
  3. 'ImageItem', 'DropDownBar', 'DropDownItem', and 'TextItem' components are referenced but not defined.

Apart from these issues, the code looks fine.

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

  1. There is a missing closing curly brace after the 'setAcceptedMemberPaginationData' useState declaration.
  2. The 'GroupSectionProps' and 'GroupInfoModalProps' types are defined but not used within the file.
  3. The 'createPortal' function call is missing closing parentheses.
  4. 'isMobile' variable is declared but not used in the file.

The rest of the content in the provided files seems to be fine.

For specific errors not mentioned above or for any further assistance, please provide more context or details.

Copy link

github-actions bot commented Jul 1, 2024

In the code provided in the ChatProfile.tsx file, there are a few mistakes and issues that need to be addressed:

  1. There is a missing closing curly brace } for the useClickAway hook callback function.

  2. The Container component is not correctly closed with </Container> tag.

  3. The // To setup web3 name, asynchrounously comment is misspelled. It should be asynchronously.

  4. Inside the DropdownBar component, the closing tag </DropDownBar> is missing.

  5. The ImageItem and TextItem components are not defined/rendered in the code snippet provided.

  6. The ternary operator in the GroupInformation component is missing a property name after flexDirection="column".

  7. In the GroupInformation component, fetchMemberStatus is not defined before being used.

  8. The isMobile variable is used in the GroupInfoModal component without being defined or imported.

  9. In the handlePrevious function in the GroupInfoModal component, the missing closing curly brace should be added.

Please make sure to address these issues in the code before proceeding.

@rohitmalhotra1420 rohitmalhotra1420 merged commit 7866a3d into alpha Jul 2, 2024
1 check passed
rohitmalhotra1420 added a commit that referenced this pull request Jul 4, 2024
* fixed chat responsiveness

* fixed preview link alignment to right

* added relative imports for better management

* Search issue (#1270)

* fix: fixed lint issues

* fix: added test for chat preview search list

* fix: fixed review comment

* Update ChatPreviewSearchList.tsx

* fix: fixed support chat init issue (#1292)

* fix: fixed support chat init issue

* fix: fixed lint errors

* fix(chatviewlist): increase hidden/encrypted chat blur

fix #1307

* Added Reaction support,  (#1303)

* Fixed responsiveness in mobile for UIWeb:Chat

* fixes text alignment on frames preview link to come on right

* scroll bar fixes

* fixed reaction picker position, tweaked group type text, removed add button from define conditions in gated group

* removed unnecessary console.debug

* removed unnecessary console.debug

* Resolved comments, fixed curved edges go away, fixed correct time placement in ChatBubble

* Resolved comments

* fix: add selected option

* fix: add return fn

* fix: add comment to fn

* fix: add push bot address

* fix: export const

* fix: reset chat_id

* fix: remove console

* fix: update dark mode theme

* fix: code review comments

* fix: add null check

* fix: update conditions

* fix: pending wallet address copy issue fixed

When copying pending wallet address in the group info, only half of the wallet address was getting
copied

#1297

* fix: update chatprevie badge conditions

* fix: tooltip was not properly aligned

Tooltip was not properly aigned in the group Info in UIWeb

#1299

* fix: scrollbar in member list in group info was not visible

Fixed the scrollbar issue in the member list in group info in uiweb

#1298

* Space - id integration (#1322)

* feat: integrating spaceid in uiweb

* fix: fixed project id setting error

* fix: removed unnecessary code

* fix: added space id

* Update AddWallets.tsx

* fix: made some optimisations

* fix: fixed lint issues

---------

Co-authored-by: KlausMikhaelson <satyamsingh5076@gmail.com>

* fix: fixed the blurr issue in chat on join and accept group (#1305)

* fix: fixed lint issue

* fixed build error for incorrect naming

* fixes ui representation for domain resolution (#1336)

* Main Release 1.3.7 (#1334)

* fixed chat responsiveness

* fixed preview link alignment to right

* added relative imports for better management

* Search issue (#1270)

* fix: fixed lint issues

* fix: added test for chat preview search list

* fix: fixed review comment

* Update ChatPreviewSearchList.tsx

* fix: fixed support chat init issue (#1292)

* fix: fixed support chat init issue

* fix: fixed lint errors

* fix(chatviewlist): increase hidden/encrypted chat blur

fix #1307

* Added Reaction support,  (#1303)

* Fixed responsiveness in mobile for UIWeb:Chat

* fixes text alignment on frames preview link to come on right

* scroll bar fixes

* fixed reaction picker position, tweaked group type text, removed add button from define conditions in gated group

* removed unnecessary console.debug

* removed unnecessary console.debug

* Resolved comments, fixed curved edges go away, fixed correct time placement in ChatBubble

* Resolved comments

* fix: add selected option

* fix: add return fn

* fix: add comment to fn

* fix: add push bot address

* fix: export const

* fix: reset chat_id

* fix: remove console

* fix: update dark mode theme

* fix: code review comments

* fix: add null check

* fix: update conditions

* fix: update chatprevie badge conditions

* Space - id integration (#1322)

* feat: integrating spaceid in uiweb

* fix: fixed project id setting error

* fix: removed unnecessary code

* fix: added space id

* Update AddWallets.tsx

* fix: made some optimisations

* fix: fixed lint issues

---------

Co-authored-by: KlausMikhaelson <satyamsingh5076@gmail.com>

* fix: fixed the blurr issue in chat on join and accept group (#1305)

* fix: fixed lint issue

---------

Co-authored-by: harshrajat <harsh@epns.io>
Co-authored-by: Harsh | Push <harsh@push.org>
Co-authored-by: Monalisha Mishra <42746736+mishramonalisha76@users.noreply.github.com>
Co-authored-by: Mohammed S <shoaibmohammed92@gmail.com>
Co-authored-by: corlard3y <corlardey@gmail.com>
Co-authored-by: KlausMikhaelson <satyamsingh5076@gmail.com>
Co-authored-by: Monalisha Mishra <mishramonalisha76@gmail.com>

* Main Release 1.3.7 - Build error fixed (#1335)

* fix: fixed the ui representation of the domain name

* fix: fixed the domain representation in chatProfile

* fix: added utility func to fetch display name

* fix: added new function to check includes

---------

Co-authored-by: Rohit Malhotra <rohit.malhotra1420@gmail.com>
Co-authored-by: harshrajat <harsh@epns.io>
Co-authored-by: Harsh | Push <harsh@push.org>
Co-authored-by: Mohammed S <shoaibmohammed92@gmail.com>
Co-authored-by: corlard3y <corlardey@gmail.com>
Co-authored-by: KlausMikhaelson <satyamsingh5076@gmail.com>

* fix: updated guild validation url (#1363)

* fix: updated guild validation url

* Update tokenGatedGroup.ts

* fix: fixed group creation (#1365)

* fix: fixed group creation

* fix: fixed the example file

* fix: fixed build

* fix: reverted restapi change

* fix: fix lint issues

* fix: made Group Chat Modal More Persistent (#1339)

* fix: made Group Chat Modal More Persistent

Modal in the group chat has been modified and now it doesn't close on the clickaway triggered. Also,
added a boolean prop to make it go away when the clickaway is triggered

#1338

* fix: prop issue fixed for UpdateUserProfileModal file as well

* fix: added closeModalOnClickAway to ChatView and UserProfile component

* fix: changed the name of the Modal ClickAway in Group Info and User Profile

* fix: changed the name of modal clickaway prop for user profile and chat profile

---------

Co-authored-by: harshrajat <harsh@epns.io>
Co-authored-by: Harsh | Push <harsh@push.org>
Co-authored-by: Mohammed S <shoaibmohammed92@gmail.com>
Co-authored-by: corlard3y <corlardey@gmail.com>
Co-authored-by: abhishek-01k <abhishek@push.org>
Co-authored-by: KlausMikhaelson <satyamsingh5076@gmail.com>
Co-authored-by: rohitmalhotra1420 <rohit.malhotra1420@gmail.com>
Co-authored-by: Abhishek <77395788+abhishek-01k@users.noreply.github.com>
Co-authored-by: aman035 <guptaaman200115@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [BUG] - Fix the the modal close behaviour on click outside modal
3 participants