Skip to content

Instantly share code, notes, and snippets.

@nginnever
Last active March 12, 2016 00:12
Show Gist options
  • Save nginnever/568b5aa20baa62f31b44 to your computer and use it in GitHub Desktop.
Save nginnever/568b5aa20baa62f31b44 to your computer and use it in GitHub Desktop.
first shot

Contributing

Internationalization

IPFS WebUI has internationalization support, strings for translation can be marked by the i18n.t function. Example: <h3>Node Info</h3> becomes <h3>{i18n.t('Node Info')}</h3>. If you add a new string like this, be sure to add it to static/locale/webui-en.json as well, otherwise it would not be displayed in the UI. The same applies if you need to edit an existing string.

Our translation project is here: https://www.transifex.com/ipfs/ipfs/

Getting Started

The first place you will probably want to go if you are thinking about contributing to the IPFS webui is this issue. This is the captain's log created by @dignifiedquire and it will first tell you that you will want to switch to the redux branch before contributing. git checkout redux This is where all of the commits will go and where you can get the latest updates to the webui before being merged to the master branch.

Now that you know where things are happening go ahead and fork the webui repo and switch over to the redux branch. Follow the instructions on the repo README and install and run the new webui files for the first time to make sure your environment is all set up. I won't go into detail about how to setup a node.js development environment but there are plenty of resources out there. If you are running the latest version of node.js then you are good to go.

Great, everything is running. You may now be asking what can you do. Go ahead and head over to this PR. Here you will see a nice long list of tasks that dignifiedquire has put together. If something on that list has not been checked off and you think you could put some work into it then go ahead and get started! If you are newer to react and redux data flows like myself it may be easier to start writing some tests. It is important to mention that in order write accurate tests you will need understand what the component you are testing is doing of course.

Writing Tests

You want to write some tests? Great! Code coverage is always needed and greatly appreciated. I am going to point you to an example contribution from another contributer. This is a full commit from building a feature out to testing. Here you will see the 'config' page being created. So you will need to sift through the commit to the areas that have files titled with .spec.js. These are the test files. We currently use chai assertion library and enzyme testing utility with karma-mocha test runner. Something you might find useful if you are new to react testing is this small example here

Contact Us

As always if you have any further questions please feel free to ping myself 'voxelot' or 'dignifiedquire' in IPFS on freenode in IRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment