Skip to content

Commit

Permalink
feat: use x-prompt details in nx-console-field
Browse files Browse the repository at this point in the history
feat: use x-prompt details in nx-console-field

Adding the below changes:
 - When an x-prompt message is used, adding a title to the field name
 - When the x-prompt type is list and multiselect is true, using a new multi-select component that allows the user to select multiple options.
 - When it provides items in the x-prompt that have labels, adding a title the select or autocomplete option
  • Loading branch information
srleecode committed Nov 3, 2020
1 parent ec66c8f commit 7537387
Show file tree
Hide file tree
Showing 68 changed files with 6,586 additions and 2,742 deletions.
1 change: 1 addition & 0 deletions .storybook/addons.js
@@ -0,0 +1 @@
import '@storybook/addon-knobs/register';
8 changes: 8 additions & 0 deletions .storybook/tsconfig.json
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"exclude": ["../**/test.ts", "../**/*.spec.ts"],
"compilerOptions": {
"sourceMap": true
},
"include": ["../**/*"]
}
21 changes: 21 additions & 0 deletions .storybook/webpack.config.js
@@ -0,0 +1,21 @@
// Export a function. Accept the base config as the only param.
module.exports = async ({ config, mode }) => {
// `mode` has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.

// Make whatever fine-grained changes you need
config.module.rules.forEach(rule => {
(rule.use || []).forEach(parser => {
if (parser.loader === 'ts-loader') {
parser.options = {
...parser.options,
transpileOnly: false
};
}
});
});

// Return the altered config
return config;
};
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -16,6 +16,11 @@ When you want to update the extension with a new set of changes, go back to the

- Run `nps test` to run unit tests.

### Running Storybook

- Run `nps storybook` to launch the storybook instance
- Run `nps storybook-e2e` to run the e2e tests on the storybook instance

## Submitting a PR

