Skip to content

Commit 7839b40

Browse files
authored
UI tweaks (#1094)
* background, cards and widgets * left-menu tweaks * updating screenshots
1 parent 5113bbe commit 7839b40

224 files changed

Lines changed: 506 additions & 491 deletions

File tree

Some content is hidden

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

templates/tagmanager.twig

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -16,62 +16,64 @@
1616
{% block root %}
1717
{% include "@CoreHome/_topScreen.twig" %}
1818

19-
<div class="top_controls">
20-
<div vue-entry="CoreHome.QuickAccess" class="piwikTopControl borderedControl">
21-
</div>
22-
23-
{% block topcontrols %}
24-
25-
<div class="top_bar_sites_selector piwikTopControl">
26-
<div
27-
vue-entry="CoreHome.SiteSelector"
28-
show-selected-site="true"
29-
show-all-sites-item="false"
30-
class="sites_autocomplete"
31-
></div>
32-
</div>
33-
34-
<div class="piwikTopControl">
35-
<div
36-
vue-entry="TagManager.ContainerSelector"
37-
{% if container is defined and container is not empty %}container-name="{{ (container.name ~ ' (' ~ container.idcontainer ~ ')')|json_encode }}"{% endif %}
38-
></div>
39-
</div>
40-
{% endblock %}
41-
42-
<span class="icon icon-arrowup"></span>
43-
</div>
19+
{% set hasSidebar = showMenu is not defined or showMenu %}
20+
21+
<div class="layoutWithSidebar{% if hasSidebar %} layoutWithSidebar--hasSidebar{% endif %}">
22+
{% if hasSidebar %}
23+
{% import '@CoreHome/_menu.twig' as menu %}
24+
{{ menu.menu(tagManagerMenu, false, 'Menu--admin', currentModule, currentAction, null, null, true) }}
25+
{% endif %}
26+
27+
<div class="layoutWithSidebarContent">
28+
<div class="top_controls">
29+
{% block topcontrols %}
30+
31+
<div class="top_bar_sites_selector piwikTopControl">
32+
<div
33+
vue-entry="CoreHome.SiteSelector"
34+
show-selected-site="true"
35+
show-all-sites-item="false"
36+
class="sites_autocomplete"
37+
></div>
38+
</div>
39+
40+
<div class="piwikTopControl">
41+
<div
42+
vue-entry="TagManager.ContainerSelector"
43+
{% if container is defined and container is not empty %}container-name="{{ (container.name ~ ' (' ~ container.idcontainer ~ ')')|json_encode }}"{% endif %}
44+
></div>
45+
</div>
46+
{% endblock %}
47+
48+
<span class="icon icon-arrowup"></span>
49+
</div>
4450

45-
{% import 'ajaxMacros.twig' as ajax %}
46-
{{ ajax.requestErrorDiv(emailSuperUser|default(''), areAdsForProfessionalServicesEnabled, currentModule) }}
47-
{{ postEvent("Template.beforeContent", "admin", currentModule, currentAction) }}
51+
<div class="page">
52+
<div class="pageWrap">
53+
{% import 'ajaxMacros.twig' as ajax %}
54+
{{ ajax.requestErrorDiv(emailSuperUser|default(''), areAdsForProfessionalServicesEnabled, currentModule) }}
55+
{{ postEvent("Template.beforeContent", "admin", currentModule, currentAction) }}
4856

49-
<div class="page">
57+
<a name="main"></a>
58+
{% block notification %}
59+
{% include "@CoreHome/_notifications.twig" %}
60+
{% endblock %}
61+
{% include "@CoreHome/_warningInvalidHost.twig" %}
5062

51-
{% if showMenu is not defined or showMenu %}
52-
{% import '@CoreHome/_menu.twig' as menu %}
53-
{{ menu.menu(tagManagerMenu, false, 'Menu--admin', currentModule, currentAction) }}
54-
{% endif %}
63+
<div class="admin" id="content">
5564

56-
<div class="pageWrap">
57-
<a name="main"></a>
58-
{% block notification %}
59-
{% include "@CoreHome/_notifications.twig" %}
60-
{% endblock %}
61-
{% include "@CoreHome/_warningInvalidHost.twig" %}
65+
<div class="ui-confirm" id="alert">
66+
<h2></h2>
67+
<input role="no" type="button" value="{{ 'General_Ok'|translate }}"/>
68+
</div>
6269

63-
<div class="admin" id="content">
70+
{% block content %}
71+
{% endblock %}
6472

65-
<div class="ui-confirm" id="alert">
66-
<h2></h2>
67-
<input role="no" type="button" value="{{ 'General_Ok'|translate }}"/>
73+
</div>
74+
</div>
6875
</div>
69-
70-
{% block content %}
71-
{% endblock %}
72-
7376
</div>
7477
</div>
75-
</div>
7678

7779
{% endblock %}

tests/UI/ContainerTag_spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,10 @@ describe("ContainerTag", function () {
618618
});
619619
await page.evaluate(() => $('div.matomo-field-select div.select-wrapper input.dropdown-trigger')[0].click());
620620
await page.waitForTimeout(250);
621-
await capture.page(page, 'copy_tag_container_select');
621+
await capture.selector(
622+
page,
623+
'copy_tag_container_select',
624+
'.ui-dialog.mtmCopyTag, .ui-dialog.mtmCopyTag ul.dropdown-content'
625+
);
622626
});
623627
});

