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

Feat: Add manage supported chain action #4006

Draft
wants to merge 6 commits into
base: feat/colony-added-event
Choose a base branch
from

Conversation

mmioana
Copy link
Contributor

@mmioana mmioana commented Dec 23, 2024

Feat: Add manage supported chain action

Description

  • This PR adds the brand new ✨ Manage supported chains ✨ action, including the action and completed action views for both adding/removing support ( aka deploying a proxy colony and disabling it ) and the saga for disabling the proxy colony.
  • Also took the chance to add the feature flag for showing the new action in the action sidebar.

Block ingestor PR

Testing

TODO: Let's test we can actually deploy a proxy colony and then disable it.

Important

Make sure you have the POSTHOG_KEY and POSTHOG_HOST set. If you don't have the values, please don't hesitate to contact me.

Note

Given for the moment we only span 2 more proxy colonies, only 2 chain options are enabled.

  • Step 1. Please start a fresh dev env npm run dev

  • Step 2. Create some data node scripts/create-data.js

  • Step 3. Please create a new colony by running node scripts/create-colony-url.js and complete the colony creation

  • Step 4. Let's first check the feature flag works accordingly. Click Manage colony

  • Step 5. You should see the Manage supported chains brand new action
    Screenshot 2024-12-27 at 11 53 06

  • Step 6. At line 48 in src/context/FeatureFlagsContext/FeatureFlagsContextProvider.tsx, add these lines

      [FeatureFlag.SUPPORTED_CHAINS_ACTION]: {
        isEnabled: false,
        isLoading: false,
      },
  • Step 7. Check the sidebar again. You should no longer see the Manage supported chains action
    Screenshot 2024-12-27 at 11 52 56

  • Step 8. Revert the changes

  • Step 9. Let's create a Manage supported chains action. Select Add supported chain for add/remove field and Ethereum as the chain
    Screenshot 2024-12-27 at 11 53 44

  • Step 9. Add other missing fields and complete action.
    This will fail for the moment and the 404 will be shown in the completed action view due to the colonyId being not properly set, thus causing the query fetching an action to error out.
    Screenshot 2024-12-27 at 11 58 32

  • Step 10. Let's manually adjust this. Run the following mutation

mutation MyMutation {
  updateColonyAction(
    input: {id: "<TX_HASH_HERE>", colonyId: "<COLONY_ADDRESS_HERE>"}
  ) {
    id
    colony {
      id
      name
    }
  }
}

You can find the tx hash either in the console or in the search params
Screenshot 2024-12-27 at 11 59 37

  • Step 11. Refresh the page and if you haven't close the action sidebar, you should see the view. Otherwise you can find the action in the activity table or just manually set the ?txHash=<TX_HASH_HERE> search param
    Screenshot 2024-12-27 at 12 02 58

  • Step 12. Now please create another Manage supported chains action.

  • Step 13. Select the Add chain support for the Add/remove and Ethereum should no longer be in the chain select
    Screenshot 2024-12-27 at 12 07 40

  • Step 13. Now select Remove chain support for the Add/remove field. Ethereum should be the only available option for the chain select
    Screenshot 2024-12-27 at 12 05 38

  • Step 14. Fill the missing fields and create the action.

Screen.Recording.2024-12-27.at.12.08.57.mov
  • Step 15. Both actions should be visible in the activity table - though the copy might need to be changed

Screenshot 2024-12-27 at 12 10 12

  • Step 16. Check also the transactions tab

Screenshot 2024-12-27 at 12 10 32

Diffs

New stuff

  • disableProxyColony saga
  • Manage supported chains action
  • Feature flag for Manage supported chains action

TODO

  • A bug related to setting the action's colonyId upon deploying a proxy colony needs to be solved in order to properly solve this
  • Need to update action title/subtitle for activity tables
  • Need to add the meatball menu with: Redo action and Copy link

Resolves #3410
Resolves #3411
Resolves #3412
Resolves #3413
Resolves #3414

Feat: Add manage supported chain action
@mmioana mmioana self-assigned this Dec 23, 2024
Feat: Add disable proxy colony saga
Refactor: Manage supported chains action form
Chore: Update block ingestor hash
Feat: Add SUPPORTED_CHAINS_ACTION feature flag
Chore: Remove temporary proxy colony component
Refactor: Update manage supported chain action description
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.

1 participant