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

wxGUI Console: Button reorganization #2746

Conversation

lindakarlovska
Copy link
Contributor

@lindakarlovska lindakarlovska commented Jan 13, 2023

This PR solves two things:

  • reduces the number of Console buttons by removing the Clear prompt button
  • removes bounding boxes around buttons
  • moves buttons to the bottom of the Console pane

Before:
Screenshot from 2023-01-13 16-00-36

The main problem was that the right part of the button line could be cut off in Single-Window GUI (simply by shrinking the side Console pane):
Screenshot from 2023-01-13 16-00-58

After:
Screenshot from 2023-01-13 15-45-19
The suggestion is very similar to the solution in other panes (Tools, Python).
Follows the suggestion in #2585 (comment).

@lindakarlovska lindakarlovska added enhancement New feature or request GUI wxGUI related labels Jan 13, 2023
@lindakarlovska lindakarlovska added this to the 8.3.0 milestone Jan 13, 2023
@lindakarlovska
Copy link
Contributor Author

lindakarlovska commented Jan 15, 2023

I am thinking about the suggestion and I still do not like the way how buttons are organized. All buttons are actually more related to Console Output than to Command Prompt. We could probably preserve Clear button for Command Prompt and put two buttons Save and Clear to the bottom of Console Output and two buttons Export history and Clear to the bottom of Command prompt.. So we would clearly present what button belongs to which widget.

Any ideas or disagreeing comments on this? :-)

@veroandreo
Copy link
Contributor

I am thinking about the suggestion and I still do not like the way how buttons are organized. All buttons are actually more related to Console Output than to Command Prompt. We could probably preserve Clear button for Command Prompt and put two buttons Save and Clear to the bottom of Console Output and two buttons Export history and Clear to the bottom of Command prompt.. So we would clearly present what button belongs to which widget.

Any ideas or disagreeing comments on this? :-)

I like the idea of putting the buttons where they belong to ;)

@lindakarlovska
Copy link
Contributor Author

I am thinking about the suggestion and I still do not like the way how buttons are organized. All buttons are actually more related to Console Output than to Command Prompt. We could probably preserve Clear button for Command Prompt and put two buttons Save and Clear to the bottom of Console Output and two buttons Export history and Clear to the bottom of Command prompt.. So we would clearly present what button belongs to which widget.
Any ideas or disagreeing comments on this? :-)

I like the idea of putting the buttons where they belong to ;)

Good. I implemented it according to the last suggestion. If I make the right pane really narrow it looks as follows:
Screenshot from 2023-01-16 21-30-40
I think it elegantly solves the problem with button "cut off" in Single-Window GUI.

@petrasovaa, do you have any suggestions on this?

@petrasovaa petrasovaa linked an issue Jan 17, 2023 that may be closed by this pull request
@petrasovaa
Copy link
Contributor

Good. I implemented it according to the last suggestion. If I make the right pane really narrow it looks as follows: Screenshot from 2023-01-16 21-30-40 I think it elegantly solves the problem with button "cut off" in Single-Window GUI.

@petrasovaa, do you have any suggestions on this?

I don't have a better solution right now. How are the buttons aligned? I would align them all probably to the right, but no strong opinion.

@lindakarlovska lindakarlovska changed the title wxGUI Console: Button reduction and reorganization wxGUI Console: Button reorganization Jan 18, 2023
@veroandreo
Copy link
Contributor

@petrasovaa, do you have any suggestions on this?

I don't have a better solution right now. How are the buttons aligned? I would align them all probably to the right, but no strong opinion.

I'd also align them to the right

@lindakarlovska
Copy link
Contributor Author

lindakarlovska commented Jan 19, 2023

@petrasovaa, do you have any suggestions on this?

I don't have a better solution right now. How are the buttons aligned? I would align them all probably to the right, but no strong opinion.

I'd also align them to the right

I agree with you Vero and Anna, aligning to the right side looks better:
Screenshot from 2023-01-19 18-02-21
Shall I adapt something more or could we merge this?

@veroandreo
Copy link
Contributor

I agree with you Vero and Anna, aligning to the right side looks better: Screenshot from 2023-01-19 18-02-21
Shall I adapt something more or could we merge this?

Now that buttons are placed where they belong, I wonder if the texts Save output and Export history are really needed... Wouldn't Save be enough in both cases? What do you think?

@lindakarlovska
Copy link
Contributor Author

I agree with you Vero and Anna, aligning to the right side looks better: Screenshot from 2023-01-19 18-02-21
Shall I adapt something more or could we merge this?

Now that buttons are placed where they belong, I wonder if the texts Save output and Export history are really needed... Wouldn't Save be enough in both cases? What do you think?

Well, I think that Export history is probably more clear if we consider what it is really doing (especially when we changed the way how it behaves. please Vero look at #2682)... and generally speaking, I do not see the reason why not write a bit longer description. It definitely rather helps more than harms. :-) Of course, it would be a different case if we had little space for that but it is not the case now... Just my opinion...

@wenzeslaus
Copy link
Member

What about considering the whole thing one larger widget? Then there would be one row with three buttons in the bottom:

------------------------------------
...output...
------------------------------------
...input...
------------------------------------
Save output | Export history | Clear
------------------------------------

Clear would clear both input and output.

This suggestion avoids two Clear buttons and two rows of buttons.

@petrasovaa
Copy link
Contributor

What about considering the whole thing one larger widget? Then there would be one row with three buttons in the bottom:

------------------------------------
...output...
------------------------------------
...input...
------------------------------------
Save output | Export history | Clear
------------------------------------

Clear would clear both input and output.

This suggestion avoids two Clear buttons and two rows of buttons.

I agree, I think the interface will look better.

@lindakarlovska
Copy link
Contributor Author

This PR solves two things:

* reduces the number of Console buttons by removing the Clear prompt button

* removes bounding boxes around buttons

* moves buttons to the bottom of the Console pane

Before: Screenshot from 2023-01-13 16-00-36

The main problem was that the right part of the button line could be cut off in Single-Window GUI (simply by shrinking the side Console pane): Screenshot from 2023-01-13 16-00-58

After: Screenshot from 2023-01-13 15-45-19 The suggestion is very similar to the solution in other panes (Tools, Python). Follows the suggestion in #2585 (comment).

Well... The layout you are proposing is basically very similar to what I implemented at the beginning of this PR.. :-D I like the idea of merging Clear button into one Clear button but I still think that we do not solve the problem of lack of space... The button widget is too wide and it will not look good with the default settings of the right panel width... but I can go back in the commit history and implement your proposal and we can then decide what is better...

@petrasovaa
Copy link
Contributor

Well... The layout you are proposing is basically very similar to what I implemented at the beginning of this PR.. :-D I like the idea of merging Clear button into one Clear button but I still think that we do not solve the problem of lack of space... The button widget is too wide and it will not look good with the default settings of the right panel width... but I can go back in the commit history and implement your proposal and we can then decide what is better...

Regarding the width, the output of r.info etc. is anyway rather wide, so you end up extending it anyway. And this is still an improvement comparing to the current state.

Unrelated, it would be nice to make the console space little taller (less narrow), right now the space for typing is rather narrow and long commands don't fit.

@lindakarlovska lindakarlovska force-pushed the wxGUI--console-output-prompt-reorganization branch from 0c5452c to 1ba40fb Compare February 5, 2023 20:50
@lindakarlovska
Copy link
Contributor Author

lindakarlovska commented Feb 5, 2023

Well... The layout you are proposing is basically very similar to what I implemented at the beginning of this PR.. :-D I like the idea of merging Clear button into one Clear button but I still think that we do not solve the problem of lack of space... The button widget is too wide and it will not look good with the default settings of the right panel width... but I can go back in the commit history and implement your proposal and we can then decide what is better...

Regarding the width, the output of r.info etc. is anyway rather wide, so you end up extending it anyway. And this is still an improvement comparing to the current state.

Unrelated, it would be nice to make the console space little taller (less narrow), right now the space for typing is rather narrow and long commands don't fit.

Do you mean the whole right pane make a bit wider or just put the splitter inside the Console pane higher (so that the space for Prompt would be taller)? I made the minimum height of the Prompt greater:

self.SetMinimumPaneSize(self.btnCmdClear.GetSize()[1] + 100)

instead of

self.SetMinimumPaneSize(self.btnCmdClear.GetSize()[1] + 25)

@lindakarlovska
Copy link
Contributor Author

lindakarlovska commented Feb 5, 2023

I would suggest making this change:

        # split window
        self.SplitHorizontally(self.panelOutput, self.panelPrompt, 0)
        if not (self._gcstyle & GC_PROMPT):
            self.Unsplit()
        self.SetMinimumPaneSize(self.btnClear.GetSize()[1] + 100)

        self.SetSashGravity(0.5)

It makes the Sash position looser and the size is determined by the size of the inner two widgets. With these settings, the Console Prompt takes about one third of the Console size. What do you think @petrasovaa ?

@lindakarlovska lindakarlovska requested review from petrasovaa and removed request for petrasovaa February 5, 2023 21:50
@petrasovaa petrasovaa merged commit 3dcc659 into OSGeo:main Feb 8, 2023
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
* now we have just one clear button to clear both output and prompt
* larger prompt area
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
* now we have just one clear button to clear both output and prompt
* larger prompt area
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GUI wxGUI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wxGUI: Reorganization of Console panel
4 participants