Giter Site home page Giter Site logo

atlassian / jira-cloud-for-sketch Goto Github PK

View Code? Open in Web Editor NEW
44.0 29.0 10.0 3.67 MB

A Sketch plugin providing integration with JIRA Cloud

Home Page: https://sketch.atlassian.com

License: Other

Objective-C 0.05% Shell 0.02% HTML 0.01% Python 0.01% JavaScript 99.90% Dockerfile 0.01%
sketch-plugin sketch-plugins sketch-app sketchapp

jira-cloud-for-sketch's Introduction

Jira Cloud for Sketch

A Sketch plugin that provides integration with Jira Cloud. Get it @ sketch.atlassian.com

Screenshot

This README.md is primarily for developers. The latest plugin version, documentation, FAQ, etc. are hosted at sketch.atlassian.com.

This plugin's canonical repository is on Bitbucket, but is also mirrored on GitHub. Contributions are accepted via either service.

Developing

  • Uninstall any previous versions of the Atlassian Sketch plugin from Sketch
  • npm install to install dependencies
  • npm install -g skpm to install the Sketch plugin manager
  • skpm build to transpile and package the plugin
  • skpm link . to symlink the plugin to the Sketch plugins directory

When you next start Sketch, there should be a Jira option in the Plugins menu.

To subsequently update the plugin, simply run skpm build and restart Sketch.

AtlassianSketchFramework (Objective-C)

If you change files under the Objective-C AtlassianSketchFramework package, you'll need to rebuild the project using the ./build.sh script instead of skpm build. Make sure you commit any changes to the generated AtlassianSketchFramework binaries alongside their corresponding source changes.

Builds

Builds are continuously built by Bitbucket Pipelines. See bitbucket-pipelines.yml and bitbucket-pipelines.sh for details. Builds are automatically uploaded to S3:

The build environment is defined by the Dockerfile in the repository root.

