Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

PR: Add support for multiple package actions handling #25

Merged
merged 5 commits into from
Feb 29, 2016

Conversation

goanpeca
Copy link
Member

Fixes #2

Screenshots

image

Icons need to be redefined/redesigned (@Discalced51 :-) ?)

image

This probably needs to change to a dialog that displays the info in a better format.

image

For reference, How Synaptic looks.

Synaptic was used as reference for this PR
image

@ccordoba12
Copy link
Member

Why not add a checkbox (as the first column) to select packages for installation, like synaptic?

It seems simpler and more intuitive than using a context menu entry to do it.

@ccordoba12
Copy link
Member

Also, please fix the error in Appveyor, it seems pretty simple :-)

@goanpeca
Copy link
Member Author

I dont know why this is there...

SET PATH=%PYTHON%;%PYTHON%\Scripts;%PYTHON%\Library\bin;%PATH%
SET TEST_CI=True
python conda-manager.py
Traceback (most recent call last):
  File "conda-manager.py", line 6, in <module>
    from conda_manager.app import main
  File "C:\projects\conda-manager\conda_manager\__init__.py", line 13, in <module>
    from conda_manager import app, data, models, utils, widgets  # analysis:ignore
  File "C:\projects\conda-manager\conda_manager\app\__init__.py", line 12, in <module>
    from .main import main               # analysis:ignore
  File "C:\projects\conda-manager\conda_manager\app\main.py", line 16, in <module>
    from conda_manager.utils.qthelpers import qapplication
  File "C:\projects\conda-manager\conda_manager\utils\__init__.py", line 17, in <module>
    from qtpy.QtGui import QIcon
ImportError: No module named qtpy.QtGui
Command exited with code 1

@ccordoba12
Copy link
Member

Yes, it's weird.

@goanpeca
Copy link
Member Author

Moved checkbox to first column, and changed icons...

image

Empty box: not installed
Grey box: currently installed
Green +: Action Install
Red -: Action remove
Orange arrow: Action upgrade

The version string now also display an arrow to indicate that there is a new version...

Comments @Nodd, @Discalced51?

@goanpeca
Copy link
Member Author

Variant with colored rows to indicate the action...

image

@ccordoba12
Copy link
Member

I really like the second option (with colored rows). It's really, really nice!

I don't like that much the grayed checkbox for installed packages. Could you change it for a check mark, like this:

http://fortawesome.github.io/Font-Awesome/icon/check/

@Nodd
Copy link

Nodd commented Feb 26, 2016

This is great ! As always :)
I like a lot of things:

  • The arrow in the version to show updates
  • Line colors (maybe the green is a bit too flasy ?)
  • Icon colors for install, remove and not installed
  • Checkboxes on the left side
  • Disabled entries in the menu instead of hidden

What I think could be improved:

  • Non-checked checkboxes should be filled with white, not gray. With grey they look disabled, like you can't click on it. There would be no confusion with white because the text is grayed out for non installed packages.
  • Orange as color for update doesn't work well. Did you try blue ?
  • In the dialog, the version should always be displayed for installs, and it would be great to see the version change for upgrade.downgrades (like 0.0.1 -> 0.2.0)
  • You can expand the last column so that it fits the table width, there is a property for this in Qt
  • The icons in the T column are not clear enough I think, is there a tooltip indicating that one is for conda and the other for pip ?
  • Use scrollable list for each part of the dialog, so that a long list of packages doesn't make the dialog too big

To avoid having to use the context menu every time, there could be default action in each case activated on left click on the checkbox only, and the menu shows up on right click (anywhere on the line). Here are the default actions I suggest:

  • Marked -> Unmarked
  • Not installed -> Marked for install to last version
  • Upgradable -> Marked for install to last version
  • Installed and not upgradable -> Marked for removal (not 100% sure about this one, maybe do nothing)

One question: do you manage dependencies somewhere ? More specifically, are they displayed in the dialog ? In that case the could be marked so, with (dependency) at the end of the line.
For reference in synaptic the dependencies are marked when you select a package, not when you apply them. I don't think that's what we want here.

@Nodd
Copy link

Nodd commented Feb 26, 2016

I like the check mark for installed packages. In that case left clicking on it should not do anything since it doesn't look like a checkbox anymore, so it's more consistent. Is there an icon for upgradable packages that are not selected?

Another suggestion: use a purple color (and icon) for downgraded packages, if it's not already done.

}

for i, row in enumerate(self._rows):
action = self._rows[i][C.COL_ACTION]
Copy link

Choose a reason for hiding this comment

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

self._rows[i] is just row I think, here and in the next few lines.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes :-p

@goanpeca
Copy link
Member Author

@Nodd thanks for the input...

image

Row colors can be tweaked so don't take them too seriously at this moment., I just took the icon colors and set the alpha value.

@ccordoba12 thanks for the input, now they look like checkboxes

@Discalced51
Copy link

@goanpeca ,
four spinners, per last night's conversation.
spinner_blue
spinner_green
spinner_orange

@goanpeca
Copy link
Member Author

@Nodd

Non-checked checkboxes should be filled with white, not gray. With grey they look disabled, like you can't click on it. There would be no confusion with white because the text is grayed out for non installed packages.

Fixed !

Orange as color for update doesn't work well. Did you try blue ?

Tried blue and purple (for downgrades) no... comments?

In the dialog, the version should always be displayed for installs, and it would be great to see the version change for upgrade.downgrades (like 0.0.1 -> 0.2.0)

Working on it

You can expand the last column so that it fits the table width, there is a property for this in Qt

Working on it

The icons in the T column are not clear enough I think, is there a tooltip indicating that one is for conda and the other for pip ?

Yes there are tooltips indicated that. Maybe we should change it to P as in Package?

Use scrollable list for each part of the dialog, so that a long list of packages doesn't make the dialog too big

Working on it

One question: do you manage dependencies somewhere ? More specifically, are they displayed in the dialog ? In that case the could be marked so, with (dependency) at the end of the line.
For reference in synaptic the dependencies are marked when you select a package, not when you apply them. I don't think that's what we want here.

Very difficult to emulate the synaptic behavior for that... After clicking on apply I have no additional information about dependencies cause they are all sequential steps performed.

@goanpeca
Copy link
Member Author

I am merging as is. It is functional enough. The fixes on details as colors and improving the dialog will go in a different PR

goanpeca added a commit that referenced this pull request Feb 29, 2016
PR: Add support for multiple package actions handling
@goanpeca goanpeca merged commit 40c2b10 into master Feb 29, 2016
@goanpeca goanpeca deleted the feature/multiple-packages branch February 29, 2016 18:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants