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

Create Channel + Channel Dashboard + Chain Alias + Send notification feature #1782

Merged
merged 59 commits into from
Aug 20, 2024

Conversation

abhishek-01k
Copy link
Collaborator

@abhishek-01k abhishek-01k commented Jul 30, 2024

Pull Request Template

This contains PR number

Description

  • Problem/Feature:

Type of Change

  • Bug fix
  • New feature
  • Code refactor
  • Documentation update
  • Other (please describe):

Checklist

  • Quick PR: Is this a quick PR? Can be approved before finishing a coffee.
    • Quick PR label added
  • Not Merge Ready: Is this PR dependent on some other PR/tasks and not ready to be merged right now.
    • DO NOT Merge PR label added

Frontend Guidelines

Build & Testing

  • No errors in the build terminal
  • Engineer has tested the changes on their local environment
  • Engineer has tested the changes on deploy preview

Screenshots/Video with Explanation

  • Before: Explain the previous behavior

  • After: What's changed now

Additional Context

Review & Approvals

  • Self-review completed
  • Code review by at least one other engineer
  • Documentation updates if applicable

Notes

mishramonalisha76 and others added 2 commits July 30, 2024 14:23
* 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]>
* 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]>
Copy link

I have reviewed the provided code and found a few issues:

  1. In package.json:

    • There is a typo in the setcurrentTime function. It should be setCurrentTime instead of setcurrentTime.
    • There is an extra closing bracket in the disableConsole function.
    • The prod environment is checked twice unnecessarily in the console enabling/disabling logic.
  2. In src/App.tsx:

    • The HeaderContainer styled component is missing a closing backtick.
    • In the ContentContainer, the ternary operator has a missing : for the second condition.
    • In the spacesUIProvider in the JSX, there is an extra < at the beginning.

Overall, the code seems to be structured and organized. You can address the mentioned issues to improve the quality of the code.

All looks good.

Copy link

github-actions bot commented Jul 30, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-08-20 10:21 UTC

* 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]>
Copy link

All looks good.

Copy link

File: package.json

All looks good.

File: src/App.tsx

  1. There is a typo in the variable name setcurrentTime, it should be setCurrentTime.
  2. The extendConsole function has some syntax errors such as missing curly braces and incorrect condition checks. Consider refactoring the function.
  3. There is a typo in the variable name SpaceInvitesComponent, it should be SpaceInvitesComponent.
  4. There is a missing closing angle bracket in the JSX expression <SpacesUIProvider>.

File: src/blocks/alert/Alert.tsx

All looks good.

File: src/blocks/alert/Alert.types.ts

All looks good.

File: src/blocks/alert/index.ts

All looks good.

File: src/blocks/fileUpload/FileUpload.tsx

All looks good.

File: src/blocks/fileUpload/index.ts

All looks good.

File: src/blocks/icons/IconWrapper.tsx

All looks good.

File: src/blocks/icons/components/CloudUpload.tsx

All looks good.

File: src/blocks/icons/index.ts

All looks good.

File: src/blocks/illustrations/index.ts

All looks good.

File: src/blocks/index.ts

All looks good.

File: src/blocks/select/Select.tsx

All looks good.

File: src/blocks/select/index.tsx

All looks good.

File: src/blocks/textInput/TextInput.tsx

All looks good.

File: src/blocks/textarea/TextArea.tsx

All looks good.

File: src/common/Common.constants.ts

All looks good.

File: src/common/Common.form.ts

All looks good.

File: src/common/Common.utils.tsx

All looks good.

File: src/common/components/Stepper.tsx

All looks good.

File: src/common/components/SubscribeChannelDropdown.tsx

All looks good.

File: src/common/components/UnsubscribeChannelDropdown.tsx

All looks good.

File: src/common/components/index.ts

All looks good.

File: src/common/index.ts

All looks good.

File: src/components/reusables/progress/ProgressBarUnit.tsx

All looks good.

File: src/config/AppPaths.ts

All looks good.

File: src/helpers/PushTokenContractHelper.ts

All looks good.

File: src/modules/addNewChain/AddNewChain.constants.tsx

All looks good.

File: src/modules/addNewChain/AddNewChain.form.tsx

All looks good.

File: src/modules/addNewChain/AddNewChain.tsx

All looks good.

Copy link

I have reviewed the provided code, and everything looks good.

All looks good.

Copy link

All looks good.

Copy link

There are some potential issues and improvements that can be made in the provided code snippets:

  1. In the package.json file:
  • The start, reset:sdk:prod, and build scripts append unnecessary commands like cleanup and nostart.
  • The change script seems to have a typo in the command.
  • For consistency, consider organizing the scripts in a more structured way.
  1. In the App.tsx file:
  • The CSS variables mentioned in the comments could be organized better with more meaningful names.
  • The extendConsole() function seems to have some formatting issues and missing closing parentheses.
  • The logic in the Disable console but not on localhost section seems to be incomplete and unclear.
  • There are several commented-out lines of code that should be removed if not needed.
  • Ensure proper indentation and formatting throughout the file, especially within the App component.
  1. There are several files mentioned like Alert.tsx, FileUpload.tsx, Select.tsx, etc., but the content is not provided. Make sure to review the logic, structure, and styling in these files.

For the provided content, I recommend reviewing and addressing the points mentioned above. Once you make the necessary corrections and improvements, feel free to share the updated sections for further review.

All looks good.

Copy link

There are some issues that need to be addressed in the provided code snippets:

  1. In the File: package.json:

    • In the script "start", there is a command yarn dev that seems to be incorrect. It should be updated to vite dev.
    • In the script "change", there is a missing closing brace '}' after the if condition block.
  2. In the File: src/App.tsx:

    • The CSS variable definition seems to be incorrect. The commented out variables like '--s4', '--r0', etc., are not being used anywhere in the code. Consider removing them if they are not being used anymore.
    • In the HeaderContainer styled component definition, a closing brace '}' is missing at the end.
    • In the ParentContainer styled component definition, the second value in the background property is missing its closing brace '}'.
    • There is a logic error in the extendConsole function where the 'window.console[level]' should be validated as 'typeof window.console[level]' instead of 'window.console[level]'.
    • In the extendConsole function, there is a missing closing brace '}' after the 'disabledConsoles[level] = window.console[level];' line.
    • In the extendConsole function, there is a missing closing brace '}' after the 'disabledConsoles[level] = window.console[level];' line within the if statement.
  3. In other files, no specific issues were identified.

After addressing these issues, the code should be validated, and if there are any further issues, they should be corrected accordingly.

All looks good.

Copy link

I have reviewed the provided code and everything seems to be in order.

All looks good.

Copy link

All looks good.

Copy link

All looks good.

Copy link

There are some inconsistencies and issues found in the provided files:

File: package.json

  1. In the scripts section:
    • In the start script, there's a typo in the command before prodsdk cleanup nostart && yarn dev.
    • The change script seems to be incomplete or incorrectly defined.
    • Consider breaking down long commands into separate scripts for better readability and maintainability.

File: src/App.tsx

  1. There is a commented-out section of code within the CSS custom properties definition that ends abruptly without closing the comment.
  2. The function extendConsole seems to be incomplete with missing closing braces.
  3. In the disable console but not on localhost section, the closing braces appear to be mismatched and the logic for checking appConfig?.appEnv === 'prod' is repeated.
  4. There is commented-out code within the return block of the App component.
  5. In the styled components section, HeaderContainer is missing the closing backtick.

File: src/blocks/alert/Alert.tsx

  • Missing content in the file.

File: src/common/Common.utils.tsx

  • Missing content in the file.

Overall, there are several incomplete or incorrect parts in the files provided that need to be addressed.

Review Comments:

Please complete the missing or incorrect parts in the files mentioned above and ensure proper syntax and logic. Once the necessary corrections are made, please provide the updated files for a thorough review.

If you have any specific questions or need further assistance, feel free to ask.

All looks good.

Copy link

All looks good.

Copy link