tests/UI/ContainerTrigger_spec.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ describe("ContainerTrigger", function () {
153153

154154
it('should be able to create a new trigger and show update afterwards', async function () {
155155
await createOrUpdateTrigger();
156-
await page.waitForTimeout(250);
156+
await page.waitForTimeout(250);
157157
await capture.page(page, 'create_new_shown_in_list');
158158
});
159159

@@ -253,6 +253,7 @@ describe("ContainerTrigger", function () {
253253
await setParameterValue('name', 'Test trigger with a really long name. Abcdefghijklmnopqrstuvwxyz1234567890Abcdefghijklmnopqrstuvwxyz1234567890Abcdefghijklmnopqrstuvwxyz1234567890Abcdefghijklmnopqrstuvwxyz1234567890Abcdefghijklmnopqrstuvwxyz1234567890Abcdefghijklmnopqrstuvwxyz1234567890A');
254254
await createOrUpdateTrigger();
255255
await page.waitForTimeout(250);
256+
await page.mouse.move(10, 10);
256257
await capture.page(page, 'create_new_long_name');
257258
});
258259

@@ -317,6 +318,10 @@ describe("ContainerTrigger", function () {
317318
});
318319
await page.evaluate(() => $('div.matomo-field-select div.select-wrapper input.dropdown-trigger')[0].click());
319320
await page.waitForTimeout(250);
320-
await capture.page(page, 'copy_trigger_container_select');
321+
await capture.selector(
322+
page,
323+
'copy_trigger_container_select',
324+
'.ui-dialog.mtmCopyTrigger, .ui-dialog.mtmCopyTrigger ul.dropdown-content'
325+
);
321326
});
322327
});

tests/UI/ContainerVariable_spec.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ describe("ContainerVariable", function () {
312312
await page.evaluate(() => $('div.matomo-field-select ul li:first').click());
313313
await page.waitForTimeout(250);
314314
pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyVariable');
315+
await page.waitForTimeout(250);
315316
expect(await pageWrap.screenshot()).to.matchImage('copy_variable_container_selected');
316317
});
317318

@@ -359,6 +360,10 @@ describe("ContainerVariable", function () {
359360
});
360361
await page.evaluate(() => $('div.matomo-field-select div.select-wrapper input.dropdown-trigger')[0].click());
361362
await page.waitForTimeout(250);
362-
await capture.page(page, 'copy_variable_container_select');
363+
await capture.selector(
364+
page,
365+
'copy_variable_container_select',
366+
'.ui-dialog.mtmCopyVariable, .ui-dialog.mtmCopyVariable ul.dropdown-content'
367+
);
363368
});
364369
});

tests/UI/TagManager_spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ describe("TagManager", function () {
178178
it('should show the manage website screen', async function () {
179179
const urlToTest = "?module=SitesManager&action=index&idSite=2&period=day&date=yesterday&showaddsite=false";
180180
await page.goto(urlToTest);
181-
const pageElement = await page.$('.page');
182-
expect(await pageElement.screenshot()).to.matchImage('manageWebsites');
181+
await capture.page(page, 'manageWebsites')
183182
});
184183

185184
it('should show the container detail when delete button is pressed', async function () {

tests/UI/capture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ exports.pageWithMenu = async function (page, screenshotName)
3434

3535
exports.page = async function (page, screenshotName)
3636
{
37-
await exports.selector(page, screenshotName, '.pageWrap,#notificationContainer,#secondNavBar');
37+
await exports.selector(page, screenshotName, '.pageWrap,#notificationContainer,.navbar');
3838
};
3939

4040
exports.notification = async function (page, screenshotName)
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)