If you want to cut your own build to send to a friend, simply run skpm build (or ./build.sh if you've modified any Objective-C files) and then zip the jira.sketchplugin directory.

Architecture

Frontend/Backend

The plugin 'backend' uses CocoaScript to implement Sketch commands, store user preferences, make requests to Jira, add controls to the Sketch UI, and spawn Cocoa NSPanels and WebViews that render the 'frontend'. The frontend is client-side JavaScript that runs in a WebView (that is, Safari) context. 'Backend' and 'frontend' are in quotes because they aren't a traditional client/server frontend/backend: both actually run on the user's computer. However they run in vastly different script contexts, which must be carefully bridged (see src/views/bridge for details).

The frontend uses React and AtlasKit for the user interface, and mobx for state management. Both the frontend and backend are compiled with Webpack and Babel for shiny new ES6/ES8/etc language features. In particular, the plugin makes heavy use of async/await, arrow functions, classes, export/imports, decorators, and the spread operator, so you may want to read up on them if you see some syntax in the codebase that you haven't seen before.

The backend is also partially implemented in Objective-C to work around a couple of CocoaScript's limitations, but CocoaScript is strongly preferred where possible. The plugin does not make use of CocoaScript's square bracket syntax (I suspect webpack will fall over if you try to use it), but I believe everything can be expressed in JavaScript style. The backend also uses a heap of Cocoa classes (see the globals section in .eslintrc) for a more or less complete list. These are only present in the CocoaScript context, and must be stubbed out for tests. Care should be taken not to include CocoaScript dependencies in frontend code, as the Cocoa classes will be missing from the frontend context.

Persistence

Most configuration is stored in user modifiable file at jira.sketchplugin/Contents/Resource/config.json. This file is read once at startup (see src/config.js), so Sketch will need to be restarted to pick up any modifications.

Properties and settings that are modified at runtime are stored in a macOS plist that lives at ~/Library/Preferences/plugin.sketch.jira-sketch-plugin (see src/prefs.js).

Jira authentication and integration

The plugin uses a companion Atlassian Connect add-on to integrate with Jira Cloud. The add-on allows a user to securely link a plugin instance to their Jira Cloud account via an OAuth-like 'dance' and subsequently providing bearer tokens for plugin instances to authenticate directly with the Jira REST API (see src/auth.js and src/jira.js for details). The companion add-on is a system add-on, and will be automatically installed in any given Jira Cloud instance.

Logging

Logs are sent to the Sketch provided log function, which writes to ~/Library/Logs/com.bohemiancoding.sketch3/Plugin Output.log. This file is cleared automatically by Sketch on startup. I recommend browsing logs using Console.app and filtering by process:sketch. Most logging in the plugin is logged at trace or error level. The current log level can be configured via config.json (see Persistance above).

Contributing

Pull requests, issues and comments are welcomed. For pull requests:

  • Follow the existing style
  • Separate unrelated changes into multiple pull requests

For bigger changes, make sure you start a discussion first by creating an issue and explaining the intended change.

Atlassian requires contributors to sign a Contributor License Agreement, known as a CLA. This serves as a record stating that the contributor is entitled to contribute the code/documentation/translation to the project and is willing to have it used in distributions and derivative works (or is willing to transfer ownership).

Prior to accepting your contributions we ask that you please follow the appropriate link below to digitally sign the CLA. The Corporate CLA is for those who are contributing as a member of an organization and the individual CLA is for those contributing as an individual.

Code of conduct

This project is bound by a code of conduct.

jira-cloud-for-sketch's People

Contributors

kannonboy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jira-cloud-for-sketch's Issues

Search for issues

Currently you can view issues that:

  • you've viewed recently in Jira
  • are assigned to you (and unresolved)
  • @mention you

A text search would be useful to quickly find issues that don't fall into these categories.

Easy method to refer to attached assets in comments

From the beta feedback:

...it would be great to be able to mention (or refer to) the screen(s) being attached in the comments, otherwise it may get difficult to say what file has been updated in which comment (maybe being able to drag the file to the comments box, this will then insert the filename in the comments box).

If a user drags the preview into the comments box, the filename is then placed into the text area (potentially where the user has the cursor placed?).

Close button on duplicates panel

When I get option to Keep both or replace sometimes I just want to close it and not take any action on that as I maybe didn't rename some artboard properly.

screen shot 2017-10-11 at 13 54 39

Reducing performance of Sketch

When pligin is enabled, it creates an error of this kind (tracked by SketchDevTools) - each time when you make a selection, both by picking individual objects or using area selection.

Sketch version: 53.2

image

In complex sketch documents, it reduces the performance of sketch dramatically forcing me to disable the plugin and enabling it only when I am in need to upload something in particular

Plugin keeps crashing Sketch 51.2

Every time I load the Jira plugin in Sketch, give it 5 seconds then the plugin closes Sketch down and then Sketch is opened in safe mode.

This happens every time without fail.

The plugin is unusable for our design to use as part of a workflow.

Viewing comments

Comments are often used to request assets and designs, or provide feedback on uploaded images. It'd be useful to be able to view:

  • comments associated with an issue
  • comments @mentioning the user
  • the user's own comments

Ability to minimize the plugin panel

Feedback from a user:

I'd like to be able to minimise the plugin, rather than having to close it and reopen it via the menu (or a shortcut to reopen it would be nice). It takes up too much screen realestate.

Support JIRA Server

Currently the JIRA Cloud for Sketch only supports JIRA Cloud. We should consider supporting JIRA Server as well.

edit: server support is now in beta!

Stuck on connecting to JIRA

image

After entering my atlassian.net url for my Confluence space, it connects then gets stuck on this screen.

Is it because this only works with Jira and not Confluence?

Thanks!

Reassigning issues

It'd be useful to be able to reassign an issue from the plugin, as some teams reassign issues after handing off assets or designs.

Transitioning issues (updating issue status)

It'd be useful to be able to transition an issue from the plugin, as some teams use issues to track design work (and need to resolve the issue after uploading an asset) or have an explicit status representing the design phase (and need to transition the issue after uploading an asset).

jira password change

I have to change my passwords every few months due to some organization guidelines, so after changing my jira password I'm unable to log out of the plugin to log back in with the new password. I'm getting the "you're not allowed to do that" error message, understandably, but that means I can't access the settings which are only shown after a successful login.

I'm running the server beta, and I've tried uninstalling the plugin and restarting sketch to no avail. Is there a cached settings or log file I need to delete? Thanks for the help!

Filter by [label]

Some designers track work by a particular label (design, needs-design, etc.) Being able to filter by label would be handy to find relevant issues!

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.