From a2ea6347743ab1e0219a9e222c7eee0ef8824344 Mon Sep 17 00:00:00 2001 From: Becky Siegel Date: Thu, 15 Dec 2016 16:14:19 -0800 Subject: [PATCH] Changes to diff view for mobile - Hide download link and file web links from patchsets. - Add a full file path. - Change next/prev buttons to be arrows on either side of full path - Change subheader to flex/wrap so that the display mode wraps to the next line instead of the second patch set item. Bug: Issue 5114 Change-Id: Iefb8afe9d7e2417f8aa2070e52073708c052fa4f --- .../diff/gr-diff-view/gr-diff-view.html | 80 ++++++++++++++----- .../gr-patch-range-select.html | 14 +++- polygerrit-ui/app/styles/app-theme.html | 5 ++ 3 files changed, 76 insertions(+), 23 deletions(-) diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.html b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.html index 52ac524979..e57940aa13 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.html +++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.html @@ -59,7 +59,7 @@ limitations under the License. .jumpToFileContainer { display: inline-block; } - .mobileJumpToFileContainer { + .mobile { display: none; } .downArrow { @@ -113,27 +113,46 @@ limitations under the License. color: #666; } .subHeader { + flex-wrap: wrap; margin: 0 var(--default-horizontal-margin) .75em; } + .subHeader > div { + margin-top: .25em; + } .prefsButton { text-align: right; } - #modeSelect { - margin-left: .5em; - } .separator { margin: 0 .25em; } @media screen and (max-width: 50em) { + header { + padding: .5em var(--default-horizontal-margin); + } .dash { display: none; } + .desktop { + display: none; + } + .fileNav { + align-items: flex-start; + display: flex; + margin: 0 .25em; + } + .fullFileName { + display: block; + font-size: .9em; + font-style: italic; + min-width: 50%; + padding: 0 .1em; + text-align: center; + width: 100%; + word-wrap: break-word; + } .reviewed { vertical-align: -.1em; } - .jumpToFileContainer { - display: none; - } .mobileJumpToFileContainer { display: block; width: 100%; @@ -141,6 +160,15 @@ limitations under the License. .mobileJumpToFileContainer select { width: 100%; } + .mobileNavLink { + color: #000; + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + } + .mobileNavLink:not([href]) { + color: #bbb; + } }
@@ -154,7 +182,7 @@ limitations under the License. type="checkbox" on-change="_handleReviewedChange" hidden$="[[!_loggedIn]]" hidden> -
+
[[_computeFileDisplayName(_path)]] @@ -177,7 +205,7 @@ limitations under the License.
-
+
- + - +