Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new layout for no data screen #21247

Merged
merged 41 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
09b9646
Allow custom loading message for widget loader
sgiehl Sep 11, 2023
1769a5d
apply new layout to header and footer of no data page
sgiehl Sep 11, 2023
455c667
implement layout of tracking method view
sgiehl Sep 11, 2023
372afe1
layout improvements
sgiehl Sep 12, 2023
bf5d83f
implement recommended method
sgiehl Sep 12, 2023
b895382
add hidden share button for later
sgiehl Sep 12, 2023
d56f2d7
Refactor rendering into vue component
sgiehl Sep 13, 2023
e4c6acc
implement details view for tracking methods
sgiehl Sep 13, 2023
cd66ef7
implement url handling for tab selection
sgiehl Sep 13, 2023
6ec681c
show notifications in details only if it was detectd
sgiehl Sep 13, 2023
547d7a9
improve events and move some stuff to tagmanager
sgiehl Sep 13, 2023
22d3588
some layout tweaks
sgiehl Sep 13, 2023
99d3382
Consolidate EmptySite UI test suites into one
sgiehl Sep 14, 2023
3738f85
move test to tag manager
sgiehl Sep 14, 2023
d2438df
code cleanup
sgiehl Sep 14, 2023
c8b4434
removes some unused translations
sgiehl Sep 14, 2023
639f5e8
further adjustments to various method details
sgiehl Sep 15, 2023
7de4718
implement method to allow recommendation overwrite
sgiehl Sep 17, 2023
ed45caf
allow selecting specific details view in css
sgiehl Sep 17, 2023
ce80bd0
implement global list styling
sgiehl Sep 18, 2023
f09e182
move tagmanager specific styling to plugin
sgiehl Sep 18, 2023
2eb40b5
remove GA3 and GA4 notifications from tracking code screen
sgiehl Sep 18, 2023
e695c45
remove no longer needed tests and fixtures
sgiehl Sep 18, 2023
a052378
ensure url parameter uses same case as before
sgiehl Sep 19, 2023
e2f0e0c
layout and code fixes
sgiehl Sep 19, 2023
d6ac4cf
improve global list style
sgiehl Sep 19, 2023
3f5c1a3
fix sorting
sgiehl Sep 19, 2023
1c8c5fd
updates expected UI test files
sgiehl Sep 18, 2023
9c2b5de
submodule update
sgiehl Sep 15, 2023
111f9a1
update outdated css selectors
sgiehl Sep 19, 2023
f57f09b
avoid unnecessary screenshots in updater tests
sgiehl Sep 19, 2023
0de23b5
fix parameter type hint
sgiehl Sep 20, 2023
ee5faee
Move check for tracked data to vue component
sgiehl Sep 20, 2023
ef3a02d
don't show GA Import on others screen when plugin is available
sgiehl Sep 20, 2023
6cf746a
improve layout so it works with two line names
sgiehl Sep 22, 2023
3ee5738
use flex layout to be able shorten text to two lines (#21304)
sgiehl Sep 27, 2023
f74d58e
remove indention of test feature result
sgiehl Sep 27, 2023
e14a593
fix sizing of code block elements in numbered lists
sgiehl Sep 27, 2023
615448d
Improve handling of CTA buttons
sgiehl Sep 27, 2023
4f1011c
adjust css
sgiehl Sep 28, 2023
89e7b8e
submodule update
sgiehl Sep 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions config/environment/ui-test.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?php

use Piwik\Container\Container;
use Piwik\Container\StaticContainer;
use Piwik\Plugins\Diagnostics\Diagnostic\FileIntegrityCheck;
use Piwik\Plugins\Diagnostics\Diagnostic\PhpVersionCheck;
use Piwik\Plugins\Diagnostics\Diagnostic\RequiredPrivateDirectories;
use Piwik\SiteContentDetector;
use Piwik\Tests\Framework\Mock\FakeSiteContentDetector;

return [

Expand Down Expand Up @@ -46,6 +49,14 @@ public function write(string $key, string $content): void
return $config;
}),

// avoid any site content detection checks
SiteContentDetector::class => \Piwik\DI::decorate(function ($previous, Container $c) {
$detectedContentDetections = $c->get('test.vars.detectedContentDetections') ?: [];
$connectedConsentManagers = $c->get('test.vars.connectedConsentManagers') ?: [];

return new FakeSiteContentDetector($detectedContentDetections, $connectedConsentManagers);
}),

