-
Notifications
You must be signed in to change notification settings - Fork 39
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
New Channel Creation Flow #1710
New Channel Creation Flow #1710
Conversation
|
I found some issues in the code:
Apart from these issues, the code seems well-structured and clear. Kindly address the mentioned issues. |
I will review the code now. |
File: src/App.tsx
Overall, the code structure seems fine and the logic looks good. All looks good. File: src/blocks/icons/components/CloudUpload.tsx
Consider fixing the SVG path details and the missing closing braces. File: src/blocks/textInput/TextInput.tsx
Overall, the Consider fixing the formatting issues and missing closing tags. All other files were not provided in this review. If you need further reviews of those files, please provide them. |
…o DAPP-1703-Channel-Creation-Flow-UI
I found some issues in the code:
Please review and correct these issues. All looks good. |
There are a few issues in the code review: File: src/App.tsx
File: src/blocks/icons/components/CloudUpload.tsx
File: src/blocks/textInput/TextInput.tsx
Apart from these issues, the code seems to be structured and organized properly. All looks good. |
It seems like there are some syntax errors and formatting issues in the code provided. Here are the mistakes found:
Other files have been provided but have not been checked due to their length. Please correct the identified issues above and ensure the structure and syntax of the code is proper. Let me know if you need further assistance with any other file. |
There are a few issues in the provided code: In src/App.tsx:
In src/blocks/icons/components/CloudUpload.tsx:
In src/blocks/textInput/TextInput.tsx:
In src/modules/createChannel/CreateChannel.constants.ts:
After fixing the above issues, the code should be reviewed thoroughly in terms of logic and functionality. All other files mentioned seem to be empty or not provided, so they cannot be reviewed. Please make the necessary corrections based on the identified issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also after channel creation screen gets stuck in loading details . Is it expected ?
setActiveStepKey: (key: ActiveStepKey) => void; | ||
} | ||
|
||
const channelInfoValidationSchema = Yup.object().shape({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohitmalhotra1420 Here you can see I have implemented the Yup validations. for the channel Info form
export const createChannelInfoForm = ({ handleNextStep, setActiveStepKey }: FormikProps) => | ||
useFormik<ChannelInfoFormValues>({ | ||
initialValues: { | ||
channelName: '', | ||
channelDesc: '', | ||
channelURL: '', | ||
}, | ||
validationSchema: channelInfoValidationSchema, | ||
onSubmit: (values) => { | ||
handleNextStep('upload_logo'); | ||
setActiveStepKey('upload_logo'); | ||
}, | ||
}); | ||
|
||
const logoValidationSchema = Yup.object().shape({ | ||
image: Yup.mixed().required('Image is required'), | ||
}); | ||
|
||
export const uploadLogoForm = () => | ||
useFormik({ | ||
initialValues: { | ||
image: null, | ||
imageSrc: '', | ||
imageType: '', | ||
}, | ||
validationSchema: logoValidationSchema, | ||
onSubmit: (values) => { | ||
// Handle form submission logic here | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will not use 2 separate forms for this. The form is one and it is divided into two steps.
We will create a formik provider in this file with a custom hook to use the form values in different components.
Checkout this PR for reference: #1723
} | ||
|
||
const UploadLogo: FC<UploadLogoProps> = () => { | ||
const UploadLogo: FC<UploadLogoProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const UploadLogo: FC<UploadLogoProps> = ({ | |
const UploadChannelLogo: FC<UploadLogoProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also change the file name
Upload a PNG, JPG upto 1MB. Crop the image to resize to 128px. | ||
</Text> | ||
|
||
<form onSubmit={uploadLogoFormik.handleSubmit}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole form component will be a separate component called upload file and will live under blocks/FileUpload
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also check the props here: https://ant.design/components/upload
type CreateChannelErrorProp = { | ||
channelCreationError: ChannelCreationError; | ||
} | ||
const CreateChannelError: FC<CreateChannelErrorProp> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be a design system component and goes to blocks/Alert
. For now you can only implement the error variant.
Assign a ticket to @rohitmalhotra1420 for implementing all other variants.
src/modules/createChannel/components/CreateChannelProcessingInfo.tsx
Outdated
Show resolved
Hide resolved
src/blocks/fileUpload/FileUpload.tsx
Outdated
hidden?: boolean; | ||
id: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think we need these two props
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
input will be hidden all the time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need id because we are adding a label in the children . Because with this id only it opens the upload option.
Browse to Choose/Upload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove the hidden tag and make it true for all the case
handleNextStep('uploadLogo') | ||
} | ||
|
||
if (Object.keys(errors).length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!Object.keys(errors).length) {
d69aed2
into
Feat-New-Channel-Creation-Flow
* New Channel Creation flow UI * added common stepper * fixed stepper * fixed stepper * fixed stepper * Changed the Stepper flow * added layout * send notif * Add new chain to a channel (#1723) * added basic layout * finished ui * added fixes * addes stepper * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts * added formik * New Channel Creation Flow (#1710) * New Channel Creation Flow based on new UI * Function implementation of the create Channel * Added New Page when chain is diff * Fixed the navigation for channel creation flow * Pulled the main to change the theme way * Removed the new createChannel route * Removed faucet duplication * Fixed issue with the text and text color * Fixed the imports and other issues * Resolved the stepper issue * Fixed the input validation and also added validaiton msg * fxed error validations * import fixes * refactoring done * Fixed the stepper steps prop * File upload moved to blocks and form is also corrected for ChannelInfo * Created Alert Block just for error * Removed hidden prop fro file upload and also fixed the stake fees error comment --------- Co-authored-by: rohitmalhotra1420 <[email protected]> * fixed mobile view * fixed mobile view * fixed enter key * added missing things in select * channel dashboard fix * fixed the navigation issue * fixed the navigation issue * fixed review issues --------- Co-authored-by: abhishek-01k <[email protected]> Co-authored-by: Abhishek <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]>
…feature (#1782) * Dapp 1752 send notif (#1775) * New Channel Creation flow UI * added common stepper * fixed stepper * fixed stepper * fixed stepper * Changed the Stepper flow * added layout * send notif * Add new chain to a channel (#1723) * added basic layout * finished ui * added fixes * addes stepper * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts * added formik * New Channel Creation Flow (#1710) * New Channel Creation Flow based on new UI * Function implementation of the create Channel * Added New Page when chain is diff * Fixed the navigation for channel creation flow * Pulled the main to change the theme way * Removed the new createChannel route * Removed faucet duplication * Fixed issue with the text and text color * Fixed the imports and other issues * Resolved the stepper issue * Fixed the input validation and also added validaiton msg * fxed error validations * import fixes * refactoring done * Fixed the stepper steps prop * File upload moved to blocks and form is also corrected for ChannelInfo * Created Alert Block just for error * Removed hidden prop fro file upload and also fixed the stake fees error comment --------- Co-authored-by: rohitmalhotra1420 <[email protected]> * fixed mobile view * fixed mobile view * fixed enter key * added missing things in select * channel dashboard fix * fixed the navigation issue * fixed the navigation issue * fixed review issues --------- Co-authored-by: abhishek-01k <[email protected]> Co-authored-by: Abhishek <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> * Dapp 1703 channel creation flow UI (#1776) * New Channel Creation flow UI * added common stepper * fixed stepper * fixed stepper * New Channel Creation Flow based on new UI * fixed stepper * Function implementation of the create Channel * Changed the Stepper flow * Added New Page when chain is diff * Fixed the navigation for channel creation flow * Pulled the main to change the theme way * Removed the new createChannel route * Removed faucet duplication * Fixed issue with the text and text color * Fixed the imports and other issues * Resolved the stepper issue * Fixed the input validation and also added validaiton msg * fxed error validations * import fixes * refactoring done * Add new chain to a channel (#1723) * added basic layout * finished ui * added fixes * addes stepper * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts * Fixed the stepper steps prop * File upload moved to blocks and form is also corrected for ChannelInfo * Created Alert Block just for error * Removed hidden prop fro file upload and also fixed the stake fees error comment --------- Co-authored-by: Monalisha Mishra <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> Co-authored-by: Monalisha Mishra <[email protected]> * Dapp 1704 alias verification (#1777) * New Channel Creation flow UI * added common stepper * added basic layout * finished ui * added fixes * fixed stepper * addes stepper * fixed stepper * fixed stepper * Changed the Stepper flow * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts --------- Co-authored-by: abhishek-01k <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> * Created different routes for Create Channel and Channel Dashboard * Created Channel Dashboard Header and App Footer, also added listSemantics and modified MenuItem.ts file * Added Notification Settings in the dashboard body * Channel Delegates and Get Delegates functionality * Add Delegate and Remove Delegate Functionality added * Deactivate Channel Func added * Added Subgraph component and also used Uint8Array as type * Added token faucet and Reactivate channel function * Added Alert block and also added inline error in the components * Edit Channel Component and Function added * Fixed the build error * Revert "Fixed the build error" This reverts commit 464ce63. * Revert "Edit Channel Component and Function added" This reverts commit c8a440e. * Created New file for edit channel just UI * Edit Channel Functionality added * Changed the route for CreateChannel on Navigation * Check For Changes are implemented in EditChannel * Added tooltip and attached dashboard to notification setting page * Fixed the schematic issue in create channel * Fixed the Send Notification issue and updated Navigation file * Added space between balance and number * Changed the tooltip from description to title * fixed review comments * Fixed the issues on the Channel flow 1 * Fixed the connect modal on create channel and also fixed the overlay for blocknative modal * added frontend fixes * added frontend fixes * added frontend fixes * Added support for differnet chains on dashboard * added select close on scroll * added event removal * alais fixes * added event removal * Fixed the alias featured on the dashboard * added event removal * Fixed the displaying of channel details on dashboard for alias addresses * added validations * fixed review comments * Fixed poling of channel details for the alias condition * fixed ui * fixed closing of unlock in send notif * added fixes * fixed alias issues * Fixed the tag color and the sidebar send notification disappearing issur * Added verified alias logo to the dashboard header --------- Co-authored-by: Monalisha Mishra <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> Co-authored-by: Monalisha Mishra <[email protected]>
Pull Request Template
Ticket Number
#1703
Description
Type of Change
Checklist
Frontend Guidelines
Build & Testing
Screenshots/Video with Explanation
Figma link -> https://www.figma.com/design/FvJL0JWHlsVohsHTERB1Lh/Push-Design-Foundations-[Future]?node-id=5178-35807&m=dev
Additional Context
Review & Approvals
Notes
Things that are left: