From eb164d881ec4ab51ce4ba39a82c18bd81d7f2380 Mon Sep 17 00:00:00 2001 From: Keegan George Date: Fri, 24 Mar 2023 13:23:08 -0700 Subject: [PATCH] UX: Make table builder edit button icon-only (#49) --- .../discourse/api-initializers/table-editor.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/javascripts/discourse/api-initializers/table-editor.js b/javascripts/discourse/api-initializers/table-editor.js index 99f173c..166f152 100644 --- a/javascripts/discourse/api-initializers/table-editor.js +++ b/javascripts/discourse/api-initializers/table-editor.js @@ -16,16 +16,17 @@ export default apiInitializer("0.11.1", (api) => { "open-popup-link", "btn-default", "btn", - "btn-icon-text", - "btn-edit-table" + "btn-icon", + "btn-edit-table", + "no-text" ); const editIcon = create( iconNode("pencil-alt", { class: "edit-table-icon" }) ); - const openPopupText = document.createTextNode( - I18n.t(themePrefix("discourse_table_builder.edit.btn_edit")) + openPopupBtn.title = I18n.t( + themePrefix("discourse_table_builder.edit.btn_edit") ); - openPopupBtn.append(editIcon, openPopupText); + openPopupBtn.append(editIcon); return openPopupBtn; }