Merge changes I07519d1a,I451244bf,I59eec44f,Ib9f25f77 * changes: UI: Replace paper-card with md-filled-card UI: Replace paper-dropdown-menu with md-filled-select UI: Replace paper-icon-button with md-icon-button UI: Replace paper-fab with md-fab
diff --git a/java/com/google/gerrit/server/git/receive/ReplaceOp.java b/java/com/google/gerrit/server/git/receive/ReplaceOp.java index 31664fa..966904c 100644 --- a/java/com/google/gerrit/server/git/receive/ReplaceOp.java +++ b/java/com/google/gerrit/server/git/receive/ReplaceOp.java
@@ -91,6 +91,7 @@ import com.google.inject.util.Providers; import java.io.IOException; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Optional; @@ -322,7 +323,7 @@ reviewMessage = magicBranch.message; psDescription = magicBranch.message; approvals.putAll(magicBranch.labels); - Set<String> hashtags = magicBranch.hashtags; + Set<String> hashtags = new HashSet<>(magicBranch.hashtags); if (hashtags != null && !hashtags.isEmpty()) { hashtags.addAll(notes.getHashtags()); update.setHashtags(hashtags);
diff --git a/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java b/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java index b3ac15e..ccce2f5 100644 --- a/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java +++ b/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java
@@ -1651,6 +1651,23 @@ } @Test + public void pushNewChangeWithHashtagsWhileUpdatingExisting() throws Exception { + String hashtag1 = "tag1"; + String hashtag2 = "tag2"; + + @SuppressWarnings("unused") + PushOneCommit.Result r1 = pushTo("refs/for/master%hashtag=" + hashtag1); + testRepo + .amendRef("HEAD") + .add(PushOneCommit.FILE_NAME, PushOneCommit.FILE_CONTENT + "2") + .create(); + PushOneCommit.Result r2 = pushTo("refs/for/master%hashtag=" + hashtag2); + ImmutableSet<String> expected = ImmutableSet.of(hashtag2); + Set<String> hashtags = gApi.changes().id(r2.getChangeId()).getHashtags(); + assertThat(hashtags).containsExactlyElementsIn(expected); + } + + @Test public void pushCommitUsingSignedOffBy() throws Exception { PushOneCommit push = pushFactory.create(
diff --git a/polygerrit-ui/app/elements/shared/gr-button/gr-button.ts b/polygerrit-ui/app/elements/shared/gr-button/gr-button.ts index e01fdf4..febce7e 100644 --- a/polygerrit-ui/app/elements/shared/gr-button/gr-button.ts +++ b/polygerrit-ui/app/elements/shared/gr-button/gr-button.ts
@@ -91,7 +91,6 @@ /* This is also set in the button-label-(font|weight) css vars above. We keep this incase it is also needed. */ font-weight: var(--font-weight-medium); font-family: var(--header-font-family); - font: inherit; color: var(--text-color); --md-text-button-container-color: var(--text-color); } @@ -128,6 +127,8 @@ align-items: center; background-color: var(--background-color); color: var(--text-color); + /* paper-button set this but md-(elevated|text)-button does not. So we set it. */ + font: inherit; /* This is also set in the button-label-(font|weight) css vars above. We keep this incase it is also needed. */ font-family: var(--font-family, inherit); font-weight: var(--font-weight-normal, inherit); @@ -137,8 +138,8 @@ min-width: var(--border, 0); padding: var(--gr-button-padding, var(--spacing-s) var(--spacing-m)); /* Needed to resize properly */ - min-height: auto; - height: auto; + --md-elevated-button-container-height: none; + --md-text-button-container-height: none; cursor: pointer; } :host md-text-button:hover, @@ -208,6 +209,7 @@ class=${buttonClass} ?disabled=${this.disabled || this.loading} part="md-elevated-button" + touch-target="none" role="button" tabindex="-1" > @@ -223,6 +225,7 @@ class=${buttonClass} ?disabled=${this.disabled || this.loading} part="md-text-button" + touch-target="none" role="button" tabindex="-1" >
diff --git a/polygerrit-ui/app/elements/shared/gr-button/gr-button_test.ts b/polygerrit-ui/app/elements/shared/gr-button/gr-button_test.ts index 491fd3a..a80d8d5 100644 --- a/polygerrit-ui/app/elements/shared/gr-button/gr-button_test.ts +++ b/polygerrit-ui/app/elements/shared/gr-button/gr-button_test.ts
@@ -39,6 +39,7 @@ data-role="button" part="md-elevated-button" tabindex="-1" + touch-target="none" value="" ><slot></slot> </md-elevated-button>