0.2.3 • Published 4 years ago

sampleprodtest v0.2.3

Weekly downloads
93
License
-
Repository
-
Last release
4 years ago

zfj-common-components

Repo for all the common components that we would develop pertaining to Jira in general so that the same can be used across multiple products

Steps to create a common UI app for Atlassian Cloud and Atlassian Server addon

  1. Create a branch from master with the name of your app.
  2. Checkout the created branch.
  3. Update package.json package name to the name of your app. For e.g. ZephyrFeedback
  4. Update the main property in package.json to build/[Appname].js
  5. Update the name property in config/library.js to the name of your app.
  6. Edit Feedback.js or add react components to match the app requirements.
  7. Update index.js export to app's exported component.
  8. Run npm run build to generate the bundle. Output: [Appname].js, polyfill.js, [Appname.css]
  9. Tag the commit with a name to use it as a release. [https://github.com/SmartBear/zfj-common-components/releases]

Usage in Atlassian Cloud addon

  1. Update the addon's package.json with the release of the app created. For e.g. "ZephyrFeedback": "git+ssh://git@github.com/SmartBear/zfj-common-components.git#0.1.0"
  2. Import the component in the application. For e.g. import { Feedback } from 'ZephyrFeedback';
  3. Render the component. For e.g. <Feedback />
  4. Add [Appname].css in the addon project.

Usage in Atlassian Server addon

  1. Add the [Appname].js, polyfill.js and [Appname].css created in the above step to a directory and use the directory location in a web-resource.
  2. Add the web-resource to the template or to the controller that renders the UI.
  3. In the application js, use [Appname].render() method to render the component.