I found a few issues in the provided code:

  1. In the package.json file:
  • There are no obvious mistakes or typos in the scripts section.
  • However, it's always good practice to ensure that the specified versions for dependencies are the most up-to-date and compatible with each other.
  1. In the src/App.tsx file:
  • The extendConsole function seems to have an incomplete if statement block, it's missing closing brackets and semicolons.
  • The conditional check for appConfig?.appEnv === 'prod' is repeated twice without any variation in behavior.
  • There is a missing closing bracket after the creation of the SpacesUIProvider component in the JSX part.
  • The HeaderContainer and ParentContainer styled components are missing closing curly braces.
  • The props passed to SpacesUIProvider are not properly closed with a closing angle bracket >.
  1. Other files such as src/blocks/alert/Alert.tsx, src/blocks/fileUpload/FileUpload.tsx, etc., have been left incomplete and do not have visible code to review.

Overall, there are some issues in the code provided that should be fixed. If you need further assistance with specific sections or have any questions, feel free to ask.

All looks good.

Copy link

I have reviewed the code in the specified files:

  1. package.json: All scripts and dependencies are correctly defined. All looks good.

  2. src/App.tsx:

    • There are some CSS variables and comments defined at the beginning, which seems fine.
    • There is an incomplete function extendConsole that has some syntax errors which need to be fixed.
    • In the App component, there are references to ReactGA and Redux functions, which seem to be used correctly.
    • There is some complex JSX structure rendering UI components based on different conditions. It should be tested thoroughly.
    • The CSS styles with styled-components have incorrect closing tags ; in HeaderContainer and ParentContainer components. They need to be fixed.
    • There seem to be some missing imports and incomplete files mentioned at the end of the file. Make sure to include the necessary imports.
  3. src/blocks/alert/Alert.tsx: This file is unprovided, unable to review.

  4. src/blocks/alert/Alert.types.ts: The types for AlertHTMLTags and AlertVariant are defined correctly. All looks good.

  5. src/blocks/alert/index.ts: This file is exporting all from Alert component correctly. All looks good.

  6. src/blocks/fileUpload/FileUpload.tsx: This file is unprovided, unable to review.

  7. src/blocks/fileUpload/index.ts: This file is properly exporting from FileUpload component. All looks good.

  8. src/blocks/icons/IconWrapper.tsx: The content of this file is unprovided, unable to review.

  9. src/blocks/icons/components/: All icon components are not reviewed due to unavailability of content.

  10. src/blocks/icons/index.ts: This file seems to correctly export from the icons. All looks good.

  11. Other files in the src directory were unable to review due to lack of content.

Overall, the code requires fixing the syntax errors, incomplete functions, and checking the imported components and files mentioned for completeness. There is also a need for thorough testing of the JSX structure based on conditional rendering in the App component. Snippets of unreviewed files are missing and may need revision once available.

Copy link

All looks good.

@rohitmalhotra1420
Copy link
Collaborator

@mishramonalisha76

  • Make Add new chain a link.
  • Make the ad new chain plus icon on channel dashboard a link as well.
  • When we close the sidebar then the add new chain ui needs to be fixed.

@rohitmalhotra1420
Copy link
Collaborator

@mishramonalisha76 I guess we should a warning message to the user before creating a new chain that they do not interupt the flow while alias creation.

@mishramonalisha76
Copy link
Collaborator

mishramonalisha76 commented Aug 13, 2024

@abhishek-01k

  • Polling isnt working after adding alias
  • Alais should not see the add new chain plus icon in the channel dashboard
  • Alais should not be able to update settings, disable the manage settings button.

@mishramonalisha76
Copy link
Collaborator

@abhishek-01k
image
the hover borderRadius is bot correct, also On mobile view i am unable to see the channel name

Copy link

All looks good.

Copy link

All looks good.

Copy link

All looks good.

Copy link

All looks good.

Copy link

All looks good.

Copy link

All looks good.

Copy link

All looks good.

Copy link

All looks good.

@rohitmalhotra1420 rohitmalhotra1420 changed the title New Channel Flow with PRs #1775 #1776 #1777 Create Channel + Channel Dashboard + Chain Alias feature Aug 20, 2024
@rohitmalhotra1420 rohitmalhotra1420 changed the title Create Channel + Channel Dashboard + Chain Alias feature Create Channel + Channel Dashboard + Chain Alias + Send notification feature Aug 20, 2024
@rohitmalhotra1420 rohitmalhotra1420 merged commit 5add89b into main Aug 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants