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

rft: create and invite modal #533

Merged
merged 9 commits into from
Jul 17, 2023

Conversation

arn4b
Copy link
Contributor

@arn4b arn4b commented Jul 13, 2023

No description provided.

@github-actions
Copy link

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWButton/SCWButton.tsx

  • Line 14: Remove the extra comma after the fontSize property in the customStyle object.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWInviteModal/SCWInviteModal.tsx

  • Line 52: Remove the extra comma after the inviteOnly property in the interface ISCWIModalProps.
  • Line 68: Remove the unused import statement for CircularProgressSpinner.
  • Line 107: Remove the extra closing brace } before the try block.
  • Line 126: Replace hasAccount with !hasAccount in the if condition.
  • Line 135: Add a closing brace } at the end of the searchMember function.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SpaceCreationWidget.tsx

  • No changes needed, all looks good.

File: packages/uiweb/src/lib/components/space/SpaceWidget/SpacesInfo.tsx

  • Line 7: Remove the unused import statement for styled-components.
  • Line 32: Remove the extra closing brace } before the showExplicitInvite function.
  • Line 114: Add a closing brace } at the end of the SpacesInfo component.

File: packages/uiweb/src/lib/components/space/SpaceWidget/WidgetContent.tsx

  • Line 61: Add a closing brace } after the useEffect hook.

File: packages/uiweb/src/lib/components/space/reusables/DateTimePicker.tsx

  • Line 34: Add a closing brace } after the selectedAMPM property in the Select component.

File: packages/uiweb/src/lib/components/space/reusables/SearchInput.tsx

  • No changes needed, file is empty.

File: packages/uiweb/src/lib/components/space/reusables/TextInput.tsx

  • No changes needed, file is empty.

File: packages/uiweb/src/lib/context/spacesContext.ts

  • No changes needed, file is empty.

File: packages/uiweb/src/lib/icons/SpacesLogo.tsx

  • No changes needed, all looks good.

All looks good.

@github-actions
Copy link

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWButton/SCWButton.tsx

  • Line 17: Remove the comma after the last item in customStyle object.
  • Line 30: Move the closing curly brace of the component to a new line for consistency.
  • Line 34: Remove the unnecessary empty
    tag.
  • Line 42: Remove the unnecessary empty line at the end of the file.

All looks good.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWInviteModal/SCWInviteModal.tsx

  • Line 20: Remove the unnecessary empty lines at the end of the imports.
  • Line 32: Move the closing curly brace of the component to a new line for consistency.
  • Line 49: Add a closing curly brace at the end of the searchMember function.
  • Line 116: There's a missing closing parenthesis after the condition in the PromoteCallback prop.
  • Line 156: There's an unnecessary comma at the end of the imageUrl prop.
  • Line 176: Add a closing parenthesis after the src prop.
  • Line 178: Add a closing tag for the Image component.
  • Line 256: There's a missing closing parenthesis after the alt prop.

All looks good.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SpaceCreationWidget.tsx

  • No issues found.

All looks good.

File: packages/uiweb/src/lib/components/space/SpaceWidget/SpacesInfo.tsx

  • Line 21: Add a closing parenthesis after the "}" tag.
  • Line 24: Add a closing curly brace at the end of the IThemeProps interface declaration.
  • Line 28: Move the closing curly brace of the component to a new line for consistency.
  • Line 51: Add a closing parenthesis after the showExplicitInvite function.
  • Line 80: Add a closing tag for the ProfileContainer component.
  • Line 96: There's an unnecessary comma at the end of the imageUrl prop.
  • Line 121: Add a closing tag for the Description component.
  • Line 127: Add a closing tag for the Button component.
  • Line 133: Add a closing parenthesis after the adminsArray.slice(1) expression.
  • Line 157: Add a closing tag for the SpaceCreationWidget component.

All looks good.

File: packages/uiweb/src/lib/components/space/SpaceWidget/WidgetContent.tsx

  • Line 46: Remove the unnecessary empty lines at the end of the file.

All looks good.

File: packages/uiweb/src/lib/components/space/reusables/DateTimePicker.tsx

  • No issues found.

All looks good.

File: packages/uiweb/src/lib/components/space/reusables/SearchInput.tsx

  • No issues found.

All looks good.

