Editing ImpVis Components

From ImpVis Wiki
Jump to navigation Jump to search

If you want to make a change to one of the ImpVis components in any visualisation (referred to by <iv-component>) then you will need to follow the steps on this page.

  1. To edit the components library you must first clone the repository. If you are making a small change then cloning and editing directly on the "dev" branch may work, however if you are making larger changes you may want to consider making your own fork or branch.
  2. To start editing you must navigate to the folder you have cloned in a command prompt/terminal using "cd <directory path>". Once in the correct location you can run the example template to test your component by running npm run template. The code for this example template is located within the "template" folder.
  3. Make your edits to the components located within the "src/components" folder, and test them using the example template.
  4. Iterate the version number in the package.json (line 3). For minor changes, iterate the last digit; for medium changes, the middle digit; and for very large changes iterate the first digit. E.g. a medium change would make 1.1.6 -> 1.2.6.
  5. Create a pull request from your branch to the master branch, you will need two approving reviews to get your pull request approved and merged. The reviewers should thoroughly test your components and give suggestions for improvements.
  6. Now run npm update @impvis/components in the folders of your existing visualisations to get the latest updates.
  7. Update the documentation for the vue components on the wiki to include your changes.
  8. @impvis/components library is currently on version 1.4.6