← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ines-almeida/launchpad:fix-social-accounts-class-to-not-trigger-adblocker into launchpad:master

 

Ines Almeida has proposed merging ~ines-almeida/launchpad:fix-social-accounts-class-to-not-trigger-adblocker into launchpad:master with ~lgp171188/launchpad:fix-social-accounts-class-to-not-trigger-adblocker as a prerequisite.

Commit message:
ui: update social accounts class names to use hyphens instead of underscores

This is more consistent with the rest of Launchpad's class names

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/459260
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:fix-social-accounts-class-to-not-trigger-adblocker into launchpad:master.
diff --git a/lib/canonical/launchpad/icing/css/components/social_accounts.scss b/lib/canonical/launchpad/icing/css/components/social_accounts.scss
index 1524995..ea77c4c 100644
--- a/lib/canonical/launchpad/icing/css/components/social_accounts.scss
+++ b/lib/canonical/launchpad/icing/css/components/social_accounts.scss
@@ -1,5 +1,5 @@
-.user_social_accounts {
-    &__icon {
+.user-social-accounts {
+    &--icon {
         margin-right: 0.5em;
         height: 1.4em;
         width: 1.4em;
diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
index e2cf36c..5a1786e 100644
--- a/lib/lp/app/browser/tales.py
+++ b/lib/lp/app/browser/tales.py
@@ -3065,7 +3065,7 @@ class SocialAccountFormatterAPI(ObjectFormatterAPI):
 
     def icon(self, platform):
         return (
-            f'<img class="user_social_accounts__icon" alt="{platform.title}" '
+            f'<img class="user-social-accounts--icon" alt="{platform.title}" '
             f'title="{platform.title}" src="/@@/{platform.icon}" />'
         )
 
diff --git a/lib/lp/app/tests/test_tales.py b/lib/lp/app/tests/test_tales.py
index 1376d95..ca2819a 100644
--- a/lib/lp/app/tests/test_tales.py
+++ b/lib/lp/app/tests/test_tales.py
@@ -406,7 +406,7 @@ class TestSocialAccountFormatterAPI(TestCaseWithFactory):
             person, SocialPlatformType.MATRIX, identity
         )
         expected_html = (
-            '<img class="user_social_accounts__icon" alt="Matrix" '
+            '<img class="user-social-accounts--icon" alt="Matrix" '
             'title="Matrix" src="/@@/social-matrix" /> '
             "<a href=https://matrix.to//#/@fred:ubuntu.com "
             'target="_blank"><strong>@fred:ubuntu.com</strong></a>'
diff --git a/lib/lp/registry/templates/person-portlet-contact-details.pt b/lib/lp/registry/templates/person-portlet-contact-details.pt
index 0354913..062b6be 100644
--- a/lib/lp/registry/templates/person-portlet-contact-details.pt
+++ b/lib/lp/registry/templates/person-portlet-contact-details.pt
@@ -172,46 +172,46 @@
     </dl>
 </div>
 
-    <div class="yui-u user_social_accounts" tal:condition="view/should_show_socialaccounts_section">
+    <div class="yui-u user-social-accounts" tal:condition="view/should_show_socialaccounts_section">
       <dl id="social-accounts">
         <dt>Social accounts:</dt>
 
-        <dd class="user_social_accounts__item irc_account" tal:repeat="ircnick context/ircnicknames">
-          <img class="user_social_accounts__icon" alt="IRC" title="IRC" src="/@@/social-irc"/>
+        <dd class="user-social-accounts--item irc_account" tal:repeat="ircnick context/ircnicknames">
+          <img class="user-social-accounts--icon" alt="IRC" title="IRC" src="/@@/social-irc"/>
           <span><span tal:replace="structure ircnick/fmt:formatted_displayname" /></span>
           <a tal:replace="structure overview_menu/editircnicknames/fmt:icon"/>
         </dd>
 
-        <dd class="user_social_accounts__item jabber_account" tal:repeat="jabberid context/jabberids">
-          <img class="user_social_accounts__icon" alt="Jabber" title="Jabber" src="/@@/social-jabber" />
+        <dd class="user-social-accounts--item jabber_account" tal:repeat="jabberid context/jabberids">
+          <img class="user-social-accounts--icon" alt="Jabber" title="Jabber" src="/@@/social-jabber" />
           <span><span tal:replace="jabberid/jabberid/fmt:obfuscate-email" /></span>
           <a tal:replace="structure overview_menu/editjabberids/fmt:icon"/>
         </dd>
 
-        <dd class="user_social_accounts__item matrix_account" tal:repeat="social_account view/matrix_accounts">
+        <dd class="user-social-accounts--item matrix_account" tal:repeat="social_account view/matrix_accounts">
           <span><span tal:replace="structure social_account/fmt:formatted_display" /></span>
           <a tal:replace="structure overview_menu/editmatrixaccounts/fmt:icon" />
         </dd>
 
         <tal:irc condition="view/should_show_ircnicknames_section">
-          <dd class="user_social_accounts__item" tal:condition="not: context/ircnicknames" id="empty-irc">
-            <img class="user_social_accounts__icon" alt="IRC" title="IRC" src="/@@/social-irc"/>
+          <dd class="user-social-accounts--item" tal:condition="not: context/ircnicknames" id="empty-irc">
+            <img class="user-social-accounts--icon" alt="IRC" title="IRC" src="/@@/social-irc"/>
             <span>No IRC nicknames registered.</span>
             <a tal:replace="structure overview_menu/editircnicknames/fmt:icon"/>
           </dd>
         </tal:irc>
 
         <tal:jabber condition="view/should_show_jabberids_section">
-          <dd class="user_social_accounts__item" tal:condition="context/jabberids/is_empty"  id="empty-jabber">
-            <img class="user_social_accounts__icon" alt="Jabber" title="Jabber" src="/@@/social-jabber" />
+          <dd class="user-social-accounts--item" tal:condition="context/jabberids/is_empty"  id="empty-jabber">
+            <img class="user-social-accounts--icon" alt="Jabber" title="Jabber" src="/@@/social-jabber" />
             <span>No Jabber IDs registered.</span>
             <a tal:replace="structure overview_menu/editjabberids/fmt:icon" />
           </dd>
         </tal:jabber>
 
         <tal:matrix condition="view/should_show_matrix_accounts_section">
-          <dd class="user_social_accounts__item" tal:condition="not: view/matrix_accounts"  id="empty-matrix">
-            <img class="user_social_accounts__icon" alt="Matrix" title="Matrix" src="/@@/social-matrix" />
+          <dd class="user-social-accounts--item" tal:condition="not: view/matrix_accounts"  id="empty-matrix">
+            <img class="user-social-accounts--icon" alt="Matrix" title="Matrix" src="/@@/social-matrix" />
             <span>No matrix accounts registered.</span>
             <a tal:replace="structure overview_menu/editmatrixaccounts/fmt:icon" />
           </dd>