'observers.global' => \Piwik\DI::add([

// removes port from all URLs to the test Piwik server so UI tests will pass no matter
Expand Down
4 changes: 2 additions & 2 deletions core/SiteContentDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ public function wasDetected(string $detectionClassId): bool
/**
* Returns an array containing ids of all detected detections of the given type
*
* @param string $type One of the SiteContentDetectionAbstract::TYPE_* constants
* @param int $type One of the SiteContentDetectionAbstract::TYPE_* constants
* @return array
*/
public function getDetectsByType(string $type): array
public function getDetectsByType(int $type): array
{
$detected = [];

Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@
"SelectYesIfYouWantToSendEmailsViaServer": "Select \"Yes\" if you want or have to send e-mail via a named server instead of the local mail function",
"Settings": "Settings",
"Shipping": "Shipping",
"Share": "Share",
"Show": "show",
"SingleWebsitesDashboard": "Single Website dashboard",
"SmallTrafficYouCanLeaveDefault": "For small traffic websites, you can leave the default %s seconds, and access all reports in real time.",
Expand Down
1 change: 1 addition & 0 deletions plugins/CoreAdminHome/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"SystemPluginSettings": "System Plugin Settings",
"TrackAGoal": "Track a goal",
"TrackingCode": "Tracking Code",
"JavaScriptCode": "JavaScript Code",
"TrackingCodeIntro": "Matomo offers you various ways to embed the tracking code for your website, mobile app, and even for any device or application.",
"TrackingFailureAuthenticationProblem": "Request was not authenticated but authentication was required.",
"TrackingFailureAuthenticationSolution": "Set or correct a \"token_auth\" in your tracking request.",
Expand Down
9 changes: 4 additions & 5 deletions plugins/CoreAdminHome/stylesheets/trackingCodeGenerator.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
margin-top: 2rem;
margin-bottom: 1.5rem;

#start-tracking-details[data-method="Matomo"] & {
margin-top: 1rem;
}

a {
text-decoration: none !important;
color: @color-green-matomo;
Expand All @@ -17,8 +21,3 @@
}
}
}

.site-without-data #matomo li .trackingCodeAdvancedOptions .advance-option {
margin-top: 1rem;
margin-left: 1.25rem
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 20 additions & 15 deletions plugins/CoreHome/vue/dist/CoreHome.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/CoreHome/vue/dist/CoreHome.umd.min.js

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<template>
<div class="widgetLoader">
<ActivityIndicator
:loading-message="loadingMessage"
:loading-message="finalLoadingMessage"
:loading="loading"
/>
<div v-show="loadingFailed">
Expand Down Expand Up @@ -65,6 +65,7 @@ export default defineComponent({
props: {
widgetParams: Object,
widgetName: String,
loadingMessage: String,
},
components: {
ActivityIndicator,
Expand All @@ -86,7 +87,11 @@ export default defineComponent({
},
},
computed: {
loadingMessage() {
finalLoadingMessage() {
if (this.loadingMessage) {
return this.loadingMessage;
}

if (!this.widgetName) {
return translate('General_LoadingData');
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/Installation/tests/UI/Installation_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var fs = require('fs'),
describe("Installation", function () {
this.timeout(0);

this.fixture = "Piwik\\Tests\\Fixtures\\DisableSiteContentDetection";
this.fixture = "Piwik\\Tests\\Fixtures\\EmptySite";

before(function () {
testEnvironment.testUseMockAuth = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ div.jsTrackerInstallCheck {
}

.test-error,.success-message,.loadingPiwik,.testInstallFields {
margin-left: 1.5rem;
margin-bottom: 0;
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/Login/tests/UI/Invite_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('Invite', function () {
$('#login_form_submit').click();
});
// should show site without data page
await page.waitForNetworkIdle();
await page.waitForSelector('.site-without-data');
await page.waitForSelector('#site-without-data', {visible: true});
await page.evaluate(() => window.stop()); // stop ongoing requests
});
});
20 changes: 20 additions & 0 deletions plugins/Morpheus/stylesheets/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,26 @@ p {
}
}

.list-style-decimal {
list-style: none;
counter-reset: steplist;
display: table;
width: 100%;

> li {
counter-increment: steplist;
display: table-row;
}

> li::before {
content: counter(steplist) ".";
display: table-cell;
text-align: left;
padding-right: 5px;
width: 0;
}
}

#content .card-content {
p {
color: @theme-color-text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@
describe("PrivacyManager_ConsentManager", function () {
this.timeout(0);

this.fixture = "Piwik\\Tests\\Fixtures\\EmptySiteWithSiteContentDetection";
this.fixture = "Piwik\\Tests\\Fixtures\\EmptySite";

var generalParams = 'idSite=1&period=day&date=2017-01-02',
urlBase = '?module=PrivacyManager&' + generalParams + '&action=';

before(function () {
testEnvironment.pluginsToLoad = ['PrivacyManager'];
testEnvironment.detectedContentDetections = ['Osano'];
testEnvironment.connectedConsentManagers = ['Osano'];
testEnvironment.save();
});

after(function () {
testEnvironment.detectedContentDetections = [];
testEnvironment.connectedConsentManagers = [];
testEnvironment.save();
});

Expand Down
Loading