File: packages/uiweb/src/lib/components/space/reusables/TextInput.tsx

  • No issues found.

All looks good.

File: packages/uiweb/src/lib/context/spacesContext.ts

  • No issues found.

All looks good.

File: packages/uiweb/src/lib/icons/SpacesLogo.tsx

  • No issues found.

All looks good.

Overall, the code looks good with some minor issues mentioned above.

@github-actions
Copy link

File: nx.json

  • Line 9: There is a missing closing bracket } for the "cli" object.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWButton/SCWButton.tsx

  • Line 22: There is a missing closing bracket } for the "defaultProps" object.
  • Line 36: There is a missing closing bracket } for the "component" object.
  • Line 38: There is a missing closing bracket } for the "library" object.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWInviteModal/SCWInviteModal.tsx

  • Line 70: There is a missing closing bracket } for the "ICustomSearchResult" interface.
  • Line 98: There is a missing closing bracket } for the "ISCWIModalProps" interface.
  • Line 209: There is a missing closing bracket } for the "SCWInviteModal" component.
  • Line 248: There is a missing closing bracket } for the "Image" component.
  • Line 263: There is a missing closing bracket } for the "createIcon" function.
  • Line 282: There is a missing closing bracket } for the "searchedUser" variable.
  • Line 308: There is a missing closing bracket } for the "else" statement.
  • Line 313: There is a missing closing bracket } for the "try" block.
  • Line 323: There is a missing closing bracket } for the "useEffect" hook.
  • Line 378: There is a missing closing bracket } for the "MembersList" styled component.
  • Line 388: There is a missing closing bracket } for the "InvitedList" styled component.
  • Line 397: There is a missing closing bracket } for the "Heading" styled component.
  • Line 414: There is a missing closing bracket } for the "SettingsCont" styled component.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SpaceCreationWidget.tsx

  • No errors found.

File: packages/uiweb/src/lib/components/space/SpaceWidget/SpacesInfo.tsx

  • No errors found.

File: packages/uiweb/src/lib/components/space/SpaceWidget/WidgetContent.tsx

  • Line 54: There is a missing closing bracket } for the "Container" styled component.

File: packages/uiweb/src/lib/components/space/reusables/DateTimePicker.tsx

  • No errors found.

File: packages/uiweb/src/lib/components/space/reusables/SearchInput.tsx

  • No errors found.

File: packages/uiweb/src/lib/components/space/reusables/TextInput.tsx

  • No errors found.

File: packages/uiweb/src/lib/context/spacesContext.ts

  • No errors found.

File: packages/uiweb/src/lib/icons/SpacesLogo.tsx

  • No errors found.

All looks good.

@github-actions
Copy link

File: nx.json

{
"extends": "nx/presets/core.json",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"npmScope": "sdk",
"affected": {
"defaultBase": "main"
},
"cli": {
"defaultCollection": "@nrwl/react"
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["lint", "test", "e2e"]
}
}
},
"generators": {
"@nrwl/react": {
"application": {
"style": "styled-components",
"linter": "eslint",
"babel": true
}
},
"component": {
"style": "styled-components"
},
"library": {
"linter": "eslint"
}
},
"defaultProject": "demoreact"
}

All looks good.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWButton/SCWButton.tsx

import React, { MouseEventHandler, useContext } from 'react';
import styled from 'styled-components';

import { ISpacesTheme } from '../../theme';
import { ThemeContext } from '../../theme/ThemeProvider';
import { SpacesLogo } from '../../../../icons/SpacesLogo';

export interface ISCWButtonProps { // Space Creation Widget Button Interface
btnText?: string;
customStyle?: any;
theme?: ISpacesTheme;
onCreate?: MouseEventHandler;
}

const defaultProps: ISCWButtonProps = {
btnText: 'Create your Space',
customStyle: {
padding: '14px 20px',
borderRadius: '12px',
border: '0px solid transparent',
fontSize: '1rem',
},
};

export const SCWButton: React.FC = (props) => {
const { btnText, customStyle, onCreate } = props;

const theme = useContext(ThemeContext);
return (
    <div>
        <CreateButton
            customStyle={customStyle}
            theme={theme}
            onClick={onCreate}
        >
            <SpacesLogo />
            <BtnText>
                {btnText}
            </BtnText>
        </CreateButton>
    </div>
);

};

const CreateButton = styled.button... padding: ${props => props.customStyle.padding}; border-radius: ${props => props.customStyle.borderRadius}; border: ${props => props.customStyle.border}; font-size: ${props => props.customStyle.fontSize}; background-image: ${(props) => props.theme.titleBg}; color: ${(props) => props.theme.titleTextColor}; display: flex; align-items: center; font-family: 'Strawford'; ... cursor: pointer;;

const BtnText = styled.divmargin-left: 6px;;

SCWButton.defaultProps = defaultProps;
export default SCWButton;

All looks good.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWInviteModal/SCWInviteModal.tsx

/* eslint-disable no-prototype-builtins */
import React, { useState, MouseEventHandler, useContext, useEffect } from 'react';
import styled from 'styled-components';
import * as PushAPI from '@pushprotocol/restapi';

import { ModalHeader } from '../../reusables/ModalHeader';
import { Modal } from '../../reusables/Modal';
import { Button } from '../../reusables/Button';
import { SearchInput } from '../../reusables/SearchInput';
import { ProfileContainer } from '../../reusables/ProfileContainer';
import { ThemeContext } from '../../theme/ThemeProvider';
import { Spinner } from '../../reusables/Spinner';
import { createIcon } from '../../helpers/blockies';
import CircularProgressSpinner from '../../../loader/loader';
import { useSpaceData } from '../../../../hooks';
import SettingsIcon from '../../../../icons/settingsBlack.svg';
import { Image } from '../../../../config';

export interface ICustomSearchResult {
account: string;
name?: string;
handle?: string;
image?: string; // dataURL as string
}

export interface ISCWIModalProps { // Space Creation Widget Create Modal Interface
closeInviteModal?: MouseEventHandler;
makeScheduleVisible?: MouseEventHandler;
createSpace?: MouseEventHandler;
isLoading?: boolean;
invitedMembersList?: any;
setInvitedMembersList?: any;
invitedAddressList?: any;
setInvitedAddressList?: any;
adminsList?: any;
setAdminsList?: any;
adminsAddressList?: any;
setAdminsAddressList?: any;
onClose: any;
btnString?: string;
}

export const SCWInviteModal: React.FC = (props) => {
const {
closeInviteModal, makeScheduleVisible, createSpace, isLoading,
invitedMembersList,
setInvitedMembersList,
invitedAddressList,
setInvitedAddressList,
adminsList,
setAdminsList,
adminsAddressList,
setAdminsAddressList,
onClose,
btnString,
} = props;

const theme = useContext(ThemeContext);
const { env, account, customSearch } = useSpaceData();
const [invitedMember, setInvitedMember] = useState('');
const [loadingAccount, setLoadingAccount] = useState(false);
const [searchedUser, setSearchedUser] = useState<any>({});
const [errorMsg, setErrorMsg] = useState<string>('');

const searchMember = async (event: any) => {
    setInvitedMember(event.target.value);
    if (event.target.value === account) {
        handleError('Cannot

@github-actions
Copy link

File: nx.json

{
"extends": "nx/presets/core.json",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"npmScope": "sdk",
"affected": {
"defaultBase": "main"
},
"cli": {
"defaultCollection": "@nrwl/react"
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["lint", "test", "e2e"]
}
}
},
"generators": {
"@nrwl/react": {
"application": {
"style": "styled-components",
"linter": "eslint",
"babel": true
},
"component": {
"style": "styled-components"
},
"library": {
"linter": "eslint"
}
}
},
"defaultProject": "demoreact"
}

All looks good.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWButton/SCWButton.tsx

import React, { MouseEventHandler, useContext } from 'react'
import styled from 'styled-components';

import { ISpacesTheme } from '../../theme';
import { ThemeContext } from '../../theme/ThemeProvider';
import { SpacesLogo } from '../../../../icons/SpacesLogo';

export interface ISCWButtonProps { // Space Creation Widget Button Interface
btnText?: string;
customStyle?: any;
theme?: ISpacesTheme;
onCreate?: MouseEventHandler;
}
const defaultProps: ISCWButtonProps = {
btnText: 'Create your Space',
customStyle: {
padding: '14px 20px',
borderRadius: '12px',
border: '0px solid transparent',
fontSize: '1rem',
}
};
export const SCWButton: React.FC = (props) => {
const { btnText, customStyle, onCreate } = props;
const theme = useContext(ThemeContext);
return (





{btnText}



)
}

/* styling */

const CreateButton = styled.button`
padding: ${props => props.customStyle.padding};
border-radius: ${props => props.customStyle.borderRadius};
border: ${props => props.customStyle.border};
font-size: ${props => props.customStyle.fontSize};
background-image: ${(props) => props.theme.titleBg};
color: ${(props) => props.theme.titleTextColor};
display: flex;
align-items: center;
font-family: 'Strawford';
...

cursor: pointer;

`;

const BtnText = styled.divmargin-left: 6px;;

SCWButton.defaultProps = defaultProps;
export default SCWButton;

All looks good.

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWInviteModal/SCWInviteModal.tsx

/* eslint-disable no-prototype-builtins */
import React, { useState, MouseEventHandler, useContext, useEffect } from 'react'
import styled from 'styled-components'
import * as PushAPI from '@pushprotocol/restapi';

import { ModalHeader } from '../../reusables/ModalHeader';
import { Modal } from '../../reusables/Modal';
import { Button } from '../../reusables/Button';
import { SearchInput } from '../../reusables/SearchInput';
import { ProfileContainer } from '../../reusables/ProfileContainer';
import { ThemeContext } from '../../theme/ThemeProvider';
import { Spinner } from '../../reusables/Spinner';
import { createIcon } from '../../helpers/blockies';
import CircularProgressSpinner from '../../../loader/loader';
import { useSpaceData } from '../../../../hooks';
import SettingsIcon from '../../../../icons/settingsBlack.svg';
import { Image } from '../../../../config';

export interface ICustomSearchResult {
account: string;
name?: string;
handle?: string;
image?: string; // dataURL as string
}
export interface ISCWIModalProps { // Space Creation Widget Create Modal Interface
closeInviteModal?: MouseEventHandler;
makeScheduleVisible?: MouseEventHandler;
createSpace?: MouseEventHandler;
isLoading?: boolean;
invitedMembersList?: any;
setInvitedMembersList?: any;
invitedAddressList?: any;
setInvitedAddressList?: any;
adminsList?: any;
setAdminsList?: any;
adminsAddressList?: any;
setAdminsAddressList?: any;
onClose: any;
btnString?: string;
}
export const SCWInviteModal: React.FC = (props) => {
const {

@github-actions
Copy link

File: packages/uiweb/src/lib/components/space/SpaceCreationWidget/SCWButton/SCWButton.tsx

  • Line 9: There is an import statement for ISpacesTheme from a relative path '../../theme'. Please make sure the path is correct.
  • Line 15: There is a missing closing bracket at the end of the line.
  • Line 26: There is a missing closing bracket at the end of the line.
  • Line 32: There is a missing closing bracket at the end of the line.
  • Line 51: There is a missing closing bracket at the end of the line.
  • Line 62: There is a missing semicolon at the end of the line.
  • Line 71: There is a missing closing bracket at the end of the line.
  • Line 79: There is a missing semicolon at the end of the line.
  • Line 81: There is a missing semicolon at the end of the line.
  • Line 82: There is a missing closing bracket at the end of the line.
  • Line 84: There is a missing semicolon at the end of the line.
  • Line 88: There is a missing closing bracket at the end of the line.
  • Line 89: There is a missing semicolon at the end of the line.
  • Line 92: There is a missing semicolon at the end of the line.
  • Line 104: There is a missing closing bracket at the end of the line.
  • Line 110: There is a missing closing bracket at the end of the line.
  • Line 113: There is a missing closing bracket at the end of the line.
  • Line 117: There is a missing closing bracket at the end of the line.
  • Line 118: There is a missing semicolon at the end of the line.
  • Line 119: There is a missing closing bracket at the end of the line.
  • Line 120: There is a missing semicolon at the end of the line.

All looks good.

@0xNilesh 0xNilesh merged commit 3cfba20 into feat/spaces-implementation Jul 17, 2023
1 check passed
@0xNilesh 0xNilesh deleted the arnab/create-invite-rft branch July 17, 2023 08:00
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.

2 participants