Skip to content

[UI] Redesign, dashboard, local plugins #2806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 92 commits into from
Oct 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
b9c5979
feat: basic fonctionality, welcome and kill port widgets
Akryum Sep 20, 2018
763e4e7
fix: contrast improvements
Akryum Sep 20, 2018
f67c89f
feat: plugin/dep/vulnerability widgets design
Akryum Sep 20, 2018
57cf974
fix: widget add/remove animation
Akryum Sep 20, 2018
2bffb9b
feat: run task widget
Akryum Sep 21, 2018
cdda3c0
feat: news + wip resizing
Akryum Sep 21, 2018
06da046
feat: nuxt
Akryum Sep 21, 2018
347ce25
chore: removed widget example
Akryum Sep 22, 2018
a13ad26
fix: visual polish for widget transform
Akryum Sep 22, 2018
ef40b05
feat(widget): overlap detection
Akryum Sep 22, 2018
4f5b193
fix: news default/max size
Akryum Sep 22, 2018
a786ab1
feat(dashboard): sidepane transition
Sep 24, 2018
e8189b5
chore: dev api server port
Sep 24, 2018
b5b409a
fix(widget): configure tooltip
Sep 24, 2018
242403f
refactor(widget): generic Movable mixin
Sep 24, 2018
fff82ca
refactor(widget): resizable mixin
Sep 24, 2018
455c5c5
feat(widget): resize transition
Sep 24, 2018
e537ef2
feat(widget): resize improvements
Sep 24, 2018
0325be1
refactor(widget): zoom factor
Sep 24, 2018
9d8a4f2
refactor(widget): OnGrid mixin
Sep 24, 2018
e25bcb4
refactor(widget): resize handler style moved to global
Sep 24, 2018
0a6d541
chore: remove console.log
Sep 24, 2018
6f7b259
refactor: files structure
Oct 17, 2018
5e9eb4b
feat: improved design and layout
Oct 17, 2018
881128a
fix: content background vars
Oct 17, 2018
4ebaa1a
fix: status bar / view nav z-indexes
Oct 17, 2018
6777ad6
fix: webpack dashboard grid gap
Oct 17, 2018
fa21cfa
feat(news feed): handle errors
Oct 17, 2018
614d659
fix(card): dimmed box shadow
Oct 17, 2018
80f6cba
fix: view nav & status bar z-index
Oct 17, 2018
975bb5d
fix: remove (wip)
Oct 17, 2018
d2ae809
feat(widget): style tweaks
Oct 17, 2018
5c53f8f
feat(widget): details pane (wip)
Oct 17, 2018
22cd013
feat: news feed widget improvements
Oct 18, 2018
fcf3f5f
feat(widget): custom header button
Oct 18, 2018
32b24e8
feat(news): item details pane
Oct 18, 2018
aec96d6
feat(widget): custom title
Oct 18, 2018
22a1a65
fix(news): better cache and misc fixes
Oct 18, 2018
fc286e1
feat(widget): resize left and top handles
Oct 21, 2018
da6060a
feat(widget): transparent widget while moving/resizing
Oct 21, 2018
32fadd1
feat(news): better "big size" style
Oct 21, 2018
492d001
fix(news): media sizes in rich content
Oct 21, 2018
1b5df55
feat(plugin): local plugins support
Oct 21, 2018
89103a8
fix: scrolling issue in Fx
Oct 21, 2018
4809370
fix: colors
Oct 21, 2018
543c126
fix(nav bar): more item overflowing
Oct 21, 2018
da6d729
feat(vuln): frontend
Oct 21, 2018
5094a94
chore: locale update
Oct 21, 2018
0302eeb
fix: image in suggestion dropdown (dev)
Oct 24, 2018
4058960
fix(suggestion): missing custom image
Oct 24, 2018
5b31cc6
feat(view): user default plugin logo if no provided icon
Oct 24, 2018
56fd9ad
feat(view): better loading UX
Oct 24, 2018
c476543
feat(view): button background if view is selected
Oct 24, 2018
b7bc926
feat(view): new nav indicator
Oct 24, 2018
6f0d2c9
feat(widget): use plugin logo as default icon
Oct 24, 2018
eb893e7
feat(widget): better widget modal
Oct 24, 2018
8ff9850
feat(widget): longDescription
Oct 24, 2018
4811f86
fix(widget): news validate url param
Oct 24, 2018
8c19d19
feat(widget): filter widgets in add pane
Oct 24, 2018
4367b14
feat(widget): tease upcoming widgets
Oct 24, 2018
79f7fda
chore: merge dev
Oct 24, 2018
9d438ab
chore: fix merge dev
Oct 24, 2018
c4b914a
chore: yarn install
Oct 24, 2018
f1b81cc
chore: sync versions
Oct 24, 2018
b8397e0
Merge branch 'dev' into feat-dashboard
Akryum Oct 25, 2018
ae912cd
chore: update apollo
Oct 25, 2018
647fac8
docs: widget
Oct 25, 2018
dd529c4
fix(progress): graphql error
Oct 25, 2018
fa70c93
fix(deps): localPath
Oct 25, 2018
e33619c
perf(plugin): faster local plugin refresh
Oct 25, 2018
e685f24
fix(nav): center active indicator
Oct 25, 2018
87fb0a7
feat(task): improved header
Oct 25, 2018
7aea71c
feat(client addon): custom component load timeout message
Oct 25, 2018
539ce62
feat(suggestion): ping animation to improve discoverability
Oct 25, 2018
e59f119
chore: update vue-apollo
Oct 25, 2018
c8cf764
feat(api): requestRoute
Oct 25, 2018
020ef9c
fix(suggestion): hide more info link if no link
Oct 25, 2018
fa35330
fix(style): ul padding
Oct 25, 2018
04f0daa
Merge branch 'dev' into feat-dashboard
Akryum Oct 27, 2018
e55daa1
test(e2e): fix plugin path
Oct 27, 2018
7134054
chore: change test scripts
Oct 27, 2018
67196d3
chore(deps): upgrade
Oct 27, 2018
455e350
fix: build error
Oct 27, 2018
9f86a93
fix(widget): removed moving scale transform
Oct 27, 2018
21803d4
fix(widget): resize handles style
Oct 27, 2018
335c4ad
chore(deps): unpin apollo-utilities
Oct 28, 2018
c1b186f
chore(deps): lock fix
Oct 28, 2018
7c90040
test(e2e): fix server
Oct 28, 2018
dba6aec
fix: issue with writeQuery
Oct 28, 2018
bec374a
test(e2e): fix tests
Oct 28, 2018
a60d625
test(e2e): missing widgets build
Oct 28, 2018
d943c10
fix: missing widgets dep
Oct 28, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions docs/dev-guide/ui-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,58 @@ In this example we only display the vue-router suggestion in the plugins view an

