Skip to content

Commit

Permalink
[UI] Update placeholders and plugins logos (#13628)
Browse files Browse the repository at this point in the history
* changed code

* replace test path

* replace png to svg

* social logos

* other plugins

* fix gravatar faill

* fix for avatar width

* john's idea

* width fix

---------

Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
  • Loading branch information
andersonjeccel and RCheesley committed May 10, 2024
1 parent e88cf96 commit a98a30f
Show file tree
Hide file tree
Showing 22 changed files with 20 additions and 7 deletions.
Binary file removed app/assets/images/avatar.png
Binary file not shown.
4 changes: 4 additions & 0 deletions app/assets/images/avatar.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion app/bundles/CoreBundle/Assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3382,6 +3382,9 @@ ul.line-legend li {
.img-rounded {
border-radius: 3px;
}
.contact-avatar {
width: 100%;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
Expand Down Expand Up @@ -5487,7 +5490,8 @@ a.inline-token .text-muted {
padding-right: 0;
margin-right: 10px;
}
form[name="lead"] .media-body {
form[name="lead"] .media-body,
form[name="lead"] .contact-avatar {
width: 100%;
}
.bg-auto .tabs-left > li.active > a,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@
// ------------------------
.img-rounded {
border-radius: @border-radius-base;
}

// Contact avatar
.contact-avatar {
width: 100%;
}
2 changes: 1 addition & 1 deletion app/bundles/CoreBundle/Assets/css/app/less/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// Contact image
form[name="lead"] {
.media-body {
.media-body, .contact-avatar {
width: 100%;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/EmailBundle/Tests/Helper/MailHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ public function testThatHtmlIsCorrectlyProcessedWhenTheAreEmbeddedImages(): void
$email = new Email();

// We should use a local image to avoid network requests.
$sampleImagePath = __DIR__.'/../../../../assets/images/avatar.png';
$sampleImagePath = __DIR__.'/../../../../assets/images/avatar.svg';

$mailer->setIdHash('IDHASH');
$email->setSubject('Test');
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/LeadBundle/Resources/views/Lead/form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="pr-lg pl-lg pt-md pb-md">
<div class="media">
<div class="media-body">
<img class="img-rounded img-bordered img-responsive media-object" src="{{ img }}" alt="">
<img class="img-rounded img-bordered img-responsive media-object contact-avatar" src="{{ img }}" alt="">
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/bundles/LeadBundle/Tests/Helper/AvatarHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function testGetAvatarWhenGravatar(): void
$this->leadMock->method('getEmail')
->willReturn('mautic@acquia.com');
$avatar = $this->avatarHelper->getAvatar($this->leadMock);
$this->assertSame('https://www.gravatar.com/avatar/96f1b78c73c1ee806cf6a4168fe9bf77?s=250&d=http%3A%2F%2Flocalhost%2Fimages%2Favatar.png', $avatar, 'Gravatar image should be returned');
$this->assertSame('https://www.gravatar.com/avatar/96f1b78c73c1ee806cf6a4168fe9bf77?s=250&d=http%3A%2F%2Flocalhost%2Fimages%2Favatar.svg', $avatar, 'Gravatar image should be returned');

$_SERVER['SERVER_PROTOCOL'] = null;
$_SERVER['SERVER_PORT'] = null;
Expand All @@ -99,6 +99,6 @@ public function testGetAvatarWhenDefault(): void
->willReturn('');
$avatar = $this->avatarHelper->getAvatar($this->leadMock);

$this->assertSame('http://localhost/images/avatar.png', $avatar, 'Default image image should be returned');
$this->assertSame('http://localhost/images/avatar.svg', $avatar, 'Default image image should be returned');
}
}
2 changes: 1 addition & 1 deletion app/bundles/LeadBundle/Twig/Helper/DefaultAvatarHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public function __construct(

public function getDefaultAvatar(bool $absolute = false): string
{
return $this->assetsHelper->getOverridableUrl('images/avatar.png', $absolute);
return $this->assetsHelper->getOverridableUrl('images/avatar.svg', $absolute);
}
}
Binary file modified plugins/MauticCrmBundle/Assets/img/hubspot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticCrmBundle/Assets/img/salesforce.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticCrmBundle/Assets/img/sugarcrm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticCrmBundle/Assets/img/zoho.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticEmailMarketingBundle/Assets/img/mailchimp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticGmailBundle/Assets/img/gmail.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticOutlookBundle/Assets/img/outlook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticSocialBundle/Assets/img/foursquare.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed plugins/MauticSocialBundle/Assets/img/googleplus.png
Binary file not shown.
Binary file modified plugins/MauticSocialBundle/Assets/img/instagram.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticSocialBundle/Assets/img/twitter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticTagManagerBundle/Assets/img/tagmanager.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/MauticZapierBundle/Assets/img/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a98a30f

Please sign in to comment.