Please follow the following guidelines:
Expand Down
221 changes: 128 additions & 93 deletions angular.json
Expand Up @@ -3,88 +3,6 @@
"version": 1,
"newProjectRoot": "",
"projects": {
"vscode": {
"root": "apps/vscode",
"sourceRoot": "apps/vscode/src",
"projectType": "application",
"prefix": "vscode",
"schematics": {},
"architect": {
"build": {
"builder": "@nrwl/node:build",
"options": {
"outputPath": "dist/apps/vscode",
"main": "apps/vscode/src/main.ts",
"tsConfig": "apps/vscode/tsconfig.app.json",
"assets": [
"apps/vscode/src/package.json",
"apps/vscode/src/tree-view-icon.svg",
"apps/vscode/src/assets",
{
"glob": "README.md",
"input": "./",
"output": "/"
},
{
"glob": "**/*",
"input": "libs/server/src/assets",
"output": "/assets/"
}
]
},
"configurations": {
"production": {
"externalDependencies": ["vscode", "jsonc-parser", "json5"],
"sourceMap": false,
"optimization": true,
"extractLicenses": true,
"fileReplacements": [
{
"replace": "apps/vscode/src/environments/environment.ts",
"with": "apps/vscode/src/environments/environment.prod.ts"
}
]
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["apps/vscode/tsconfig.app.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"schema": {
"root": "libs/schema",
"sourceRoot": "libs/schema/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["libs/schema/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"server": {
"root": "libs/server",
"sourceRoot": "libs/server/src",
"projectType": "library",
"architect": {
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/server/jest.config.js",
"tsConfig": "libs/server/tsconfig.spec.json",
"setupFile": "libs/server/src/test-setup.ts"
}
}
}
},
"vscode-ui": {
"projectType": "application",
"schematics": {
Expand Down Expand Up @@ -172,29 +90,84 @@
}
}
},
"vscode-ui-e2e": {
"root": "apps/vscode-ui-e2e",
"sourceRoot": "apps/vscode-ui-e2e/src",
"vscode": {
"root": "apps/vscode",
"sourceRoot": "apps/vscode/src",
"projectType": "application",
"prefix": "vscode",
"schematics": {},
"architect": {
"e2e": {
"builder": "@nrwl/cypress:cypress",
"build": {
"builder": "@nrwl/node:build",
"options": {
"cypressConfig": "apps/vscode-ui-e2e/cypress.json",
"tsConfig": "apps/vscode-ui-e2e/tsconfig.e2e.json",
"devServerTarget": "vscode-ui:serve"
"outputPath": "dist/apps/vscode",
"main": "apps/vscode/src/main.ts",
"tsConfig": "apps/vscode/tsconfig.app.json",
"assets": [
"apps/vscode/src/package.json",
"apps/vscode/src/tree-view-icon.svg",
"apps/vscode/src/assets",
{
"glob": "README.md",
"input": "./",
"output": "/"
},
{
"glob": "**/*",
"input": "libs/server/src/assets",
"output": "/assets/"
}
]
},
"configurations": {
"production": {
"devServerTarget": "vscode-ui:serve:production"
"externalDependencies": ["vscode", "jsonc-parser", "json5"],
"sourceMap": false,
"optimization": true,
"extractLicenses": true,
"fileReplacements": [
{
"replace": "apps/vscode/src/environments/environment.ts",
"with": "apps/vscode/src/environments/environment.prod.ts"
}
]
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "apps/vscode-ui-e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**", "!apps/vscode-ui-e2e/**"]
"tsConfig": ["apps/vscode/tsconfig.app.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"schema": {
"root": "libs/schema",
"sourceRoot": "libs/schema/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["libs/schema/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"server": {
"root": "libs/server",
"sourceRoot": "libs/server/src",
"projectType": "library",
"architect": {
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/server/jest.config.js",
"tsConfig": "libs/server/tsconfig.spec.json",
"setupFile": "libs/server/src/test-setup.ts"
}
}
}
Expand All @@ -215,6 +188,36 @@
"!libs/vscode-ui/feature-task-execution-form/**"
]
}
},
"storybook": {
"builder": "@nrwl/storybook:storybook",
"options": {
"uiFramework": "@storybook/angular",
"port": 4400,
"config": {
"configFolder": "libs/vscode-ui/feature-task-execution-form/.storybook"
}
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"build-storybook": {
"builder": "@nrwl/storybook:build",
"options": {
"uiFramework": "@storybook/angular",
"outputPath": "dist/storybook/vscode-ui-feature-task-execution-form",
"config": {
"configFolder": "libs/vscode-ui/feature-task-execution-form/.storybook"
}
},
"configurations": {
"ci": {
"quiet": true
}
}
}
},
"schematics": {}
Expand Down Expand Up @@ -252,6 +255,38 @@
}
},
"schematics": {}
},
"vscode-ui-feature-task-execution-form-e2e": {
"root": "apps/vscode-ui-feature-task-execution-form-e2e",
"sourceRoot": "apps/vscode-ui-feature-task-execution-form-e2e/src",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/vscode-ui-feature-task-execution-form-e2e/cypress.json",
"tsConfig": "apps/vscode-ui-feature-task-execution-form-e2e/tsconfig.e2e.json",
"devServerTarget": "vscode-ui-feature-task-execution-form:storybook"
},
"configurations": {
"production": {
"devServerTarget": "vscode-ui-feature-task-execution-form:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"apps/vscode-ui-feature-task-execution-form-e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**",
"!apps/vscode-ui-feature-task-execution-form-e2e/**"
]
}
}
}
}
},
"cli": {
Expand Down
11 changes: 0 additions & 11 deletions apps/vscode-ui-e2e/cypress.json

This file was deleted.

4 changes: 0 additions & 4 deletions apps/vscode-ui-e2e/src/fixtures/example.json

This file was deleted.

9 changes: 0 additions & 9 deletions apps/vscode-ui-e2e/src/integration/app.spec.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/vscode-ui-e2e/src/support/app.po.ts

This file was deleted.

12 changes: 12 additions & 0 deletions apps/vscode-ui-feature-task-execution-form-e2e/cypress.json
@@ -0,0 +1,12 @@
{
"fileServerFolder": ".",
"integrationFolder": "./src/integration",
"pluginsFile": "./src/plugins/index",
"modifyObstructiveCode": false,
"supportFile": "./src/support/index.ts",
"video": true,
"videosFolder": "../../dist/cypress/apps/vscode-ui-feature-task-execution-form-e2e/videos",
"screenshotsFolder": "../../dist/cypress/apps/vscode-ui-feature-task-execution-form-e2e/screenshots",
"chromeWebSecurity": false,
"baseUrl": "http://localhost:4400"
}
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
@@ -0,0 +1,17 @@
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
};
Expand Up @@ -21,5 +21,5 @@
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// -- This is will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')

0 comments on commit 7537387

Please sign in to comment.