Giter Site home page Giter Site logo

ibm-blockchain / blockchain-vscode-extension Goto Github PK

View Code? Open in Web Editor NEW
267.0 267.0 157.0 345.4 MB

IBM Blockchain Platform extension for Visual Studio Code (this project is no longer active)

Home Page: https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform

License: Other

Shell 0.61% JavaScript 0.46% TypeScript 93.61% Batchfile 0.30% HTML 0.06% Gherkin 1.30% Dockerfile 0.06% SCSS 0.72% Go 0.26% Java 0.38% EJS 2.07% PEG.js 0.04% Jinja 0.12%

blockchain-vscode-extension's People

Contributors

au-shah avatar cazfletch avatar dependabot[bot] avatar dobicinaitis avatar edmoffatt avatar erin-hughes avatar heatherlp avatar ibmblockchaindev avatar jakeeyturner avatar james-wallis avatar jt-nti avatar justinjdaniel avatar kemi04 avatar korbiniank avatar lehors avatar lesleyannjordan avatar lquintai avatar mastersingh24 avatar mazyblue avatar mbwhite avatar mergify[bot] avatar niv23 avatar nklincoln avatar riehab avatar rthatcher avatar sammyrasha avatar simran-sohanpal 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  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  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

blockchain-vscode-extension's Issues

A developer can automatically create a local Fabric runtime

Original content:

  • If they go to add a connection, check whether they have a local Fabric running.
  • If not, offer to create one.
  • Connection name, connection profile, cert, public key can all be automatically set/generated

Update from @EdMoffatt

Low-fi here:

https://xd.adobe.com/view/0bd1f7aa-4358-4526-550b-841b4ba2c81f-7de0/

This is suggesting that ideally we'd like everything to just happen automagically ;) . The logic of what's happening behind the scenes is:

  • Detect that the Fabric docker images that would be running if a local fabric were available aren't there, AND there's no local_fabric connection already configured
  • In that case, offer the option to auto-configure a local_fabric connection
  • When selected, this will pull down the images, start them up, name a new connection local_fabric, generate a connection profile, certificate and private key for it, and use those to complete the connection

One thing we'll need to consider is that this will probably take quite a while to happen! Is there any established convention for operations that take a while once started and don't require any user intervention?

The level of simplicity shown in the lowfi is probably skipping out too much detail, but it gives something to start looking into!

As a developer I can debug my smart contracts

Can we use the Fabric in development mode to do this?
Can we get the existing programming language extension debug functionality to start the chaincode to connect to a Fabric in development mode?

A developer can look up how to achieve a given task

Set of tasks in documentation:

Start a new project
Create package
View, Edit, Delete packages
Add a connection
Automatic local Fabric
Specific connection
Remove a connection
Use a connection
Understand the resource tree of a network
Install a smart contract to a peer (using a package)
Instantiate a smart contract on a channel
Test the functions in a deployed smart contract

A developer can get syntax highlighting for their smart contract project

Most likely a testing story only; ensure that a smart contract project in JavaScript and Golang has syntax highlighting for the smart contract code. This should be provided by the extensions for the respective programming languages, but those plugins might not be installed out of the box - what happens in this case? Do we need to add documentation to say if you want to write smart contracts in Golang, you must first install the Golang extension?

A developer can cancel creating a connection and carry on where they left off

If while creating a connection the user decides to cancel they can then carry on where they left off. The half created connection will appear in the list but will have appropriate icons to show that it is not complete and it won't let the user connect until it is complete

untitled

Suggested phase 1 behaviour is that abandoning part way through will mean the Connection does not get created (they start again if they want to continue creating it).

Yeoman generator checks don't actually check installed version

npm view generator-fabric version checks npmjs.org to see if the specified package exists, and then returns the latest version of that package. It does not actually check to see if the specified package is installed locally, or if it's the right version - and we need to do both!

npm ls -g --depth=0 generator-fabric will check to see if the specified package is installed locally. We also need to check if it's of a version that is compatible with the extension, e.g. the work in issue #51 will require [email protected] or greater to be installed. We will need to prompt the user that they must upgrade their installed version if this is the case.

A developer can get code completion for their smart contract project

