Uh oh!
There was an error while loading. Please reload this page.
Always generate avatar - #6876
Conversation
Codecov Report
@@ Coverage Diff @@## master #6876 +/- ##
============================================
+ Coverage 50.85% 50.89% +0.03% - Complexity 24539 24557 +18
============================================
Files 1584 1584 Lines 93798 93891 +93 Branches 1358 1358 ============================================
+ Hits 47704 47788 +84 - Misses 46094 46103 +9
|
rullzer
commented
Nov 2, 2017
Ah mmm so upating the JS is a tiny bit tricky as there is also some code to handle unknown users etc. |
rullzer
commented
Nov 2, 2017
So @tobiasKaminsky this is what you wanted right? @jancborchardt please checkout this branch and try to share etc. To see if there are no weird avatar hickups now. |
tobiasKaminsky
commented
Nov 2, 2017
@rullzer this is great. So we can drop avatar generation once NC 12 has end of life :-) |
| /** | ||
| * @NoAdminRequired | ||
| * @NoCSRFRequired | ||
| * @NoSameSiteCookieRequired |
There was a problem hiding this comment.
Why did you remove this? This is for example required when Collabora is embedding avatars since it runs under a different origin :)
| $hsl = $this->rgbToHsl($rgb[0], $rgb[1], $rgb[2]); | ||
| // Classic formulla to check the brigtness for our eye |
| * @param double $h Heu in range [0, 1] | ||
| * @param double $s Saturation in range [0, 1] | ||
| * @param double $l Lightness in range [0, 1] | ||
| * @return int[] Array containging r g b in the range [0, 255] |
| } | ||
| /** | ||
| * @param double $h Heu in range [0, 1] |
| throw new NotFoundException; | ||
| } | ||
| private function generateAvatar($userDisplayName, $size) { |
There was a problem hiding this comment.
PHPDoc on the parameters would be awesome 😄
706ed5b to
949fdc8Compare949fdc8 to
3e2ca98Compare3e2ca98 to
2c67928CompareEven if no avatar is set we should just generate the image. This to not duplicate the code on all the clients. And only server images from the avtar endpoint. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2c67928 to
8e8fe6bCompareSigned-off-by: Morris Jobke <hey@morrisjobke.de>
MorrisJobke
left a comment
There was a problem hiding this comment.
I made the font use semibold weight and made it a bit better centered, because it was slightly off.
MorrisJobke
commented
Dec 8, 2017
skjnldsv
commented
Dec 8, 2017
I'm OK with that. This is also pretty nice for the top right menu list drop-down positioning issue we have here and there :) |
MariusBluem
commented
Dec 8, 2017
I like always having the avatar at the top 👍 |
MorrisJobke
commented
Dec 8, 2017
Discussed with @LukasReschke on IRC and good to get in. |
MorrisJobke
commented
Dec 10, 2017
@rullzer Seems to break the integration tests for sharing :/ See @danxuliu's comment in #6715 (comment) |
rullzer
commented
Dec 11, 2017
I know. I have a patch for that already |
MorrisJobke
commented
Dec 11, 2017
|
jancborchardt
commented
Dec 11, 2017
Hm, in the past @karlitschek and I discussed this with avatar placeholder in top right and we didn’t really like it as it’s very present and colorful. However it kind of nudges you to set a proper image, so I guess it’s fine after all. :) |
jancborchardt
commented
Dec 15, 2017
Actually this causes a confusion with new users or installations. Cause in the top right the avatar is shown and not the settings icon, it is not immediately obvious where the settings are: (When you are used to the UI and added a picture, you also know where the settings are.) |
MariusBluem
commented
Dec 15, 2017
I disagree with you @jancborchardt ... this behaviour is known by the users from so many services ... not only by Nextcloud. To make it crystal clear we could show some arrows with descriptions in the firstrunwizard :) |
jancborchardt
commented
Dec 15, 2017
If it's known, we don't need a pointer for such an obvious menu in the first run wizard. ;) |
MorrisJobke
commented
Dec 16, 2017
I guess the main problem is, that we don't have an indicator for menus. On github they put for example a little arrow beside the avatar to indicate the menu: |




@LukasReschke as discussed
Even if no avatar is set we should just generate the image. This to not
duplicate the code on all the clients. And only server images from the
avatar endpoint.
Todo:
Future work: