From 265559f5ad83a24379193d2bd5ce05d32ab6bc3c Mon Sep 17 00:00:00 2001 From: Thomas Draebing Date: Mon, 3 Feb 2020 15:29:06 +0100 Subject: [PATCH] Revert "Add UI element to display messages of the day" This reverts commit 1fbf53df6049cdadc8b2b2dd5bb61a19eefd90d4. The message of the day functionality is still heavily depended on components of Gerrit core. It is planned to move this functionality completely to the plugin. Since it was not usable with the new UI for a long while, the functionality will be removed completely until then. Change-Id: I7a1a0470932a0ba6275a54a4bc52b34237a219eb --- .../gr-message-header/gr-message-header.html | 41 ------------- .../gr-message-header/gr-message-header.js | 52 ---------------- .../gr-message-header_test.html | 60 ------------------- polygerrit-ui/app/elements/gr-app.html | 7 --- polygerrit-ui/app/elements/gr-app.js | 4 -- 5 files changed, 164 deletions(-) delete mode 100644 polygerrit-ui/app/elements/core/gr-message-header/gr-message-header.html delete mode 100644 polygerrit-ui/app/elements/core/gr-message-header/gr-message-header.js delete mode 100644 polygerrit-ui/app/elements/core/gr-message-header/gr-message-header_test.html diff --git a/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header.html b/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header.html deleted file mode 100644 index b2b382ca50..0000000000 --- a/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - diff --git a/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header.js b/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header.js deleted file mode 100644 index fac4a6a399..0000000000 --- a/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @license - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -(function() { - 'use strict'; - - Polymer({ - is: 'gr-message-header', - - properties: { - message: { - type: Object, - reflectToAttribute: true, - }, - _hidden: { - type: Boolean, - value: true, - }, - }, - - attached() { - if (!this.message || !this.message.html) { - return; - } - this._isHidden(); - this.$.message.innerHTML = this.message.html; - }, - - _handleDismissMessage() { - document.cookie = - `msg-${this.message.id}=1; expires=${this.message.redisplay}`; - this._hidden = true; - }, - - _isHidden() { - this._hidden = window.util.getCookie(`msg-${this.message.id}`) === '1'; - }, - }); -})(); diff --git a/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header_test.html b/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header_test.html deleted file mode 100644 index c275e55345..0000000000 --- a/polygerrit-ui/app/elements/core/gr-message-header/gr-message-header_test.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - -gr-message-header - - - - - - - - - - - - - diff --git a/polygerrit-ui/app/elements/gr-app.html b/polygerrit-ui/app/elements/gr-app.html index 19965e7e8e..8c50358992 100644 --- a/polygerrit-ui/app/elements/gr-app.html +++ b/polygerrit-ui/app/elements/gr-app.html @@ -59,7 +59,6 @@ limitations under the License. - @@ -165,12 +164,6 @@ limitations under the License. on-mobile-search="_mobileSearchToggle"> -