Skip to content

Commit

Permalink
Moving the story desktop system layer buttons. (ampproject#20949)
Browse files Browse the repository at this point in the history
* Removing the desktop sharing pill and moving all the buttons to the top right corner.

* Removing the AMP_STORY_SYSTEM_LAYER_SHARE_WIDGET_LABEL localization ID.

* Removing the share pill code from the visual diff tests.

* Fixing unit tests since the share menu is now always pre-rendered.
  • Loading branch information
gmajoulet authored and Noran Azmy committed Mar 22, 2019
1 parent 7312a92 commit 7d989f0
Show file tree
Hide file tree
Showing 51 changed files with 15 additions and 558 deletions.
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/amp-story-bookend.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1.hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/amp-story-bookend.rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1.hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/amp-story-consent.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1#hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/amp-story-consent.rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1#hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/amp-story-cta-layer.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
left: 50%;
transform: translate(-50%, -50%);
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}
</style>
<script>
// TODO(#17108): Remove this when getMode().test is set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
amp-story-page {
background: yellow;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}
</style>
<script>
// TODO(#17108): Remove this when getMode().test is set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
background: white;
font-family: sans-serif;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}
</style>
<script>
// TODO(#17108): Remove this when getMode().test is set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
background: white;
font-family: sans-serif;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}
</style>
<script>
// TODO(#17108): Remove this when getMode().test is set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
background: white;
font-family: sans-serif;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}
</style>
<script>
// TODO(#17108): Remove this when getMode().test is set.
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/amp-story-page-attachment.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

amp-story-page-attachment {
color: rgba(0, 0, 0, 0.87);
font-size: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@
amp-story-page {
background-color: white;
}
/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}
</style>
<script type="application/ld+json">
{
Expand Down
9 changes: 0 additions & 9 deletions examples/visual-tests/amp-story/amp-story-sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@
/* Hide the spinner for loading pages, since this causes flakes */
display: none;
}
/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}
h1.hello-world {
color: white;
text-shadow: 3px 3px rgba(0, 0, 0, 0.5);
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/amp-story-tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1.hello-world {
color: white;
text-shadow: 3px 3px rgba(0, 0, 0, 0.5);
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1.hello-world {
color: white;
text-shadow: 3px 3px rgba(0, 0, 0, 0.5);
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/basic.rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1.hello-world {
color: white;
text-shadow: 3px 3px rgba(0, 0, 0, 0.5);
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/embed-mode-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1#hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/embed-mode-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1#hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/info-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1#hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/info-dialog.rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1#hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/share-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1#hello-world {
color: white;
text-align: center;
Expand Down
10 changes: 0 additions & 10 deletions examples/visual-tests/amp-story/share-menu.rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
display: none;
}

/*
* The share pill text does not show in the same place consistently, and
* as such causes the visual tests to be flaky. This hides the share pill
* with visibility: hidden, so as to keep other elements in the same place
* that they would otherwise be, while deflaking the tests. See #19890.
*/
.i-amphtml-story-share-pill {
visibility: hidden;
}

h1#hello-world {
color: white;
text-align: center;
Expand Down
3 changes: 0 additions & 3 deletions extensions/amp-story/1.0/_locales/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ export default /** @const {!LocalizedStringBundleDef} */ ({
[LocalizedStringId.AMP_STORY_SHARING_PROVIDER_NAME_WHATSAPP]: {
string: 'وات ساب',
},
[LocalizedStringId.AMP_STORY_SYSTEM_LAYER_SHARE_WIDGET_LABEL]: {
string: 'شارك',
},
[LocalizedStringId.AMP_STORY_WARNING_DESKTOP_SIZE_TEXT]: {
string: 'قم بتوسيع نافذتك لعرض هذه التجربة',
},
Expand Down
3 changes: 0 additions & 3 deletions extensions/amp-story/1.0/_locales/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ export default /** @const {!LocalizedStringBundleDef} */ ({
[LocalizedStringId.AMP_STORY_SHARING_PROVIDER_NAME_WHATSAPP]: {
string: 'WhatsApp',
},
[LocalizedStringId.AMP_STORY_SYSTEM_LAYER_SHARE_WIDGET_LABEL]: {
string: 'Teilen',
},
[LocalizedStringId.AMP_STORY_WARNING_DESKTOP_SIZE_TEXT]: {
string: ' Vergrößern Sie das Fenster um dieses Erlebnis zu sehen',
},
Expand Down
3 changes: 0 additions & 3 deletions extensions/amp-story/1.0/_locales/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ export default /** @const {!LocalizedStringBundleDef} */ ({
[LocalizedStringId.AMP_STORY_SHARING_CLIPBOARD_FAILURE_TEXT]: {
string: ':(',
},
[LocalizedStringId.AMP_STORY_SYSTEM_LAYER_SHARE_WIDGET_LABEL]: {
string: 'Share',
},
[LocalizedStringId.AMP_STORY_WARNING_DESKTOP_HEIGHT_SIZE_TEXT]: {
string: 'Expand the height of your window to view this experience',
},
Expand Down
3 changes: 0 additions & 3 deletions extensions/amp-story/1.0/_locales/en-GB.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ export default /** @const {!LocalizedStringBundleDef} */ ({
[LocalizedStringId.AMP_STORY_SHARING_PROVIDER_NAME_WHATSAPP]: {
string: 'WhatsApp',
},
[LocalizedStringId.AMP_STORY_SYSTEM_LAYER_SHARE_WIDGET_LABEL]: {
string: 'Share',
},
[LocalizedStringId.AMP_STORY_WARNING_DESKTOP_SIZE_TEXT]: {
string: 'Expand your window to view this experience',
},
Expand Down
Loading

0 comments on commit 7d989f0

Please sign in to comment.