From 86659c1a50706d022971affcbd88c5ac074b01e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Ar=C3=A8s?= Date: Tue, 7 Aug 2018 13:12:24 -0400 Subject: [PATCH] Fix partially hidden plugin configuration in the UI In project setting page, plugin configurations were partially hidden if value had more characters than the default number of characters displayed in the text box. For users who can edit the configurations, this is not an issue as they can see the hidden part by moving the cursor in the text box. Users which cannot edit the configurations, the field is disabled preventing them to see the hidden part. Fix it by making the text box wider if needed. This fix is not ideal because if the value is really long, then the text box could be wider than the screen size causing an horizontal scroll bar to appear. An other option would have been to set the attribute "readonly" instead of "disabled" which would allow users with no edit rights to see the hidden part by putting the cursor in the text box. The problem is not all the input controls used in the project page support setting the readonly attribute so the code change would be more complex and intrusive. Since GWT UI is going away, go with the more simple and less intrusive solution which is to make the text area wider when needed. Change-Id: I189e9482cc03043819cb0077f6ea10d3585edb9d --- .../java/com/google/gerrit/client/admin/ProjectInfoScreen.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java index b09fc0bfe2..144a152373 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java @@ -474,6 +474,9 @@ public class ProjectInfoScreen extends ProjectScreen { textBox.setValue(param.value()); addWidget(g, textBox, param); } + if (textBox.getValue().length() > textBox.getVisibleLength()) { + textBox.setVisibleLength(textBox.getValue().length()); + } saveEnabler.listenTo(textBox); return textBox; }