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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface IChatProfileUserInfo {
// Exported Functions
export const ChatProfile: React.FC<IChatProfile> = ({
chatId,
closeModalOnClickAway,
closeGroupInfoModalOnClickAway,
groupInfoModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
groupInfoModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
chatProfileRightHelperComponent = null,
Expand Down Expand Up @@ -333,7 +333,7 @@ export const ChatProfile: React.FC<IChatProfile> = ({
<GroupInfoModal
theme={theme}
setModal={setModal}
closeModalOnClickAway={closeModalOnClickAway}
closeModalOnClickAway={closeGroupInfoModalOnClickAway}
groupInfo={initialized.groupInfo!}
chatProfileInfo={initialized.profile}
setGroupInfo={(mutatedGroupInfo) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
chatProfileRightHelperComponent = null,
chatProfileLeftHelperComponent = null,
welcomeComponent = null,
closeModalOnClickAway = false
closeGroupInfoModalOnClickAway = false
} = options || {};

const { user } = useChatData();
Expand Down Expand Up @@ -110,7 +110,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
>
<ChatProfile
key={chatId}
closeModalOnClickAway={closeModalOnClickAway}
closeGroupInfoModalOnClickAway={closeGroupInfoModalOnClickAway}
chatProfileRightHelperComponent={chatProfileRightHelperComponent}
chatProfileLeftHelperComponent={chatProfileLeftHelperComponent}
chatId={initialized.derivedChatId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type UpdateUserProfileModalProps = {
userProfile: IUser;
setUserProfile: React.Dispatch<React.SetStateAction<IUser | undefined>>;
setModal: React.Dispatch<React.SetStateAction<boolean>>;
closeModalOnClickAway?: boolean;
closeProfileModalOnClickAway?: boolean;
updateUserProfileModalBackground?: ModalBackgroundType;
updateUserProfileModalPositionType?: ModalPositionType;
};
Expand All @@ -34,7 +34,7 @@ export interface UserProfileType {
export const UpdateUserProfileModal = ({
theme,
setModal,
closeModalOnClickAway,
closeProfileModalOnClickAway,
userProfile,
setUserProfile,
updateUserProfileModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
Expand Down Expand Up @@ -164,7 +164,7 @@ export const UpdateUserProfileModal = ({
return (
<Modal
onClose={onClose}
closeonClickAway={closeModalOnClickAway}
closeonClickAway={closeProfileModalOnClickAway}
modalBackground={updateUserProfileModalBackground}
modalPositionType={updateUserProfileModalPositionType}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
updateUserProfileModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
updateUserProfileModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
onUserProfileUpdateModalOpen,
closeModalOnClickAway = false
closeProfileModalOnClickAway = false
}) => {
const { user } = useChatData();
const [userProfile, setUserProfile] = useState<IUser>();
Expand Down Expand Up @@ -144,7 +144,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
<UpdateUserProfileModal
theme={theme}
setModal={setShowUpdateUserProfileModal}
closeModalOnClickAway={closeModalOnClickAway}
closeProfileModalOnClickAway={closeProfileModalOnClickAway}
userProfile={userProfile!}
setUserProfile={setUserProfile}
updateUserProfileModalBackground={updateUserProfileModalBackground}
Expand Down
6 changes: 3 additions & 3 deletions packages/uiweb/src/lib/components/chat/exportedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export interface IChatViewComponentProps {
chatProfileRightHelperComponent?: React.ReactNode;
chatProfileLeftHelperComponent?: React.ReactNode;
welcomeComponent?: React.ReactNode;
closeModalOnClickAway?: boolean;
closeGroupInfoModalOnClickAway?: boolean;
}

export interface IChatProfile {
chatId: string;
closeModalOnClickAway?: boolean;
closeGroupInfoModalOnClickAway?: boolean;
groupInfoModalBackground?: ModalBackgroundType;
groupInfoModalPositionType?: ModalPositionType;
chatProfileRightHelperComponent?: React.ReactNode;
Expand Down Expand Up @@ -184,7 +184,7 @@ export interface UserProfileProps {
updateUserProfileModalBackground?: ModalBackgroundType;
updateUserProfileModalPositionType?: ModalPositionType;
onUserProfileUpdateModalOpen?: (open: boolean) => void;
closeModalOnClickAway?: boolean;
closeProfileModalOnClickAway?: boolean;
}

export interface ModalButtonProps {
Expand Down
Loading