Giter Club home page Giter Club logo

aragon's Introduction

Contribution Guide

This website is built with Docusaurus! ๐Ÿฆ•

This means that unless you want to change the architecture of the site (adding/removing sections, reorganizing, etc) you should be able to just create and edit Markdown docs.


Examples ๐Ÿ‘€

If you want an example of what Docusaurus can do, look no further than the official Docusaurus website. Another great example is hack.aragon.org. Since Docusaurus is based on React, you can extend and customize it as little or as much as you'd like.


Docusaurus Docs ๐Ÿ“š

Docusaurus has great docs. Rather than recreating them, I'll just link to the most useful ones for editing this site.


Hacking On Docusaurus ๐Ÿ’ป


TL;DR: to hack

Pull the repo to your local machine. Go into the website directory

  • yarn (to init stuff)
  • yarn start (to build and serve locally)

~ Everything that is a String can be edited via Markdown. The hot-reload server will show these changes if you refresh the local build in the browser.

If you change anything using Javascript, you're probably going to need to disengage yarn then run yarn start again to see changes

Good luck! ๐Ÿ€


TL;DR: to publish

(assuming you have push access to the website repo, otherwise keep the local configuration in siteConfig.js and just submit a PR)

Uncomment stuff in siteConfig.js to configure for publishing to website (not gh-pages)

Then navigate to the website directory

Then run the script below

GIT_USER=your-username CURRENT_BRANCH=master yarn run publish-gh-pages

When you're done publishing, go to the github repo (https://github.com/1Hive/website/), click on settings, and make sure that under GitHub Pages 1hive.org is set as the custom domain and it says: "Your site is published at https://1hive.org/"


Here's the long form of what that all looks like...


Prerequisites

Developing the website locally requires a few things:

  • Git (sudo apt-get install git on linux)
  • Node
  • Yarn

If these are not enough, you can check out my Linux Dev Env quickstart guide to see what I'm running locally. If you discover a required dependency that is not in the list above, please open an issue to let me know! :)

Pulling the master branch

You'll then go to whatever directory you want to work on the project in and run

  • git clone https://github.com/1Hive/mvp.git

This will pull all the data to your local environment.

Configuring siteConfig.js

Run cd mvp/website/ to go to the directory that serves the Docusaurus website

Open siteConfig.js and check that the correct stuff is commented/uncommented for local development vs publishing

Building Locally

Make sure that you're still in the website directory (~/mvp/website/)

  • yarn (to init stuff)
  • yarn start (to serve stuff locally)

If yarn start is successful you will see the following output

LiveReload server started on port 35729
Docusaurus server started on port 3000

To see the website open localhost:3000 in your browser.

If you do not see the site, please go back to the beginning of this doc and try again following all the steps. If that still does not work please open an issue or comment and I'll help however I can.

  • note: I work on a remote VM that I ssh into so I won't know much about developing this on a laptop like Macbook.
  • another note: I don't like npm because it's slow and lame, so I'm using Yarn. Happy to help troubleshoot Yarn, but not npm

If everything is working, you can expect changes to the UI or Markdown to hot reload with a refresh of the page. Changes to Javascript related things will require you to disengage yarn start using ctrl C, then re-engage by running yarn start again. This causes Yarn to reload the whole thing ensuring that your JS changes show up.

Publishing

To publish you'll need to navigate to the website directory (~mvp/website/) and change the parameters in siteConfig.js to comment out local development and enable publishing.

  • https://github.com/1Hive/website/blob/master/website/siteConfig.js#L13

  • note: if you have 2FA enabled on your GitHub profile (and you would be wise to do so), you'll need to provide your GitHub API access token rather than your account password. You can learn about how to do that here

  • test that it's working by creating a small change to the README.md, going to the root directory of the project (~/mvp/) and pushing it to the repo

    git add . git commit -m "testing git login" git push

Once you've got that figured out... navigate to the website directory (~/mvp/website/) and run the following command to publish:

GIT_USER=your-username CURRENT_BRANCH=master yarn run publish-gh-pages

After about a minute (sometimes 5min) it should populate to the actual website URL: 1hive.org

โ— You're not done!

Once you've published, go to the github repo (https://github.com/1Hive/website/), click on settings, and make sure that under GitHub Pages 1hive.org is set as the custom domain and it says: "Your site is published at https://1hive.org/"

Also, before submitting any more PRs or pushes make sure that siteConfig.js is configured for local development so that it's ready for anyone to pulls the repo and work on it locally :)

Hope that helps! :)


Notes ๐Ÿ“

If you want the fun minimap to show up on the left side of the screen you need to use ## before each title.

Remember, that for the website to actually display stuff in docs or blog, you need to link them


aragon's People

Contributors

0x-r4bbit avatar 0xgabi avatar 2color avatar adekbadek avatar allcontributors[bot] avatar andy-hook avatar aquigorka avatar bingen avatar bpierre avatar cryptokek avatar delfipolito avatar drcmda avatar evalir avatar fabriziovigevani avatar gasolin avatar izqui avatar john-light avatar lkngtn avatar luisivan avatar macor161 avatar mickdegraaf avatar onbjerg avatar osarrouy avatar ottodevs avatar pythonpete32 avatar quazia avatar rperez89 avatar schwartz10 avatar sohkai avatar stellarmagnet avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aragon's Issues

