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

It's not clear what some actions in the new Options menus of Variable Explorer editors do #21824

Open
ccordoba12 opened this issue Feb 21, 2024 · 8 comments · May be fixed by #22061
Open

It's not clear what some actions in the new Options menus of Variable Explorer editors do #21824

ccordoba12 opened this issue Feb 21, 2024 · 8 comments · May be fixed by #22061

Comments

@ccordoba12
Copy link
Member

ccordoba12 commented Feb 21, 2024

  • This is a follow-up of PR: Unify UI of editors in Variable Explorer and simplify code #21666.
  • I think the addition of Options menus to our editors is a fantastic idea. But after reviewing them manually, I think we could improve the names of some of its actions to make it clearer what they do.
  • In particular, I'm talking about Format, which we could rename to Set format for floating point numbers (or something like that). Furthermore, we could add a descriptive text to the dialog that opens after clicking on it with a link to the format syntax that users can set there.
  • Another option that I find difficult to understand is Column min/max. Just by reading that text, I don't understand what it does. And I tried to enable/disable it in a simple dataframe and I didn't see any difference.
@ccordoba12
Copy link
Member Author

@jitseniesen, @CAM-Gerlach, what do you think about this one?

@jitseniesen
Copy link
Member

  • In particular, I'm talking about Format, which we could rename to Set format for floating point numbers (or something like that). Furthermore, we could add a descriptive text to the dialog that opens after clicking on it with a link to the format syntax that users can set there.

Before the PR, this was a button with a tooltip with the text "Set format of floating-point numbers". The PR moved this to a menu item and an unintended consequence was that the tooltip disappeared, because menus do not show tooltips by default. So one solution may be to turn on toolTipVisible in the menu, but users may find it confusing to have tooltips in a menu as that is not very common (and I don't think we use tooltips in menus anywhere in Spyder).

We can change the name of the menu item, but I think that your proposed name is too long. Maybe Set format... or Set format for floats..., with the three dots indicating that a dialog will follow.

The text in the dialog itself should certainly be clarified.

  • Another option that I find difficult to understand is Column min/max. Just by reading that text, I don't understand what it does. And I tried to enable/disable it in a simple dataframe and I didn't see any difference.

I think I understood this option only by reading the code. The option Background colour colours the lowest numbers red and the highest numbers blue, with the rest given colours in between. If Column min/max is set, then the lowest/highest number in each column is coloured red/blue, otherwise the lowest/highest number in the entire dataframe is coloured red/blue.

The best description I can come up with is "Assign colours by column", but I don't think that is very clear either. This requires a fuller explanation elsewhere, either in a tooltip or in our documentation.

We can also consider removing that option. I can imagine situations where it could be useful but I'm not sure how much it is actually used, and it is hard to find out what it does.

@ccordoba12
Copy link
Member Author

or Set format for floats..., with the three dots indicating that a dialog will follow.

I like this suggestion because it works better for a menu entry (I know mine was too long).

The best description I can come up with is "Assign colours by column", but I don't think that is very clear either.

Yeah, that seems hard to explain with the action text alone. We could also say Assign colors by column min/max, but in other languages that could translate to a very long text (e.g. in Spanish it'd be Asignar colores según el max/min de cada columna).

This requires a fuller explanation elsewhere, either in a tooltip or in our documentation.

Since tooltips in menus are not an expected UI element, that's perhaps not an option. And improving our docs is a good idea but the interface should be easy enough to grasp on its own.

We can also consider removing that option. I can imagine situations where it could be useful but I'm not sure how much it is actually used, and it is hard to find out what it does.

Yeah, that's another option but I wouldn't like to remove current functionality because I'm sure some users rely on it and wouldn't be happy about it.

@jitseniesen
Copy link
Member

A more radical idea is not to have the options (hamburger) menu, but instead have a toolbutton like 🔧 . That button opens up a dialog with a text field for the format string for floating point numbers and two checkbuttons, one for turning on/off the background colour and one for the column min/max option. The advantage is that we can use a bit more text in a dialog window and we can also add tooltips. However, this is quite a big thing to do before 6.0.

@ccordoba12
Copy link
Member Author

A more radical idea is not to have the options (hamburger) menu, but instead have a toolbutton like 🔧

This is a very good idea! @CAM-Gerlach, what do you think?

However, this is quite a big thing to do before 6.0.

I could give you a hand with it after we release beta1.

@PhilipYip1988
Copy link

PhilipYip1988 commented Mar 6, 2024

I think the col min/max applies the background color independently for each Series:

img001

Or across the entire DataFrame:

img002

The subtle difference can be seen in the DataFrame above.

It might be better to have a dropdown box with something like:

background color applied via: ['Series', 'DataFrame']

background color by: ['Series', 'DataFrame']

img003

Or if the checkbox option is preferred renaming "column min/max" to "color by Series" may be easier to read.

Using DataFrame and Series in this context is more consistent to pandas documentation and therefore should be clear to someone working with pandas.

The two primary data structures of pandas, Series (1-dimensional) and DataFrame (2-dimensional), handle the vast majority of typical use cases in finance, statistics, social science, and many areas of engineering.

@ccordoba12 ccordoba12 modified the milestones: v6.0alpha5, v6.0beta1 Mar 12, 2024
@jitseniesen
Copy link
Member

Here is a (non-functional) mock-up of what a dialog window can look like. I put the new toolbar button to the left of the refresh button, where the button for setting the format used to be.

My main doubt is whether I should combine the two groups ("Background color" and "Coloring algorithm") in one group with three options.

If this looks promising, then I can implement the functionality and submit a PR so that we can start fine tuning the text and the graphics layout. What do you think?

dataframe-prefs.mp4

@ccordoba12
Copy link
Member Author

This looks really nice, thanks @jitseniesen! My only suggestion is to leave the current Options menu and add this as an action called Additional preferences.

That way we would maintain consistency with the other editors and we could also add a Close action (with a shortcut) to that menu later on to solve issue #21814.

@jitseniesen jitseniesen self-assigned this May 6, 2024
@ccordoba12 ccordoba12 modified the milestones: v6.0beta1, v6.0beta2 May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants