Skip to content

Commit 590b3fc

Browse files
Release/3.17.0 (#160)
* fixing lint off master branch (#159) * Feature/utc time (#158) * Feature/news (#149) * adding vuepress for blog * customising blog * reformatting blog posts. getting RSS working which will be used for modal. * got build somewhat working. now to think about how we integrate with existing app * got news working within the app. * changing blog theme version to lower version because of javascript error. Finally got iframe loading consistently. * adding in error handling * adding build script from top project level to install and compile news. Adding in some styling for news. Removing unnecessary meta data on posts. * working out behavior of news modal and close logic. Need to display news items in modal. * adding news modal - disabled. fixed issue with url not updating with iframe navigation. * simplifying get location * simplifying code * fixing bug where child gets out of sync with parent navigation. * refactor duplicated code * adding dismiss button to modal. adding links to headers of articles. * adding more style options for grid. styling up news modal. * adding new component for button icon. more styling for news modal * final styling finished for news modal. * fixing grammar mistake * fixing news tab bug * fixed sort order on feed. latest first, oldest last. got dismiss working which will take latest news item date and store in local storage. * removing date conversion as its not required. * Refactoring to help with readability of code. * lint fixes * deleting unused files. small refactor with pallette variables * fixing failing tests * 3.16.0-beta.0 * fixing bug with news navigation. lint changes * 3.16.0-beta.1 * hiding header anchor links * 3.16.0-beta.2 * changing dev deps to deps * 3.16.0-beta.3 * adding tests for getLatestNewsItems * small refactoring * adding tests for news helpers * eslint fixes * removing dummy posts * PR comments * fixing link to now navigate to news page irrelevant on the current route you are on. (#151) * Feature/auth (#152) * moving request defaults to see if it gets auth working server side. * 3.16.0-beta.4 * domain authorization (#154) * adding domain authorization feature. * 3.16.0-beta.5 * adding documentation for how to use and calling next to hook in middleware * 3.16.0-beta.6 * fix bug passing domain name to server. updated docs for overriding route. * 3.16.0-beta.7 * Simplifying code. Hiding button on unauthorized instead of disabling button. * small refactor * small refactor * removing unused code * updating tests. fixing warnings. * switching buttons in modal to use button-fill components. * fixing tests * 3.16.0-beta.8 * starting work on UTC settings modal * updating flex grid with more props. getting settings button ready. * got settings modal working * adding dateFormat to settings options. Adding example textbox to display an example of the datetime format changing when options change. starting to wireup workflow history and archival screens. * wiring up timezone * wiring up workflow list screen with date format for start time and end time. tweaked settings modal to fit all 3 dropdowns on one line. * updated archival screen to support datetime format settings * adding support to summary and task list screens. * removing moment reference * got history working with datetime formatting setting * updating selected event timestamp to use format. Updated stacktrace to use format. * fixing unit tests * fixing tests * lint fixes * adding unit tests for getDatetimeFormattedString * fixing lint * removing old blog post no longer needed. * PR comments * Resolves issue where the summary page would throw an error `_summarizeEvents.summarizeEvents[e.eventType] is not a function` due to an activity task cancelled appearing in the event history. (#153) * adding release notes for 3.17.0 release. (#161) * 3.17.0 Co-authored-by: Braden Bassingthwaite <bradenbass@gmail.com>
1 parent 182da34 commit 590b3fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+945
-220
lines changed

client/App.vue

Lines changed: 114 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
<script>
22
import { version } from '../package.json';
33
import logo from './assets/logo.svg';
4-
import { FeatureFlag, NewsModal, NotificationBar } from '~components';
54
import {
5+
ButtonIcon,
6+
FeatureFlag,
7+
FlexGrid,
8+
FlexGridItem,
9+
NewsModal,
10+
NotificationBar,
11+
SettingsModal,
12+
} from '~components';
13+
import {
14+
DATE_FORMAT_MMM_D_YYYY,
15+
DATE_FORMAT_OPTIONS,
616
ENVIRONMENT_LIST,
17+
LOCAL_STORAGE_NEWS_LAST_VIEWED_AT,
18+
LOCAL_STORAGE_SETTINGS,
719
NOTIFICATION_TIMEOUT,
820
NOTIFICATION_TYPE_SUCCESS,
21+
TIME_FORMAT_12,
22+
TIME_FORMAT_OPTIONS,
23+
TIMEZONE_LOCAL,
24+
TIMEZONE_OPTIONS,
925
} from '~constants';
1026
import {
1127
getEnvironment,
@@ -16,9 +32,13 @@ import {
1632
1733
export default {
1834
components: {
35+
'button-icon': ButtonIcon,
1936
'feature-flag': FeatureFlag,
37+
'flex-grid': FlexGrid,
38+
'flex-grid-item': FlexGridItem,
2039
'news-modal': NewsModal,
2140
'notification-bar': NotificationBar,
41+
'settings-modal': SettingsModal,
2242
},
2343
data() {
2444
const { origin } = window.location;
@@ -35,7 +55,7 @@ export default {
3555
origin,
3656
}),
3757
},
38-
newsLastUpdated: localStorage.getItem('news-last-viewed-at'),
58+
newsLastUpdated: localStorage.getItem(LOCAL_STORAGE_NEWS_LAST_VIEWED_AT),
3959
newsItems: [],
4060
logo,
4161
notification: {
@@ -44,6 +64,20 @@ export default {
4464
type: '',
4565
timeout: undefined,
4666
},
67+
settings: {
68+
dateFormat:
69+
localStorage.getItem(LOCAL_STORAGE_SETTINGS.dateFormat) ||
70+
DATE_FORMAT_MMM_D_YYYY,
71+
dateFormatOptions: DATE_FORMAT_OPTIONS,
72+
timeFormat:
73+
localStorage.getItem(LOCAL_STORAGE_SETTINGS.timeFormat) ||
74+
TIME_FORMAT_12,
75+
timeFormatOptions: TIME_FORMAT_OPTIONS,
76+
timezone:
77+
localStorage.getItem(LOCAL_STORAGE_SETTINGS.timezone) ||
78+
TIMEZONE_LOCAL,
79+
timezoneOptions: TIMEZONE_OPTIONS,
80+
},
4781
};
4882
},
4983
beforeDestroy() {
@@ -95,7 +129,7 @@ export default {
95129
},
96130
onNewsDismiss() {
97131
localStorage.setItem(
98-
'news-last-viewed-at',
132+
LOCAL_STORAGE_NEWS_LAST_VIEWED_AT,
99133
this.newsItems[0].date_modified
100134
);
101135
},
@@ -107,6 +141,17 @@ export default {
107141
onNotificationClose() {
108142
this.notification.show = false;
109143
},
144+
onSettingsChange(values) {
145+
for (const key in values) {
146+
const value = values[key];
147+
148+
localStorage.setItem(LOCAL_STORAGE_SETTINGS[key], value);
149+
this.settings[key] = value;
150+
}
151+
},
152+
onSettingsClick() {
153+
this.$modal.show('settings-modal');
154+
},
110155
},
111156
watch: {
112157
'notification.show'(value) {
@@ -137,44 +182,77 @@ export default {
137182
:type="notification.type"
138183
/>
139184
<header class="top-bar">
140-
<a href="/domains" class="logo">
141-
<div v-html="logo"></div>
142-
<span class="version">{{ version }}</span>
143-
</a>
185+
<flex-grid align-items="center" width="100%">
186+
<flex-grid-item>
187+
<a href="/domains" class="logo">
188+
<div v-html="logo"></div>
189+
<span class="version">{{ version }}</span>
190+
</a>
191+
</flex-grid-item>
144192

145-
<feature-flag name="environment-select">
146-
<v-select
147-
class="environment-select"
148-
:on-change="onEnvironmentSelectChange"
149-
:options="environment.list"
150-
:searchable="false"
151-
:value="environment.value"
152-
/>
153-
</feature-flag>
193+
<feature-flag name="environment-select">
194+
<flex-grid-item>
195+
<v-select
196+
class="environment-select"
197+
:on-change="onEnvironmentSelectChange"
198+
:options="environment.list"
199+
:searchable="false"
200+
:value="environment.value"
201+
/>
202+
</flex-grid-item>
203+
</feature-flag>
154204

155-
<div class="domain" v-if="$route.params.domain">
156-
<a
157-
class="workflows"
158-
:class="{
159-
'router-link-active':
160-
$route.path === `/domains/${$route.params.domain}/workflows`,
161-
}"
162-
:href="`/domains/${$route.params.domain}/workflows`"
163-
>
164-
{{ $route.params.domain }}
165-
</a>
166-
</div>
167-
<div class="detail-view workflow-id" v-if="$route.params.workflowId">
168-
<span>{{ $route.params.workflowId }}</span>
169-
</div>
170-
<div class="detail-view task-list" v-if="$route.params.taskList">
171-
<span>{{ $route.params.taskList }}</span>
172-
</div>
205+
<flex-grid-item v-if="$route.params.domain" margin="15px">
206+
<a
207+
class="workflows"
208+
:class="{
209+
'router-link-active':
210+
$route.path === `/domains/${$route.params.domain}/workflows`,
211+
}"
212+
:href="`/domains/${$route.params.domain}/workflows`"
213+
>
214+
{{ $route.params.domain }}
215+
</a>
216+
</flex-grid-item>
217+
218+
<flex-grid-item v-if="$route.params.workflowId">
219+
<span>{{ $route.params.workflowId }}</span>
220+
</flex-grid-item>
221+
222+
<flex-grid-item v-if="$route.params.taskList">
223+
<span>{{ $route.params.taskList }}</span>
224+
</flex-grid-item>
225+
226+
<flex-grid-item grow="1">
227+
<button-icon
228+
color="primary"
229+
icon="icon_settings"
230+
label="SETTINGS"
231+
size="30px"
232+
style="float: right"
233+
@click="onSettingsClick"
234+
/>
235+
</flex-grid-item>
236+
</flex-grid>
173237
</header>
174-
<router-view @onNotification="onNotification"></router-view>
238+
<router-view
239+
:date-format="settings.dateFormat"
240+
:time-format="settings.timeFormat"
241+
:timezone="settings.timezone"
242+
@onNotification="onNotification"
243+
></router-view>
175244
<modals-container />
176245
<v-dialog />
177246
<news-modal :news-items="newsItems" @before-close="onNewsDismiss" />
247+
<settings-modal
248+
:date-format="settings.dateFormat"
249+
:date-format-options="settings.dateFormatOptions"
250+
:time-format="settings.timeFormat"
251+
:time-format-options="settings.timeFormatOptions"
252+
:timezone="settings.timezone"
253+
:timezone-options="settings.timezoneOptions"
254+
@onChange="onSettingsChange"
255+
/>
178256
</main>
179257
</template>
180258

@@ -224,32 +302,7 @@ header.top-bar
224302
spacing = 1.3em
225303
nav-label-color = uber-white-40
226304
nav-label-font-size = 11px
227-
& > div
228-
margin-right spacing
229-
div.domain
230-
flex 0 0 auto
231-
&::before
232-
content 'DOMAIN'
233-
font-size nav-label-font-size
234-
font-weight normal
235-
vertical-align middle
236-
color nav-label-color
237-
margin-right spacing
238-
a:hover
239-
color lighten(uber-blue, 15%)
240-
.router-link-active
241-
pointer-events none
242-
span
243-
cursor pointer
244-
transition smooth-transition
245-
color uber-blue
246-
& + div
247-
icon('\ea5b')
248-
one-liner-ellipsis()
249-
&::before
250-
display inline-block
251-
transform scale(1.5)
252-
margin-right spacing
305+
253306
.detail-view span::before
254307
font-size nav-label-font-size
255308
color nav-label-color

client/components/button-fill.vue

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ export default {
2424
color: {
2525
type: String,
2626
default: 'primary',
27+
validator: value =>
28+
['primary', 'secondary', 'tertiary'].includes(value),
2729
},
2830
disabled: {
2931
type: Boolean,
3032
},
3133
disabledLabel: {
32-
type: String
34+
type: String,
3335
},
3436
href: {
3537
type: String,
@@ -48,7 +50,7 @@ export default {
4850
computed: {
4951
disabledLabelText() {
5052
return this.disabled ? this.disabledLabel : '';
51-
}
53+
},
5254
},
5355
methods: {
5456
onClick(...args) {
@@ -71,26 +73,35 @@ export default {
7173
transition: all 400ms ease;
7274
color: #fff !important;
7375
white-space: nowrap;
74-
}
7576
76-
.button-fill.disabled {
77-
opacity: 0.5;
78-
cursor: not-allowed;
79-
}
77+
&.disabled {
78+
opacity: 0.5;
79+
cursor: not-allowed;
80+
}
8081
81-
.button-fill.primary {
82-
background-color: #11939a;
82+
&.primary {
83+
background-color: #11939a;
8384
84-
&:hover {
85-
background-color: #0e767b;
85+
&:hover {
86+
background-color: #0e767b;
87+
}
88+
}
89+
90+
&.secondary {
91+
background-color: #ca3b27;
92+
93+
&:hover {
94+
background-color: #a22f1f;
95+
}
8696
}
87-
}
8897
89-
.button-fill.secondary {
90-
background-color: #ca3b27;
98+
&.tertiary {
99+
background-color: transparent;
100+
color: #11939a !important;
91101
92-
&:hover {
93-
background-color: #a22f1f;
102+
&:hover {
103+
color: #0e767b !important;
104+
}
94105
}
95106
}
96107
</style>

client/components/button-icon.vue

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@
66
:to="to"
77
@click="onClick"
88
>
9-
<span class="icon" :class="icon" :style="{ 'font-size': size }" />
10-
{{ label }}
9+
<span
10+
class="icon"
11+
:class="{ [icon]: icon, [color]: color }"
12+
:style="{ 'font-size': size }"
13+
/>
14+
<span class="label" :class="{ [color]: color }">{{ label }}</span>
1115
</component>
1216
</template>
1317

1418
<script>
1519
export default {
1620
name: 'button-icon',
1721
props: {
22+
color: {
23+
type: String,
24+
validator: value => ['primary', 'secondary'].includes(value),
25+
},
1826
href: {
1927
type: String,
2028
},
@@ -50,14 +58,26 @@ export default {
5058
border: none;
5159
cursor: pointer;
5260
display: inline-block;
53-
font-weight: 600;
54-
line-height: 41px;
61+
font-weight: 500;
5562
min-width: 44px;
63+
padding: 10px;
5664
transition: all 400ms ease;
5765
white-space: nowrap;
5866
5967
.icon {
6068
vertical-align: middle;
6169
}
70+
71+
.label {
72+
margin-left: 5px;
73+
}
74+
75+
.primary {
76+
color: #11939a;
77+
}
78+
79+
.secondary {
80+
color: #ca3b27;
81+
}
6282
}
6383
</style>

client/components/flex-grid-item.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
<template>
2-
<div class="flex-grid-item" :style="{ maxWidth: width }">
2+
<div
3+
class="flex-grid-item"
4+
:style="{ flexGrow: grow, marginRight: margin, maxWidth: width }"
5+
>
36
<slot></slot>
47
</div>
58
</template>
69

710
<script>
811
export default {
912
name: 'flex-grid-item',
10-
props: ['width'],
13+
props: ['grow', 'margin', 'width'],
1114
};
1215
</script>
1316

1417
<style lang="stylus">
1518
.flex-grid-item {
16-
flex-grow: 1;
1719
margin-right: 5px;
1820
&:last-child {
1921
margin-right: 0;

0 commit comments

Comments
 (0)