Note: `addSuggestion` and `removeSuggestion` can be namespaced with `api.namespace()`.

## Widgets

You can register a widget for the project dashboard in your plugin ui file:

```js
registerWidget({
// Unique ID
id: 'org.vue.widgets.news',
// Basic infos
title: 'org.vue.widgets.news.title',
description: 'org.vue.widgets.news.description',
icon: 'rss_feed',
// Main component used to render the widget
component: 'org.vue.widgets.components.news',
// (Optional) Secondary component for widget 'fullscreen' view
detailsComponent: 'org.vue.widgets.components.news',
// Size
minWidth: 2,
minHeight: 1,
maxWidth: 6,
maxHeight: 6,
defaultWidth: 2,
defaultHeight: 3,
// (Optional) Limit the maximum number of this widget on the dashboard
maxCount: 1,
// (Optional) Add a 'fullscreen' button in widget header
openDetailsButton: true,
// (Optional) Default configuration for the widget
defaultConfig: () => ({
url: 'https://vuenews.fireside.fm/rss'
}),
// (Optional) Require user to configure widget when added
// You shouldn't use `defaultConfig` with this
needsUserConfig: true,
// (Optional) Display prompts to configure the widget
onConfigOpen: async ({ context }) => {
return {
prompts: [
{
name: 'url',
type: 'input',
message: 'org.vue.widgets.news.prompts.url',
validate: input => !!input // Required
}
]
}
}
})
```

Note: `registerWidget` can be namespaced with `api.namespace()`.

## Other methods

### hasPlugin
Expand Down Expand Up @@ -1324,6 +1376,21 @@ Get currently open project.
api.getProject()
```

### requestRoute

Switch the user on a specific route in the web client.

```js
api.requestRoute({
name: 'foo',
params: {
id: 'bar'
}
})

api.requestRoute('/foobar')
```

## Public static files

You may need to expose some static files over the cli-ui builtin HTTP server (typically if you want to specify an icon to a custom view).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="asset-list list-block">
<div class="asset-list card list-block">
<div class="content">
<div class="title">
{{ $t('org.vue.vue-webpack.dashboard.asset-list.title') }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div
class="build-progress"
class="build-progress card"
:class="{
[`mode-${mode}`]: true
}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="build-status">
<div class="build-status card">
<div class="content">
<div class="info-block status">
<div class="label">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="module-list list-block">
<div class="module-list card list-block">
<div class="content">
<div class="title">
{{ $t('org.vue.vue-webpack.dashboard.module-list.title') }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="speed-stats">
<div class="speed-stats card">
<div class="content">
<div class="title">
{{ $t('org.vue.vue-webpack.dashboard.speed-stats.title') }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="vue-webpack-analyzer">
<div class="pane-toolbar">
<div class="pane-toolbar card">
<VueIcon icon="donut_large"/>
<div class="title">{{ $t('org.vue.vue-webpack.analyzer.title') }}</div>

Expand Down Expand Up @@ -84,7 +84,7 @@
</template>

<div v-if="describedModule" class="described-module">
<div class="wrapper">
<div class="wrapper card">
<div class="path" v-html="modulePath"/>
<div
class="stats size"
Expand Down Expand Up @@ -345,10 +345,6 @@ export default {
.pane-toolbar,
.described-module .wrapper
padding $padding-item
background $vue-ui-color-light-neutral
border-radius $br
.vue-ui-dark-mode &
background $vue-ui-color-dark

.content
display flex
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="vue-webpack-dashboard">
<div class="pane-toolbar">
<div class="pane-toolbar card">
<VueIcon icon="dashboard"/>
<div class="title">{{ $t('org.vue.vue-webpack.dashboard.title') }}</div>

Expand Down Expand Up @@ -40,7 +40,7 @@
/>
</div>

<div class="content vue-ui-grid default-gap">
<div class="content vue-ui-grid">
<BuildStatus />
<BuildProgress />
<SpeedStats class="span-2"/>
Expand Down Expand Up @@ -90,6 +90,7 @@ export default {
.vue-webpack-dashboard
.content
grid-template-columns 9fr 4fr
grid-gap $padding-item

>>>
.title
Expand Down Expand Up @@ -124,13 +125,8 @@ export default {
opacity .75
font-size 16px

.pane-toolbar,
.content >>> > div
/deep/ .card
padding $padding-item
background $vue-ui-color-light-neutral
border-radius $br
.vue-ui-dark-mode &
background $vue-ui-color-dark

.pane-toolbar
margin-bottom $padding-item
Expand Down
3 changes: 3 additions & 0 deletions packages/@vue/cli-ui-addon-widgets/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie <= 8
22 changes: 22 additions & 0 deletions packages/@vue/cli-ui-addon-widgets/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/standard'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
},
globals: {
ClientAddonApi: false,
mapSharedData: false,
Vue: false
}
}
21 changes: 21 additions & 0 deletions packages/@vue/cli-ui-addon-widgets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
21 changes: 21 additions & 0 deletions packages/@vue/cli-ui-addon-widgets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# cli-ui-addon-widgets

## Project setup
```
yarn install
```

### Compiles and hot-reloads for development
```
yarn run serve
```

### Compiles and minifies for production
```
yarn run build
```

### Lints and fixes files
```
yarn run lint
```
5 changes: 5 additions & 0 deletions packages/@vue/cli-ui-addon-widgets/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
26 changes: 26 additions & 0 deletions packages/@vue/cli-ui-addon-widgets/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "@vue/cli-ui-addon-widgets",
"version": "3.0.5",
"files": [
"dist",
"src"
],
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"prepublishOnly": "yarn run lint --no-fix && yarn run build"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.5",
"@vue/cli-plugin-eslint": "^3.0.5",
"@vue/cli-service": "^3.0.5",
"@vue/eslint-config-standard": "^3.0.5",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"vue-template-compiler": "^2.5.17"
},
"publishConfig": {
"access": "public"
}
}
5 changes: 5 additions & 0 deletions packages/@vue/cli-ui-addon-widgets/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}
Binary file not shown.
17 changes: 17 additions & 0 deletions packages/@vue/cli-ui-addon-widgets/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>cli-ui-addon-widgets</title>
</head>
<body>
<noscript>
<strong>We're sorry but cli-ui-addon-widgets doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<template>
<div class="dependency-updates">
<StatusWidget
v-if="status"
:icon="icons[status.status]"
:icon-class="iconClasses[status.status]"
:title="$t(`org.vue.widgets.dependency-updates.messages.${status.status}`)"
:status="status"
@check="checkForUpdates()"
>
<template slot="more-actions">
<VueButton
:to="{ name: 'project-dependencies' }"
:label="$t('org.vue.widgets.dependency-updates.page')"
icon-left="collections_bookmark"
/>
</template>
</StatusWidget>
</div>
</template>

<script>
import { UPDATES_ICONS, UPDATES_ICON_CLASSES } from '../util/consts'

import StatusWidget from './StatusWidget.vue'

export default {
components: {
StatusWidget
},

sharedData () {
return mapSharedData('org.vue.widgets.dependency-updates.', {
status: 'status'
})
},

created () {
this.icons = UPDATES_ICONS
this.iconClasses = UPDATES_ICON_CLASSES
},

methods: {
checkForUpdates () {
// TODO
}
}
}
</script>
Loading