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

[stable13] Set "share with" field to the ID of the circle #8905

Merged
merged 2 commits into from Mar 20, 2018

Conversation

Projects
None yet
3 participants
@danxuliu
Member

danxuliu commented Mar 20, 2018

Backport of #8843

danxuliu added some commits Mar 16, 2018

Set "share_with" field to the ID of the circle
When a share is shared with a circle the "share_with" field returned by
the API endpoint was always set to the name of the circle. However, the
name is not enough to identify a circle. The Circles app now provides
the ID of the circle in the "shared with" field of a Share, so this
commit modifies the API endpoint to set the "share_with" field to the ID
of the circle when provided by the Circles app.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Use the display name in the avatar for a circle share
Before, the avatar for a circle share was generated using the
"share_with" field as the seed for "imageplaceholder". Due to this, when
the "share_with" field is set to the circle ID the character shown in
the avatar was just a random character instead of the first character of
the display name. Now the "share_with" is still used as the seed for the
colour, but the display name is used as the text of the avatar.

This adds support for "share_with" fields set to the circle ID while
being backwards compatible with "share_with" fields set to the circle
name.

Note that when "share_with" fields is set to the circle name the colour
of the avatar is different in the list of suggested sharees and in the
list of current sharees, but that also happened before these changes
(due to a different seed being used in each place).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@codecov

This comment has been minimized.

codecov bot commented Mar 20, 2018

Codecov Report

Merging #8905 into stable13 will decrease coverage by <.01%.
The diff coverage is 14.28%.

@@              Coverage Diff               @@
##             stable13    #8905      +/-   ##
==============================================
- Coverage       51.33%   51.33%   -0.01%     
- Complexity      25022    25025       +3     
==============================================
  Files            1609     1609              
  Lines           95290    95294       +4     
  Branches         1376     1376              
==============================================
+ Hits            48920    48921       +1     
- Misses          46370    46373       +3
Impacted Files Coverage Δ Complexity Δ
core/js/sharedialogshareelistview.js 45.22% <ø> (ø) 0 <0> (ø) ⬇️
...iles_sharing/lib/Controller/ShareAPIController.php 67.09% <0%> (-0.59%) 158 <0> (+3)
core/js/sharedialogview.js 75.43% <100%> (ø) 0 <0> (ø) ⬇️
apps/files_trashbin/lib/Trashbin.php 72.28% <0%> (-0.25%) 136% <0%> (ø)
core/js/js.js 66.4% <0%> (+0.11%) 0% <0%> (ø) ⬇️
lib/private/Files/Cache/Propagator.php 96.2% <0%> (+1.26%) 16% <0%> (ø) ⬇️

@rullzer rullzer merged commit 52a97e8 into stable13 Mar 20, 2018

2 of 4 checks passed

codecov/patch 14.28% of diff hit (target 51.33%)
Details
codecov/project 51.33% (-0.01%) compared to a6f1721
Details
continuous-integration/drone/pr the build was successful
Details
continuous-integration/drone/push the build was successful
Details

@rullzer rullzer deleted the stable13-8843-set-share-with-field-to-the-id-of-the-circle branch Mar 20, 2018

@MorrisJobke MorrisJobke referenced this pull request Apr 18, 2018

Merged

13.0.2 RC 1 #9228

8 of 11 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment