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

Update main with alpha changes #1375

Merged
merged 44 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
360083d
fixed chat responsiveness
HarshRajat May 15, 2024
d864378
fixed preview link alignment to right
HarshRajat May 15, 2024
3115854
added relative imports for better management
HarshRajat May 15, 2024
9e7432e
Merge pull request #1289 from push-protocol/uiweb-absolute-imports
HarshRajat May 16, 2024
e0f7bae
Merge pull request #1287 from push-protocol/responsiveness-mobile-uiw…
HarshRajat May 16, 2024
f5070a2
Search issue (#1270)
mishramonalisha76 May 21, 2024
8d360bc
fix: Merge branch 'main' into alpha
mohammeds1992 May 21, 2024
1cfec21
fix: fixed support chat init issue (#1292)
mishramonalisha76 May 22, 2024
c244626
fix(chatviewlist): increase hidden/encrypted chat blur
corlard3y May 22, 2024
c52e517
Added Reaction support, (#1303)
HarshRajat May 23, 2024
4d56d45
fix: add selected option
corlard3y May 24, 2024
b0ac6c5
fix: add return fn
corlard3y May 27, 2024
2f37ba6
fix: add comment to fn
corlard3y May 27, 2024
89975b4
fix: add push bot address
corlard3y May 27, 2024
e5bd9fa
fix: export const
corlard3y May 27, 2024
7c60e1b
fix: reset chat_id
corlard3y May 27, 2024
74be11e
fix: remove console
corlard3y May 27, 2024
d8241be
fix: update dark mode theme
corlard3y May 27, 2024
122fb44
fix: code review comments
corlard3y May 27, 2024
ed630b5
fix: add null check
corlard3y May 27, 2024
19f3f6b
fix: update conditions
corlard3y May 27, 2024
4a161c8
fix: pending wallet address copy issue fixed
abhishek-01k May 28, 2024
8c45b54
fix: update chatprevie badge conditions
corlard3y May 29, 2024
bbf6778
fix: tooltip was not properly aligned
abhishek-01k May 29, 2024
2f3ade1
fix: scrollbar in member list in group info was not visible
abhishek-01k May 29, 2024
d8b026f
Merge pull request #1312 from push-protocol/1307-bug-increase-bg-blur…
corlard3y May 29, 2024
8512e41
Merge pull request #1324 from push-protocol/skeleton-loading-dark-mode
corlard3y May 29, 2024
06254e6
Merge pull request #1323 from push-protocol/1320-bug-chat-badge
corlard3y May 29, 2024
794666e
Space - id integration (#1322)
mishramonalisha76 May 29, 2024
b295043
fix: fixed the blurr issue in chat on join and accept group (#1305)
mishramonalisha76 May 29, 2024
738383d
fix: fixed lint issue
mishramonalisha76 May 29, 2024
952f06d
Merge branch 'main' of github.com:push-protocol/push-sdk into alpha
rohitmalhotra1420 May 31, 2024
82087a9
fixed build error for incorrect naming
rohitmalhotra1420 May 31, 2024
5f57d4a
Merge branch 'alpha' into SDK-#1298-scrollbar-not-visible-on-member-info
abhishek-01k May 31, 2024
58636d0
Merge pull request #1326 from push-protocol/SDK-1297-copying-pendingW…
abhishek-01k May 31, 2024
cc8dc28
Merge pull request #1328 from push-protocol/SDK-1299-Tooltip-not-prop…
abhishek-01k May 31, 2024
7877b61
Merge pull request #1329 from push-protocol/SDK-#1298-scrollbar-not-v…
abhishek-01k May 31, 2024
2c43806
fixes ui representation for domain resolution (#1336)
mishramonalisha76 Jun 7, 2024
957e093
fix: updated guild validation url (#1363)
mishramonalisha76 Jun 20, 2024
b0c77c2
Merged main into alpha
rohitmalhotra1420 Jun 20, 2024
0afda4d
fix: fixed group creation (#1365)
mishramonalisha76 Jun 24, 2024
5333500
Merge branch 'main' of github.com:push-protocol/push-sdk into alpha
rohitmalhotra1420 Jun 25, 2024
484f95d
fix: fix lint issues
Aman035 Jul 1, 2024
7866a3d
fix: made Group Chat Modal More Persistent (#1339)
abhishek-01k Jul 2, 2024
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
3 changes: 2 additions & 1 deletion packages/restapi/src/lib/chat/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ export const sendCore = async (
* 2. Takes care of deprecated fields
*/
const computedOptions = computeOptions(options);
let { messageType, messageObj, account, to, signer, pgpPrivateKey, env } =
const { messageType, messageObj, account, signer, pgpPrivateKey, env } =
computedOptions;
let { to } = computedOptions;
/**
* Validate Input Options
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export interface IChatProfileUserInfo {
// Exported Functions
export const ChatProfile: React.FC<IChatProfile> = ({
chatId,
closeChatProfileInfoModalOnClickAway,
groupInfoModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
groupInfoModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
chatProfileRightHelperComponent = null,
Expand Down Expand Up @@ -335,6 +336,7 @@ export const ChatProfile: React.FC<IChatProfile> = ({
<GroupInfoModal
theme={theme}
setModal={setModal}
closeModalOnClickAway={closeChatProfileInfoModalOnClickAway}
groupInfo={initialized.groupInfo!}
chatProfileInfo={initialized.profile}
setGroupInfo={(mutatedGroupInfo) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ type GroupSectionProps = GroupInfoModalProps & {
type GroupInfoModalProps = {
theme: IChatTheme;
setModal: React.Dispatch<React.SetStateAction<boolean>>;
closeModalOnClickAway?: boolean;
groupInfo: Group;
setGroupInfo: React.Dispatch<React.SetStateAction<Group | null>>;
chatProfileInfo?: IChatProfileUserInfo;
Expand Down Expand Up @@ -461,6 +462,7 @@ const GroupInformation = ({
export const GroupInfoModal = ({
theme,
setModal,
closeModalOnClickAway,
setGroupInfo,
groupInfo,
chatProfileInfo,
Expand Down Expand Up @@ -927,7 +929,8 @@ export const GroupInfoModal = ({
if (chatProfileInfo) {
return (
<Modal
clickawayClose={onClose}
onClose={onClose}
closeonClickAway={closeModalOnClickAway}
modalBackground={groupInfoModalBackground}
modalPositionType={groupInfoModalPositionType}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
chatProfileRightHelperComponent = null,
chatProfileLeftHelperComponent = null,
welcomeComponent = null,
closeChatProfileInfoModalOnClickAway = false
} = options || {};

const { user } = useChatData();
Expand Down Expand Up @@ -109,6 +110,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
>
<ChatProfile
key={chatId}
closeChatProfileInfoModalOnClickAway={closeChatProfileInfoModalOnClickAway}
chatProfileRightHelperComponent={chatProfileRightHelperComponent}
chatProfileLeftHelperComponent={chatProfileLeftHelperComponent}
chatId={initialized.derivedChatId}
Expand Down Expand Up @@ -170,12 +172,12 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (options: IC
};

//styles
const Conatiner = styled(Section)<IThemeProps>`
const Conatiner = styled(Section) <IThemeProps>`
border: ${(props) => props.theme.border?.chatViewComponent};
box-sizing: border-box;
`;

const ChatViewSection = styled(Section)<IThemeProps>`
const ChatViewSection = styled(Section) <IThemeProps>`
@media (${device.mobileL}) {
margin: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface GroupInputDetailsType {

export const CreateGroupModal: React.FC<CreateGroupModalProps> = ({
onClose,
closeModalOnClickAway = false,
modalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
modalPositionType = MODAL_POSITION_TYPE.GLOBAL,
onSuccess,
Expand Down Expand Up @@ -257,7 +258,8 @@ export const CreateGroupModal: React.FC<CreateGroupModalProps> = ({

return (
<Modal
clickawayClose={onClose}
onClose={onClose} // onClose function to close the modal
closeonClickAway={closeModalOnClickAway} // boolean to handle the onClick activity of the user
modalBackground={modalBackground}
modalPositionType={modalPositionType}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type UpdateUserProfileModalProps = {
userProfile: IUser;
setUserProfile: React.Dispatch<React.SetStateAction<IUser | undefined>>;
setModal: React.Dispatch<React.SetStateAction<boolean>>;
closeUserProfileModalOnClickAway?: boolean;
updateUserProfileModalBackground?: ModalBackgroundType;
updateUserProfileModalPositionType?: ModalPositionType;
};
Expand All @@ -33,6 +34,7 @@ export interface UserProfileType {
export const UpdateUserProfileModal = ({
theme,
setModal,
closeUserProfileModalOnClickAway,
userProfile,
setUserProfile,
updateUserProfileModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
Expand Down Expand Up @@ -161,7 +163,8 @@ export const UpdateUserProfileModal = ({

return (
<Modal
clickawayClose={onClose}
onClose={onClose}
closeonClickAway={closeUserProfileModalOnClickAway}
modalBackground={updateUserProfileModalBackground}
modalPositionType={updateUserProfileModalPositionType}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
updateUserProfileModalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
updateUserProfileModalPositionType = MODAL_POSITION_TYPE.GLOBAL,
onUserProfileUpdateModalOpen,
closeUserProfileModalOnClickAway = false
}) => {
const { user } = useChatData();
const [userProfile, setUserProfile] = useState<IUser>();
Expand Down Expand Up @@ -143,6 +144,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
<UpdateUserProfileModal
theme={theme}
setModal={setShowUpdateUserProfileModal}
closeUserProfileModalOnClickAway={closeUserProfileModalOnClickAway}
userProfile={userProfile!}
setUserProfile={setUserProfile}
updateUserProfileModalBackground={updateUserProfileModalBackground}
Expand All @@ -155,7 +157,7 @@ export const UserProfile: React.FC<UserProfileProps> = ({
};

//styles
const Conatiner = styled(Section)<IThemeProps>`
const Conatiner = styled(Section) <IThemeProps>`
border: ${(props) => props.theme.border?.userProfile};
box-sizing: border-box;
`;
Expand Down
4 changes: 4 additions & 0 deletions packages/uiweb/src/lib/components/chat/exportedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ export interface IChatViewComponentProps {
chatProfileRightHelperComponent?: React.ReactNode;
chatProfileLeftHelperComponent?: React.ReactNode;
welcomeComponent?: React.ReactNode;
closeChatProfileInfoModalOnClickAway?: boolean;
}

export interface IChatProfile {
chatId: string;
closeChatProfileInfoModalOnClickAway?: boolean;
groupInfoModalBackground?: ModalBackgroundType;
groupInfoModalPositionType?: ModalPositionType;
chatProfileRightHelperComponent?: React.ReactNode;
Expand Down Expand Up @@ -172,6 +174,7 @@ export interface User {

export interface CreateGroupModalProps {
onClose: () => void;
closeModalOnClickAway?: boolean;
modalBackground?: ModalBackgroundType;
modalPositionType?: ModalPositionType;
onSuccess?: (group: GroupInfoDTO | GroupDTO | undefined) => void;
Expand All @@ -181,6 +184,7 @@ export interface UserProfileProps {
updateUserProfileModalBackground?: ModalBackgroundType;
updateUserProfileModalPositionType?: ModalPositionType;
onUserProfileUpdateModalOpen?: (open: boolean) => void;
closeUserProfileModalOnClickAway?: boolean;
}

export interface ModalButtonProps {
Expand Down
17 changes: 10 additions & 7 deletions packages/uiweb/src/lib/components/chat/reusables/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import { device } from '../../../config';

interface IModalProps {
width?: string;
clickawayClose?: () => void;
onClose?: () => void;
closeonClickAway?: boolean;
children: any;
theme?: IChatTheme;
modalBackground?: ModalBackgroundType;
Expand All @@ -31,13 +32,13 @@ interface IModalHeader {
title: string;
}

const ClickawayCloseModal = ({ children, clickawayClose, width }: IModalProps) => {
const ClickawayCloseModal = ({ children, onClose, width, closeonClickAway }: IModalProps) => {
const modalRef = useRef(null);
const theme = useContext(ThemeContext);

useClickAway(modalRef, () => {
if (clickawayClose) {
clickawayClose();
if (onClose && closeonClickAway) {
onClose();
}
});

Expand All @@ -53,7 +54,8 @@ const ClickawayCloseModal = ({ children, clickawayClose, width }: IModalProps) =
};

export const Modal = ({
clickawayClose,
onClose,
closeonClickAway,
children,
width,
modalBackground = MODAL_BACKGROUND_TYPE.OVERLAY,
Expand All @@ -66,10 +68,11 @@ export const Modal = ({
modalBackground={modalBackground}
modalPositionType={modalPositionType}
>
{clickawayClose ? (
{closeonClickAway ? (
<ClickawayCloseModal
clickawayClose={clickawayClose}
onClose={onClose}
width={width}
closeonClickAway={closeonClickAway}
>
{children}
</ClickawayCloseModal>
Expand Down
Loading