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

i_395 scoring properties settings now on main page #910

Conversation

kkarakas
Copy link
Collaborator

@kkarakas kkarakas commented Jan 8, 2024

Description of what the PR does

Judging Settings Pane in Settings for Admin has been updated so that Scoring Properties are displayed without a new frame and saves without additional button.

Issue which the PR addresses

Fixes #395

Environment in which the PR was developed (OS,IDE, Java version, etc.)

Windows 11, Eclipse 2021-12 R, JDK 8u381 (1.8)

Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)

On admin, select settings, see that there is a Scoring Properties Pane, try to update the value.

Screenshot 2024-01-08 032649 Screenshot 2024-01-08 032951

Copy link
Contributor

@troy2914 troy2914 left a comment

Choose a reason for hiding this comment

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

This looks reasonable, and tested fine.

@troy2914 troy2914 requested a review from johnbrvc January 11, 2024 05:58
@johnbrvc johnbrvc added this to the 9.10.0 milestone Jan 11, 2024
Copy link
Collaborator

@johnbrvc johnbrvc left a comment

Choose a reason for hiding this comment

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

Code looks good and works as described, however, the GUI does not look right on my system (probably a result of the flow layout and my default fonts/resolution). See the attached image. Resizing the window obviously does not change anything.

image

In addition, I don't see any reason not to make the property sheet be a little wider to start with. The reason being, in practice, the Value's for the HTML directories tend to be longer than the defaults, so it would be nice to see a little more context and not have the scroll-bars pop up almost immediately when you start typing in one of those fields. Maybe make the Value column as wide as the Property column?

@clevengr
Copy link
Contributor

I agree that the layout needs to be fixed so it looks reasonable on all (or at least most) platforms. I'm pretty sure it's a matter of something like putting the components into their own sub-JPanels, and perhaps changing the LayoutManager for the pane. Unfortunately, it's not something I have time to work on myself right now :(

@@ -69,8 +73,10 @@ private MCLB getPropertyListBox() {
HeapSorter sorter = new HeapSorter();
propertyListBox.setColumnSorter(1, sorter, 1);

propertyListBox.autoSizeAllColumns();

propertyListBox.setColumnSize(0,this.lengthOfColumns);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you using "this." here to refer to the member lengthOfColumns?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I pickup that habit in Python. Java implicitly adds preprends that i think so as you suggest, there is no need for that here.

@@ -115,7 +121,8 @@ protected void refreshProperties() {
propertyListBox.addRow(objects);
}

propertyListBox.autoSizeAllColumns();
propertyListBox.setColumnSize(0,this.lengthOfColumns);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above. Why are you using "this." ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I pickup that habit in Python. Java implicitly adds preprends that i think so as you suggest, there is no need for that here.

Copy link
Collaborator

@johnbrvc johnbrvc left a comment

Choose a reason for hiding this comment

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

This seems to work on the several systems I tried it on, and the new layout looks good.
I will await the answers to my question about the "this" usage before approval.

Copy link
Collaborator

@johnbrvc johnbrvc left a comment

Choose a reason for hiding this comment

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

Looks good.

@johnbrvc johnbrvc merged commit 857d022 into pc2ccs:develop Jan 27, 2024
3 checks passed
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.

Update for Settings -> Edit Scoring Properties does not save Scoring Properties
4 participants