Most likely a testing story only; ensure that a smart contract project in JavaScript and Golang has code completion for the smart contract code. This should be provided by the extensions for the respective programming languages, but those plugins might not be installed out of the box - what happens in this case? Do we need to add documentation to say if you want to write smart contracts in Golang, you must first install the Golang extension?

Also, might require updates on Fabric itself. For example, VS Code will not provide code completion for the fabric-shim module unless it provides a Typescript definition file for those APIs. This team might need to add those into Fabric to enable this functionality.

"create fabric project" loads new project in a new window

window's features (e.g. outputChannel or terminal) only accessible via first window
Found during implementing #1
Tried:

openFolder (current implementation, with new window flag set to true)
updateWorkspaceFolders - errors because fabric project isn't a workspace
Probably not fixable because vscode API doesn't allow you to cycle through windows.

Next to try:

making the new window an activation event of the extension
look at alternative activation events once the folder's opened: https://code.visualstudio.com/docs/extensionAPI/activation-events#_activationeventsworkspacecontains
looking at https://code.visualstudio.com/docs/extensionAPI/vscode-api#ExtensionContext and globalState/workplaceState
look at: https://code.visualstudio.com/updates/v1_26#_uri-handler-api

Suggest extension installation for devs who don't have it

A developer opening a project that was created using the Fabric VSCode extension should have it suggested that they install said extension if they don't already have it.

(There is apparently a file that can do this!)

We need a better story about why this makes sense! But probably not Phase 1 anyhow.

A developer can launch an editing session from the package view

Opens the source project for editing, only if the source project is available on the users workspace/system (as opposed to editing a package that someone gave to me that I do not have the source for).

From current low-fis:

image

This would mean we need info about where it "came from"... Which does feel kind of weird. Need more thought & discussion to decide whether we want to do this.

As a developer I can generate tests for my smart contract project once it's instantiated

A developer can right click on instantiated chaincode and it will generate a test file that has all the skeleton code needed to run integration tests
e.g

describe('myContract', () => {
   before(() => {
        \\ connect to a client based on the connection details from the connection they chose
    });

    describe('myFunction', () => {
         it('should do something useful', () => {
              assert('something', 'something');
         });
    });
});

A developer can understand the high-level features from the marketplace

As well as being searchable from within VSCode's extensions catalog, published extensions appear in a web marketplace.

The Docker extension is a good example of how these can look:
https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker

The top of the page features the extension icon and a banner colour (already mentioned in #34 ). Below that is a kind of single-page documentation for the extension. The docker one bullet-points some key benefits, then has sections for each of the features that installing it will add to VSCode complete with a selection of looping videos and screenshots.

I'd like us to start working on the catalog page for our extension. Firstly because we're going to need one, and secondly because if we describe what we're planning for it to be in this way then we can show it to people and say "would you download this? If not, what else would you be looking for?" etc.to validate whether we're making an extension folks will want to use!

Before we publish the extension, the GitHub readme seems a great place to do this work. In fact, just look at the GitHub readme for the Docker extension:
https://github.com/microsoft/vscode-docker
(Spoiler: it looks the same as the marketplace page!)

Let's include the highest fidelity we have for anything we want to show in there e.g. if we talk about the "start a new Fabric chaincode project" bit, we could include a video of this actually happening since @Heatherp has already got an implementation of that bit :)
Meanwhile if we're talking about automatically spinning up the local_fabric connection, we could include a screenshot from @simran-sohanpal 's latest mockups.

I'd like us to create the page now, then update it as the project continues - it'll also form an excellent basis to give us a headstart on writing the docs once we know where they are going to live.

Add a progress box when loading chaincode languages

in createSmartContractProjectCommands.ts, at the point where it runs yo fabric:chaincode to determine available chaincode languages, add in a progress/loading box so the user knows to wait (there's one implemented in the grpc/dependency code)

A developer can use the Fabric extension in their native language

How we enable translation of the Fabric extension, so it can be used in Chinese, Spanish, Pirate?

If we put the infrastructure in place to enable this, then we could potentially crowd source the translations from the community, or try to get some IBM translation budget.

fix npm version checking for generator_fabric and yo

npm view generator-fabric version returns the latest available version, npm ls -g generator-fabric | grep . returns the globally installed version, fix this in createSmartContractProjectCommand.ts
add a check for ensuring the user has the latest version of generator-fabric (and yo?), update it if they haven't

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.