Merge changes I763bc991,I579d6f5c * changes: Fix lit based diff to match legacy diff exactly (Step 2) Fix lit based diff to match legacy diff exactly (Step 1)
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts index 44c0e0c..329102a 100644 --- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts +++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts
@@ -1886,8 +1886,7 @@ /* If there is only 1 change then gerrit will automatically redirect to that change */ const topic = revertSubmistionInfo.revert_changes[0].topic; - const query = `topic:${topic}`; - if (topic) this.getNavigation().setUrl(createSearchUrl({query})); + this.getNavigation().setUrl(createSearchUrl({topic})); break; } default:
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts index 3ba04f7..1d10128 100644 --- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts +++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts
@@ -2494,7 +2494,7 @@ new Response() ); assert.isTrue(setUrlStub.called); - assert.equal(setUrlStub.lastCall.args[0], '/q/topic:T'); + assert.equal(setUrlStub.lastCall.args[0], '/q/topic:"T"'); }); }); @@ -2533,7 +2533,7 @@ ); assert.isFalse(showActionDialogStub.called); assert.isTrue(setUrlStub.called); - assert.equal(setUrlStub.lastCall.args[0], '/q/topic:T'); + assert.equal(setUrlStub.lastCall.args[0], '/q/topic:"T"'); }); });
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.ts b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.ts index 259154f..ffb180d 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.ts +++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.ts
@@ -16,6 +16,7 @@ RepoName, CommitId, ChangeInfoId, + TopicName, } from '../../../types/common'; import {customElement, property, query, state} from 'lit/decorators.js'; import { @@ -582,8 +583,9 @@ if (!failedOrPending) { // This needs some more work, as the new topic may not always be // created, instead we may end up creating a new patchset */ - const query = `topic: "${topic}"`; - this.getNavigation().setUrl(createSearchUrl({query})); + this.getNavigation().setUrl( + createSearchUrl({topic: topic as TopicName}) + ); } }); });