Skip to content

Commit bed7dff

Browse files
authored
Feature/help (#105)
* restructuring and removing unused code * adding tab navigation component to help with reusability * adding icons * refactor to use component * adding alias for components * added more alias. trying to get mocha tests working again. * eslint * fixing help styling * added video embed * hiding faq section. * 3.12.0-beta.0 * adding slot to help to enable extention * 3.12.0-beta.1 * moving slot * 3.12.0-beta.2 * adding more slots for extra customization * 3.12.0-beta.3 * moving getting started slot. Making slack option able to be hidden * 3.12.0-beta.4 * adding option to hide stack overflow link * 3.12.0-beta.5 * adding cadence-web link * 3.12.0-beta.6 * removing hidden image for links on help screen * 3.12.0-beta.7 * making headers linkable which will navigate to that place in the page when copied. * 3.12.0-beta.8 * allow hiding docs link * 3.12.0-beta.9 * renaming intro to domain-search test. adding new tests for help page * fixing intgration tests * adding CLI section. placeholder content for now. * fixing link and adding tests for CLI * adding common cli commands * 3.12.0-beta.10 * adding see more cli commands link * 3.12.0-beta.11 * 3.12.0
1 parent cf1f543 commit bed7dff

File tree

15 files changed

+499
-75
lines changed

15 files changed

+499
-75
lines changed

client/components/detail-list.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { DataViewer } from '~components';
33
import { preKeys } from '~constants';
44
55
export default {
6-
name: 'details-list',
6+
name: 'detail-list',
77
props: ['compact', 'highlight', 'item', 'title'],
88
components: {
99
'data-viewer': DataViewer,

client/components/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ export { default as DataViewer } from './data-viewer';
44
export { default as DetailList } from './detail-list';
55
export { default as DateRangePicker } from './date-range-picker';
66
export { default as DomainNavigation } from './domain-navigation';
7+
export { default as NavigationBar } from './navigation-bar';
8+
export { default as NavigationLink } from './navigation-link';
79
export { default as NotificationBar } from './notification-bar';
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<nav class="navigation-bar">
3+
<slot></slot>
4+
</nav>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: 'navigation-bar',
10+
};
11+
</script>
12+
13+
<style lang="stylus">
14+
.navigation-bar {
15+
flex-wrap: wrap;
16+
background-color: #000;
17+
padding: 0 12px;
18+
}
19+
</style>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<template>
2+
<router-link
3+
class="navigation-link"
4+
:class="icon"
5+
:exact="exact"
6+
:id="id"
7+
:to="to"
8+
>
9+
{{ label }}
10+
</router-link>
11+
</template>
12+
13+
<script>
14+
export default {
15+
name: 'navigation-link',
16+
props: ['exact', 'icon', 'id', 'label', 'to'],
17+
};
18+
</script>
19+
20+
<style lang="stylus">
21+
a.navigation-link {
22+
display: inline-block;
23+
padding: 11px 18px;
24+
transition: all 400ms ease;
25+
font-weight: 500;
26+
text-transform: uppercase;
27+
border-bottom: 4px solid transparent;
28+
29+
&:before {
30+
font-family: 'uber-icons';
31+
margin-right: 5px;
32+
}
33+
34+
&.router-link-active {
35+
border-bottom-color: #11939a;
36+
}
37+
}
38+
</style>

client/main.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import copyButton from './components/copy.vue';
1313
import snapscroll from './directives/snapscroll';
1414

1515
import App from './App.vue';
16-
import Intro from './routes/Intro.vue';
16+
import Root from './routes/index.vue';
17+
import Help from './routes/help.vue';
18+
import DomainSearch from './routes/domain-search.vue';
1719
import Workflows from './routes/Workflows.vue';
1820
import DomainConfig from './routes/domain-config.vue';
1921
import ExecutionTabs from './routes/execution/index.vue';
@@ -29,7 +31,23 @@ const routeOpts = {
2931
routes: [
3032
{
3133
path: '/',
32-
component: Intro,
34+
component: Root,
35+
children: [
36+
{
37+
name: 'domain-search',
38+
path: '/',
39+
components: {
40+
'domain-search': DomainSearch
41+
},
42+
},
43+
{
44+
name: 'help',
45+
path: '/help',
46+
components: {
47+
help: Help
48+
},
49+
},
50+
],
3351
},
3452
{
3553
name: 'workflows',

client/routes/Intro.vue renamed to client/routes/domain-search.vue

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
11
<template>
2-
<section class="intro">
3-
<div class="links">
4-
<h1>Welcome to Cadence!</h1>
5-
<p>
6-
If you are new to Cadence, here's some resources to get you started!
7-
</p>
8-
<a
9-
href="https://www.youtube.com/watch?v=-BuIkhlc-RM&amp;t=3s"
10-
target="_blank"
11-
rel="noopener noreferrer"
12-
>Introductory to Cadence Video</a
13-
>
14-
<a
15-
href="https://github.com/samarabbas/cadence-samples"
16-
target="_blank"
17-
rel="noopener noreferrer"
18-
>Code Samples</a
19-
>
20-
<a
21-
href="https://github.com/uber/cadence"
22-
target="_blank"
23-
rel="noopener noreferrer"
24-
>Source code on GitHub</a
25-
>
26-
<p>Otherwise, provide your team's domain to get started</p>
27-
</div>
2+
<section class="domain-search">
283
<domain-navigation type="text" placeholder="cadence-canary" />
294
</section>
305
</template>
@@ -45,7 +20,7 @@ export default {
4520
<style lang="stylus">
4621
@require "../styles/definitions"
4722
48-
section.intro
23+
section.domain-search
4924
margin layout-spacing-large
5025
@media (min-width 1600px)
5126
width 1580px

client/routes/execution/helpers/get-summary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { getJsonStringObject, getKeyValuePairs } from '../../../helpers';
21
import getSummaryWorkflowStatus from './get-summary-workflow-status';
32
import parentWorkflowLink from './parent-workflow-link';
3+
import { getJsonStringObject, getKeyValuePairs } from '~helpers';
44

55
const getSummary = ({ events, isWorkflowRunning, workflow }) => {
66
const formattedWorkflow = workflow.pendingActivities

client/routes/execution/index.vue

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
<template>
22
<section :class="{ execution: true, loading: wfLoading }">
3-
<nav>
4-
<router-link :to="{ name: 'execution/summary' }" class="summary"
5-
>Summary</router-link
6-
>
7-
<router-link :to="{ name: 'execution/history' }" class="history"
8-
>History</router-link
9-
>
10-
<router-link
3+
<navigation-bar>
4+
<navigation-link
5+
id="nav-link-summary"
6+
icon="icon_receipt"
7+
label="Summary"
8+
:to="{ name: 'execution/summary' }"
9+
/>
10+
<navigation-link
11+
id="nav-link-history"
12+
icon="icon_trip-history"
13+
label="History"
14+
:to="{ name: 'execution/history' }"
15+
/>
16+
<navigation-link
17+
id="nav-link-stack-trace"
18+
icon="icon_trips"
19+
label="Stack Trace"
1120
:to="{ name: 'execution/stack-trace' }"
12-
class="stack-trace"
1321
v-show="isWorkflowRunning"
14-
>Stack Trace</router-link
15-
>
16-
<router-link
22+
/>
23+
<navigation-link
24+
id="nav-link-queries"
25+
icon="icon_lost"
26+
label="Queries"
1727
:to="{ name: 'execution/queries' }"
18-
class="queries"
1928
v-show="isWorkflowRunning"
20-
>Queries</router-link
21-
>
22-
</nav>
29+
/>
30+
</navigation-bar>
2331
<router-view
2432
name="summary"
2533
:baseAPIURL="baseAPIURL"
@@ -61,6 +69,7 @@ import {
6169
} from './helpers';
6270
import { NOTIFICATION_TYPE_ERROR } from '~constants';
6371
import { getErrorMessage } from '~helpers';
72+
import { NavigationBar, NavigationLink } from '~components';
6473
6574
export default {
6675
data() {
@@ -100,6 +109,10 @@ export default {
100109
beforeDestroy() {
101110
this.clearWatches();
102111
},
112+
components: {
113+
'navigation-bar': NavigationBar,
114+
'navigation-link': NavigationLink,
115+
},
103116
computed: {
104117
baseAPIURL() {
105118
const { domain, workflowId, runId } = this;

0 commit comments

Comments
 (0)