Difference between revisions of "Editing ImpVis Components"

From ImpVis Wiki
Jump to navigation Jump to search
Line 1: Line 1:
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.
# To edit the components library you must first clone [https://github.com/Imperial-visualizations/Vue-Components 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.
# To edit the components library you must first clone [https://github.com/Imperial-visualizations/Vue-Components 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.
# 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 <code>npm run template</code>. The code for this example template is located within the "template" folder.
# 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 <code>npm run template</code>. The code for this example template is located within the "template" folder.
 
#Make your edits to the components located within the "src/components" folder, and test them using the example template.
locally, clone the vue components repository (you may want to create your own fork or branch).
#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.
*Run “npm run template” to get an example template to view while editing vue components.
#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.
* Make your changes to the components and when ready create a pull request to dev and get two reviews from other people.
#Now run “npm update @impvis/components” on existing visualisations to get the latest updates.
* Create pull request from dev to master and get approved. (remember to increase package version in package.json)
*Now run “npm update @impvis/components” on existing visualisations to get the latest updates.

Revision as of 10:26, 28 June 2021

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” on existing visualisations to get the latest updates.