Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3748 Note for Advanced Proxy Options #3810

Merged
merged 1 commit into from
Mar 20, 2022
Merged

Conversation

vieiro
Copy link
Contributor

@vieiro vieiro commented Mar 18, 2022

Adding a note in the Advanced Proxy Options to warn users of JDK >= 8u111, because Basic auth disables HTTPS tunneling from this on. See #3748 for details.

Users are redirected to https://netbeans.apache.org/wiki/ProxyBasicAuth for more information.

New dialog looks like this (design window):

imagen

Labels also fill horizontally (previous dialog didn't).

@vieiro vieiro linked an issue Mar 18, 2022 that may be closed by this pull request
@vieiro vieiro added this to the NB14 milestone Mar 18, 2022
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for working on this, some minor remarks:

  • the window width is a bit large for typical input
  • lower panel has no margin on the left side
  • hyperlink should change the cursor to the hand symbol (e.g label.setCursor(new Cursor(Cursor.HAND_CURSOR));)

proxy

@vieiro
Copy link
Contributor Author

vieiro commented Mar 19, 2022

Good point! One of these days we should start defining a UI style-guide for margins/etc.

Things look like this now (label is disabled iff auth is disabled):

imagen

@mbien
Copy link
Member

mbien commented Mar 19, 2022

if i resize the window it appears as if the lower two text fields have now a fixed size and are not attached to the labels after resizing (didn't happen to the first version i tested, fill-with no longer enabled for those two?)

the width is also essentially the same as the screenshot I posted above, did you forget to push something?

@vieiro
Copy link
Contributor Author

vieiro commented Mar 19, 2022

if i resize the window it appears as if the lower two text fields have now a fixed size and are not attached to the labels after resizing (didn't happen to the first version i tested, fill-with no longer enabled for those two?)

the width is also essentially the same as the screenshot I posted above, did you forget to push something?

Let's give it a try without the "<html" text in the label, this may be inteferring with layout.

I'm with FlatLaf and Cinnamon on my box, width looks normal:

imagen

@vieiro
Copy link
Contributor Author

vieiro commented Mar 19, 2022

@mbien please give it another try. If width is still too wide we can give GridBagLayout a try.
Note that the original labels were cropped (are expanded to the right now).

@mbien
Copy link
Member

mbien commented Mar 19, 2022

the label had a preferred size of 1k. It's now set to fill-with. The gaps are now set to default too (one side was 12, the other 18). I am not sure why it looked differently on your system (I am using cinnamon too).

how it looked before for me (+ it did not resize properly):
default

post patch:
patched

patch below:
you can apply it with git am <patch file> - feel free to squash it into your changes.

From 0a94ee498dc26dec4ee84e0f154c7867783a6a0d Mon Sep 17 00:00:00 2001
From: Michael Bien <mbien42@gmail.com>
Date: Sat, 19 Mar 2022 19:19:19 +0100
Subject: [PATCH] layout fixes

 - set label to fill width + hand cursor
 - set gaps to default
---
 .../core/ui/options/general/AdvancedProxyPanel.form       | 8 ++++----
 .../core/ui/options/general/AdvancedProxyPanel.java       | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/platform/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.form b/platform/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.form
index 342633efbb..84d4022034 100644
--- a/platform/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.form
+++ b/platform/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.form
@@ -42,9 +42,9 @@
     <DimensionLayout dim="0">
       <Group type="103" groupAlignment="0" attributes="0">
           <Group type="102" alignment="0" attributes="0">
-              <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
+              <EmptySpace min="-2" max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="lblBasicAuthNote" min="-2" pref="1000" max="-2" attributes="0"/>
+                  <Component id="lblBasicAuthNote" pref="569" max="32767" attributes="0"/>
                   <Component id="cbUseProxyAuthentication" alignment="1" max="32767" attributes="0"/>
                   <Component id="sSeparator" alignment="1" max="32767" attributes="1"/>
                   <Group type="102" alignment="0" attributes="0">
@@ -92,7 +92,7 @@
                       </Group>
                   </Group>
               </Group>
-              <EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
+              <EmptySpace min="-2" max="-2" attributes="0"/>
           </Group>
       </Group>
     </DimensionLayout>
@@ -386,7 +386,7 @@
           <ResourceString bundle="org/netbeans/core/ui/options/general/Bundle.properties" key="AdvancedProxyPanel.lblBasicAuthNote.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
         </Property>
         <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
-          <Color id="Cursor de Mano"/>
+          <Color id="Hand Cursor"/>
         </Property>
       </Properties>
       <Events>
diff --git a/platform/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.java b/platform/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.java
index 9c04164a1b..c80b8e981e 100644
--- a/platform/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.java
+++ b/platform/core.ui/src/org/netbeans/core/ui/options/general/AdvancedProxyPanel.java
@@ -351,9 +351,9 @@ public class AdvancedProxyPanel extends javax.swing.JPanel {
         layout.setHorizontalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
             .addGroup(layout.createSequentialGroup()
-                .addGap(12, 12, 12)
+                .addContainerGap()
                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(lblBasicAuthNote, javax.swing.GroupLayout.PREFERRED_SIZE, 1000, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(lblBasicAuthNote, javax.swing.GroupLayout.DEFAULT_SIZE, 569, Short.MAX_VALUE)
                     .addComponent(cbUseProxyAuthentication, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                     .addComponent(sSeparator, javax.swing.GroupLayout.Alignment.TRAILING)
                     .addGroup(layout.createSequentialGroup()
@@ -390,7 +390,7 @@ public class AdvancedProxyPanel extends javax.swing.JPanel {
                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addComponent(tfUserName)
                             .addComponent(pfUserPassword))))
-                .addGap(18, 18, 18))
+                .addContainerGap())
         );
         layout.setVerticalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-- 
2.35.1

@vieiro
Copy link
Contributor Author

vieiro commented Mar 19, 2022

Thanks @mbien Things look like so now

imagen

@mbien mbien self-requested a review March 19, 2022 19:00
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent. Just tested it and everything looks fine. Resizing works too. Hand cursor is there + link opens... no complains from my side :)

@vieiro vieiro merged commit b565cfa into apache:master Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxy authentication is not working
2 participants