Skip to content

Commit e92156c

Browse files
committed
Add a template/own-report chooser as the first report wizard step
1 parent 7aa95c2 commit e92156c

8 files changed

Lines changed: 345 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Open the layout chooser immediately after creating a new panorama
1414
- Enter panorama edit mode automatically after selecting the first layout on a newly created panorama
1515
- Enable/disable data aggregation in the column selection dialog
16+
- Add a template/own-report chooser as the first report wizard step
1617

1718
### Fixed
1819
- Prevent new panoramas from reusing page content/layout from previously edited panoramas

css/wizard.css

Lines changed: 150 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,142 @@
329329
opacity: .7;
330330
}
331331

332+
#analyticsWizard .wizardNewTemplateLayout {
333+
display: flex;
334+
gap: 20px;
335+
width: 100%;
336+
height: 340px;
337+
max-height: 340px;
338+
overflow: hidden;
339+
}
340+
341+
#analyticsWizard .wizardNewTemplateOwnColumn,
342+
#analyticsWizard .wizardNewTemplateListColumn {
343+
flex: 1;
344+
min-width: 0;
345+
min-height: 0;
346+
}
347+
348+
#analyticsWizard .wizardNewTemplateListColumn {
349+
display: flex;
350+
flex-direction: column;
351+
}
352+
353+
#analyticsWizard .wizardNewTemplateOwnCard {
354+
width: 100%;
355+
height: 100%;
356+
min-height: 0;
357+
display: flex;
358+
flex-direction: column;
359+
justify-content: center;
360+
align-items: center;
361+
gap: 12px;
362+
text-align: center;
363+
}
364+
365+
#analyticsWizard .wizardNewTemplateOwnIcon {
366+
width: 90px;
367+
height: 90px;
368+
background-size: 90px;
369+
background-repeat: no-repeat;
370+
background-position: center;
371+
display: block;
372+
}
373+
374+
#analyticsWizard .wizardNewTemplateOwnTitle {
375+
font-size: 20px;
376+
font-weight: 600;
377+
line-height: 1.2;
378+
}
379+
380+
#analyticsWizard .wizardNewTemplateOwnDescription {
381+
opacity: .8;
382+
max-width: 300px;
383+
}
384+
385+
#analyticsWizard .wizardNewTemplateListColumn h2 {
386+
margin-bottom: 10px;
387+
flex: 0 0 auto;
388+
}
389+
390+
#analyticsWizard .wizardNewTemplateList {
391+
flex: 1 1 auto;
392+
min-height: 0;
393+
border: 1px solid var(--color-border);
394+
border-radius: var(--border-radius);
395+
overflow-y: auto;
396+
padding: 8px 10px;
397+
}
398+
399+
#analyticsWizard .wizardNewTemplateListGroup {
400+
margin-bottom: 12px;
401+
}
402+
403+
#analyticsWizard .wizardNewTemplateListGroup:last-child {
404+
margin-bottom: 0;
405+
}
406+
407+
#analyticsWizard .wizardNewTemplateListGroupHeader {
408+
font-size: 13px;
409+
opacity: .7;
410+
margin: 0 0 4px 0;
411+
padding-left: 0;
412+
line-height: 1.2;
413+
}
414+
415+
#analyticsWizard .wizardNewTemplateItems {
416+
display: flex;
417+
flex-direction: column;
418+
gap: 4px;
419+
}
420+
421+
#analyticsWizard .wizardNewTemplateItem {
422+
display: flex;
423+
align-items: center;
424+
gap: 8px;
425+
width: 100%;
426+
border: 1px solid transparent;
427+
border-radius: var(--border-radius-small);
428+
background: transparent;
429+
text-align: left;
430+
padding: 8px 10px;
431+
}
432+
433+
#analyticsWizard .wizardNewTemplateItem:hover,
434+
#analyticsWizard .wizardNewTemplateItem:focus {
435+
border-color: var(--color-border);
436+
background: var(--color-background-hover);
437+
}
438+
439+
#analyticsWizard .wizardNewTemplateItemSelected {
440+
border-color: var(--color-primary-element);
441+
background: var(--color-primary-element-light);
442+
}
443+
444+
#analyticsWizard .wizardNewTemplateItemIcon {
445+
width: 20px;
446+
height: 20px;
447+
background-size: 20px;
448+
background-repeat: no-repeat;
449+
background-position: center;
450+
display: inline-block;
451+
flex-shrink: 0;
452+
}
453+
454+
#analyticsWizard .wizardNewTemplateItemLabel {
455+
overflow: hidden;
456+
text-overflow: ellipsis;
457+
}
458+
459+
#analyticsWizard .wizardNewTemplateListEmpty {
460+
opacity: .7;
461+
padding: 8px;
462+
}
463+
464+
#analyticsWizard .wizardNewTemplateHiddenSelect {
465+
display: none !important;
466+
}
467+
332468
@media only screen and (max-width: 680px) {
333469
#firstrunwizard .firstrunwizard-header div.logo {
334470
background-size: 120px;
@@ -360,6 +496,19 @@
360496
flex-grow: 1;
361497
}
362498

499+
#analyticsWizard .wizardNewTemplateLayout {
500+
flex-direction: column;
501+
height: auto;
502+
max-height: none;
503+
overflow: visible;
504+
}
505+
506+
#analyticsWizard .wizardNewTemplateOwnCard,
507+
#analyticsWizard .wizardNewTemplateList {
508+
min-height: auto;
509+
max-height: 220px;
510+
}
511+
363512
}
364513

365514
#analyticsWizard .modal-default-button {
@@ -431,4 +580,4 @@
431580
.icon-analytics {
432581
background-image: url(../img/app-dark.svg);
433582
filter: var(--background-invert-if-dark);
434-
}
583+
}

js/report.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ Object.assign(OCA.Analytics.Report, {
5050
OCA.Analytics.Sidebar.close();
5151
OCA.Analytics.Wizard.sildeArray = [
5252
['', ''],
53-
['wizardNewGeneral', OCA.Analytics.Sidebar.Report.wizard],
53+
['wizardNewTemplate', OCA.Analytics.Sidebar.Report.wizard],
54+
['wizardNewGeneral', ''],
5455
['wizardNewType', ''],
5556
['wizardNewVisual', '']
5657
];

0 commit comments

Comments
 (0)