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

DEV-17995 design review tweaks #22171

Merged
merged 10 commits into from
May 6, 2024
29 changes: 17 additions & 12 deletions plugins/Marketplace/config/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,24 @@ function updatePluginUrlsForTests(&$plugin)
$plugin['shop']['reviews']['embedUrl'] = '';
}

// preg_replace patterns
$from = [
'@^https?://.*?/([^/]*?)/images/([^/]*?)/(.*?)$@',
'@^https?://.*?/img/categories/(.*?)$@i',
];
$to = [
'plugins/Marketplace/tests/resources/images/plugins/$1/images/$2/$3',
'plugins/Marketplace/tests/resources/images/categories/$1',
];

if (!empty($plugin['coverImage'])) {
$plugin['coverImage'] = preg_replace(
[
'@^https?://.*?/([^/]*?)/images/([^/]*?)/(.*?)$@',
'@^https?://.*?/img/categories/(.*?)$@i',
],
[
'plugins/Marketplace/tests/resources/images/plugins/$1/images/$2/$3',
'plugins/Marketplace/tests/resources/images/categories/$1',
],
$plugin['coverImage'],
1
);
$plugin['coverImage'] = preg_replace($from, $to, $plugin['coverImage'], 1);
}

if (!empty($plugin['screenshots']) && is_array($plugin['screenshots'])) {
foreach ($plugin['screenshots'] as $key => $screenshotUrl) {
$plugin['screenshots'][$key] = preg_replace($from, $to, $screenshotUrl, 1);
}
}
}

Expand Down
54 changes: 50 additions & 4 deletions plugins/Marketplace/stylesheets/plugin-details.less
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@
top: 5% !important; // required to override inline style set by the modal
}

@media (max-width: 480px) {
// full screen takeover
min-width: 100vw;
michalkleiner marked this conversation as resolved.
Show resolved Hide resolved
min-height: 100vh;
top: 0 !important; // required to override inline style set by the modal
}

.btn-close {
z-index: 100;
}
Expand All @@ -170,6 +177,30 @@
@media (max-width: 992px) {
max-height: 90vh;
}

@media (max-width: 480px) {
// full screen takeover
min-height: 100vh;
}

&--simple-header {
.modal-content__header {
height: 90px;
}

.modal-content__main {
max-height: calc(~"80vh - 180px");

@media (max-width: 992px) {
max-height: calc(~"90vh - 180px");
}

@media (max-width: 480px) {
// full screen takeover
min-height: calc(~"100vh - 180px");
}
}
}
}

.modal-content__header {
Expand Down Expand Up @@ -273,6 +304,10 @@
max-height: calc(~"90vh - 250px");
}

@media (max-width: 480px) {
max-height: calc(~"100vh - 250px");
}

h2, h3, h4, h5, h6 {
margin: 20px 0 10px 0;
color: #000000;
Expand Down Expand Up @@ -388,18 +423,21 @@

figure {
margin: 24px auto;
border: 1px solid #e0e0e0;
display: inline-block;;
background: #f7f7f7;
border: 24px solid #f7f7f7;
border-bottom-width: 16px;
}

img {
max-width: 100%;
margin: 0 auto;
}

figcaption {
padding: 8px;
background: #e0e0e0;
padding: 16px 0 0;
text-align: left;
line-height: 24px;
font-weight: 700;
}
}
}
Expand Down Expand Up @@ -434,10 +472,18 @@
@media (max-width: 600px) {
width: 70%;
}

@media (max-width: 480px) {
width: 100%;
}
}

.matomo-badge-modal {
position: initial;

@media (max-width: 480px) {
display: none;
}
}
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.