Skip to content

Commit 7b56ebb

Browse files
committed
946147: Update Stock Market Use Case Sample Based on UX Review.
1 parent c6d885b commit 7b56ebb

File tree

4 files changed

+44
-10
lines changed

4 files changed

+44
-10
lines changed

Stock-Market-Application/src/components/MyPortfolio.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@ export default function MyPortfolio(props: { changeMarquee: Function, myStockDm:
242242
{
243243
title: 'Analysis',
244244
buttonOption: {
245-
iconCss: 'analysis e-icons',
246-
cssClass: 'e-primary',
245+
iconCss: 'analysis e-icons'
247246
},
248247
},
249248
]}

Stock-Market-Application/src/components/Overview.tsx

+21-2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,24 @@ export default function Overview(props: { changeMarquee: Function, myStockDm: Da
8989
iconEle!.classList.add('e-chevron-down-double');
9090
}
9191
}
92+
if (args.column!.field === 'High') {
93+
let iconEle = args.cell!.querySelector('.e-icons');
94+
iconEle!.classList.add('e-arrow-up');
95+
let valueEle = args.cell!.querySelector('.high');
96+
if (valueEle) {
97+
let value = parseFloat(valueEle.innerHTML);
98+
valueEle.innerHTML = Number.isInteger(value) ? value.toString() : value.toFixed(2);
99+
}
100+
}
101+
if (args.column!.field === 'Low') {
102+
let iconEle = args.cell!.querySelector('.e-icons');
103+
iconEle!.classList.add('e-arrow-down');
104+
let valueEle = args.cell!.querySelector('.low');
105+
if (valueEle) {
106+
let value = parseFloat(valueEle.innerHTML);
107+
valueEle.innerHTML = Number.isInteger(value) ? value.toString() : value.toFixed(2);
108+
}
109+
}
92110
if (
93111
args.column!.field === 'Last' ||
94112
args.column!.field === 'ChangeInValue' ||
@@ -303,12 +321,14 @@ export default function Overview(props: { changeMarquee: Function, myStockDm: Da
303321
<ColumnDirective
304322
field="High"
305323
format="N2"
324+
template="<span class='high'> ${High} </span ><span class='e-icons'></span>"
306325
textAlign="Center"
307326
width="80"
308327
></ColumnDirective>
309328
<ColumnDirective
310329
field="Low"
311330
format="N2"
331+
template="<span class='low'> ${Low} </span ><span class='e-icons'></span>"
312332
textAlign="Center"
313333
width="80"
314334
></ColumnDirective>
@@ -330,8 +350,7 @@ export default function Overview(props: { changeMarquee: Function, myStockDm: Da
330350
{
331351
title: 'Analysis',
332352
buttonOption: {
333-
iconCss: 'analysis e-icons',
334-
cssClass: 'e-primary',
353+
iconCss: 'analysis e-icons'
335354
},
336355
},
337356
]}

Stock-Market-Application/src/components/SmartStockPicks.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,14 @@ export default function SmartStockPicks(props: { myStockDm: DataManager }) {
271271
<ColumnDirective
272272
field="High"
273273
format="N2"
274+
template="<span class='high'> ${High} </span ><span class='e-icons'></span>"
274275
textAlign="Right"
275276
width="70"
276277
></ColumnDirective>
277278
<ColumnDirective
278279
field="Low"
279280
format="N2"
281+
template="</span><span class='low'> ${Low} </span ><span class='e-icons'>"
280282
textAlign="Right"
281283
width="70"
282284
></ColumnDirective>
@@ -298,8 +300,7 @@ export default function SmartStockPicks(props: { myStockDm: DataManager }) {
298300
{
299301
title: 'Analysis',
300302
buttonOption: {
301-
iconCss: 'analysis e-icons',
302-
cssClass: 'e-primary',
303+
iconCss: 'analysis e-icons'
303304
},
304305
},
305306
]}

Stock-Market-Application/src/style.css

+19-4
Original file line numberDiff line numberDiff line change
@@ -254,16 +254,23 @@ body {
254254

255255
.e-grid td.e-rowcell.e-pos:not(.e-editedbatchcell):not(.e-updatedtd),
256256
.e-grid.e-gridhover .e-row:not(.e-disable-gridhover):not(.e-editedrow):not(.e-detailrow):hover .e-rowcell.e-pos:not(.e-cellselectionbackground):not(.e-active):not(.e-updatedtd):not(.e-indentcell),
257-
.e-grid td.e-rowcell.e-pos .e-icons {
257+
.e-grid td.e-rowcell.e-pos .e-icons,
258+
.e-grid td.e-rowcell .e-icons.e-arrow-up {
258259
color: #00a653;
259260
}
260261

261262
.e-grid td.e-rowcell.e-neg:not(.e-editedbatchcell):not(.e-updatedtd),
262263
.e-grid.e-gridhover .e-row:not(.e-disable-gridhover):not(.e-editedrow):not(.e-detailrow):hover .e-rowcell.e-neg:not(.e-cellselectionbackground):not(.e-active):not(.e-updatedtd):not(.e-indentcell),
263-
.e-grid td.e-rowcell.e-neg .e-icons {
264+
.e-grid td.e-rowcell.e-neg .e-icons,
265+
.e-grid td.e-rowcell .e-icons.e-arrow-down {
264266
color: #ff3740;
265267
}
266268

269+
.e-grid td.e-rowcell .e-icons.e-arrow-up,
270+
.e-grid td.e-rowcell .e-icons.e-arrow-down {
271+
vertical-align: middle;
272+
}
273+
267274
.e-grid .e-gridheader .e-sortfilter .e-headercelldiv {
268275
padding: 0 20px 0 8px;
269276
}
@@ -353,10 +360,17 @@ text#stockchartdefault_ChartTitle {
353360

354361
.e-card .e-card-content {
355362
color: #333;
356-
padding: 0 16px 16px 16px;
357363
max-height: 60px;
358364
}
359365

366+
.row .e-card .e-card-header {
367+
border-bottom-color: rgba(0, 0, 0, 0.15);
368+
}
369+
370+
.row .e-card .e-card-actions {
371+
border-top-color: rgba(0, 0, 0, 0.15);
372+
}
373+
360374
.e-card .e-card-actions {
361375
padding: 8px 16px 16px;
362376
}
@@ -414,6 +428,7 @@ text#stockchartdefault_ChartTitle {
414428
justify-content: center;
415429
padding: 1rem;
416430
margin-top: 15px;
431+
gap: 20px;
417432
}
418433

419434
.kb-carousel .e-carousel-items .e-carousel-item .product-container .heading {
@@ -499,7 +514,7 @@ text#stockchartdefault_ChartTitle {
499514

500515
@media screen and (min-width: 900px) {
501516
.e-card-content {
502-
min-height: 110px;
517+
min-height: 130px;
503518
max-height: 120px;
504519
}
505520
}

0 commit comments

Comments
 (0)