Some apps without contentURI break aragon client and cli

Describe the bug
The apps view of some DAOs can be fetched. They may also break the apm cli.

Mainnet or testnet?
It happens on some xDAI DAOs.

Organization
This is an example: https://aragon.1hive.org/#/0x1d7ac94b1713e17bfa2e1c96d832329b4b79b404/apps/

To Reproduce
Steps to reproduce the behavior:

  1. Go to the DAO Apps section
  2. Open the console with F12
  3. See the following error:
Uncaught Error: The parameter must be a valid HEX string.
    at c (index.js:170)
    at l (repo.js:48)
    at async a (repo.js:15)
    at async n.project (index.js:668)

Expected behavior
The apps should appear in the screen.

Additional context
If we debug it, we see that when calling getRepoVersionById we have an unhandled exception when we have a repo that has an empty contentURI.

That's exactly what happens with the app deployed in 0xabE9...37eb on xDAI, it return a null contentURI, which throws an exception when is treated by this function.

In order to fix this issue, we can do one of these two things:

  1. Fork the aragon.js repo and build the aragon client with this patched version.
  2. Update the problematic app(s) in APM, so they don't cause this error anymore.

Latest release can't be built

Describe the bug
The npm start script stops running with the latest aragon client commit.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/1hive/aragon
  2. npm install
  3. npm start

Error message

> node scripts/start


aragonUI assets copied to public/aragon-ui
Server running at http://localhost:3000 
๐Ÿšจ  /home/sem/Projects/ac/src/index.js: Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.

  plugins: [
    ['some-plugin', {}],
    ['some-plugin', {}, 'some unique name'],
  ]

Duplicates detected are:
[
  {
    "alias": "/home/sem/Projects/ac/node_modules/@babel/plugin-proposal-class-properties/lib/index.js",
    "dirname": "/home/sem/Projects/ac",
    "ownPass": false,
    "file": {
      "request": "@babel/plugin-proposal-class-properties",
      "resolved": "/home/sem/Projects/ac/node_modules/@babel/plugin-proposal-class-properties/lib/index.js"
    }
  },
  {
    "alias": "base$2",
    "options": {
      "loose": "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"
    },
    "dirname": "/home/sem/Projects/ac",
    "ownPass": false
  }
]
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.

  plugins: [
    ['some-plugin', {}],
    ['some-plugin', {}, 'some unique name'],
  ]

Duplicates detected are:
[
  {
    "alias": "/home/sem/Projects/ac/node_modules/@babel/plugin-proposal-class-properties/lib/index.js",
    "dirname": "/home/sem/Projects/ac",
    "ownPass": false,
    "file": {
      "request": "@babel/plugin-proposal-class-properties",
      "resolved": "/home/sem/Projects/ac/node_modules/@babel/plugin-proposal-class-properties/lib/index.js"
    }
  },
  {
    "alias": "base$2",
    "options": {
      "loose": "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"
    },
    "dirname": "/home/sem/Projects/ac",
    "ownPass": false
  }
]
    at assertNoDuplicates (/home/sem/Projects/ac/node_modules/@babel/core/lib/config/config-descriptors.js:206:13)
    at createDescriptors (/home/sem/Projects/ac/node_modules/@babel/core/lib/config/config-descriptors.js:114:3)
    at createPluginDescriptors (/home/sem/Projects/ac/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)
    at alias (/home/sem/Projects/ac/node_modules/@babel/core/lib/config/config-descriptors.js:63:53)
    at cachedFunction (/home/sem/Projects/ac/node_modules/@babel/core/lib/config/caching.js:62:27)
    at cachedFunction.next (<anonymous>)
    at evaluateSync (/home/sem/Projects/ac/node_modules/gensync/index.js:251:28)
    at sync (/home/sem/Projects/ac/node_modules/gensync/index.js:89:14)
    at plugins.plugins (/home/sem/Projects/ac/node_modules/@babel/core/lib/config/config-descriptors.js:28:77)
    at mergeChainOpts (/home/sem/Projects/ac/node_modules/@babel/core/lib/config/config-chain.js:415:26)

Desktop (please complete the following information):

  • OS version: Ubuntu
  • Node version: v10.23.0

Additional context

I think it has to do with an update of the babel dependency. I have seen the same error before, here.

Can not open aragon DAO UI any more on xdai / 1hive

  1. Please go to: https://aragon.1hive.org/#/rcktstrsv2/
  2. Meta Mask does not connect any more.
  3. Error message dropped:

An unexpected error has occurred

[ethjs-rpc] error with payload {"id":3109533381410,"jsonrpc":"2.0","params":[{"to":"0xaafca6b0c89521752e559650206d7c925fd0e530","data":"0x0178b8bff517506267c534f34fafeac155659ac2b8b2f380124731f019bd05e027994a63"},"latest"],"method":"eth_call"} Error: connection not open
in L
in k
in f
in p
in i
in a
in f
in pr
in Unknown
in _r
in v
in y
in i
in w
in u
in u
in div
in a
in h
in Provider
in y
in B
in i

Multichain

Like 1inch and Sushi, show an button to change the network where Aragon contracts are deployed: Ethereum, XDai, Polygon, BSC, Optimism, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.