-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Host avatar and color chooser. #1467
Conversation
Cool stuff. Some remarks:
Will fix these in a pull request against your branch |
We can use server-large.png, I think. Because of the way the dialog works, we will never accidentally save it as the real avatar. |
Here are the fixes mentioned above: |
74c0362
to
a7fafa3
Compare
a7fafa3
to
f3943d3
Compare
fixed the visual error in this commit https://github.com/andreasn/cockpit/tree/multi-dash-edit-style2 |
b9dc1a0
to
256c817
Compare
Right, good catch. The old code has a fix for this, I think. |
Updated with new behavior:
|
@andreasn, should the edit and delete button disappear after clicking on one of them? |
5008238
to
7eaf3c8
Compare
Transparent? |
Hmm, I would propose to set the initial cropping area to be as big as possible. That way you can just press OK to use the whole image. It will have some transparent borders, but that's OK. |
ccfb219
to
203b3dc
Compare
Ready for more review. I'll add some tests. |
bf68f05
to
1b5d259
Compare
I would say white, otherwise the background will bleed through on hover and stuff, and that would look odd. |
As mentioned on IRC, yes! |
@andreasn does it make sense to work through the above issues in separate bugs? If not, I don't mind waiting for fixes before we merge this. |
4333b83
to
4fd07dc
Compare
Rebased and added a FIXUP for the lingering popover. |
I can't replicate this issue. Can you post a screenshot? The rest of the issues are fixed here: https://github.com/andreasn/cockpit/tree/hosts-edit-style-polish |
Fixed on the branch mentioned above. Should be ready. |
Some remaining issues:
|
I realize you must be talking about the height. I read your comment as in that they were different width (buttons always are) and that the Set should be bigger to not be dominated by Cancel next to it. The height issue is indeed a regression introduced globally now. I've found the error and have a fix, but need to test it a bit more. |
After failing miserably at fixing this with border, I realized box-shadow would do the trick. This also simplifies the css! |
These and the two other issues should now be fixed on the same branch. The scariest part of the pull request is that all element with the class btn will now have a min-height and a min-width of 28px. As far as I can see this have not affected any other part of Cockpit in a negative way. |
One last issue. I cannot click away from the color picker. I have to choose a color. The color picker is a popover and it should go away when I click somewhere else. Try this:
|
cb2282d
to
4dfb9e9
Compare
This takes color and avatar directly from the dashboard configuration, and uses the name in the dashboard configuration as a cache for the pretty name of the target host. Also allow setting of the pretty name via shell.hosts.
4dfb9e9
to
0e5802f
Compare
Squashed and rebased. |
You can click on the big colored button again and it will close. I have changed it to use the dropdown plugin and now it behaves like a menu. |
Color pop over does not go away even when i choose a color now. Did you forget to push something? |
This has been broken by jquery.js being loaded twice, once from shell.html and a second time via our AMD loader. |
jQuery bug fixed in #1526 |
Should be feature complete. Coming later: