-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix long display names #27059
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
Closed
Closed
Fix long display names #27059
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4d2ec8e
Remove reduction of recipients,
felixheidecke ccc095b
Display names based on viewport,
felixheidecke 2d04f6f
Drop formatRecipients() method,
felixheidecke b49aced
Drop formatRecipients() method,
felixheidecke 0755209
Merge branch 'fix_long_display_names' of https://github.com/owncloud/…
felixheidecke d8221bb
Fix last expected testresult
felixheidecke 4137f4b
Prevent hidden names from pushing "+n"
felixheidecke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,7 +166,7 @@ describe('OCA.Sharing.Util tests', function() { | |
| }]); | ||
| $tr = fileList.$el.find('tbody tr:first'); | ||
| $action = $tr.find('.action-share'); | ||
| expect($action.find('>span').text().trim()).toEqual('Shared with User One, User Two'); | ||
| expect($action.find('>span').text().trim()).toEqual('Shared with User One User Two'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no , ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the comma will be added via CSS |
||
| expect($action.find('.icon').hasClass('icon-share')).toEqual(true); | ||
| expect($action.find('.icon').hasClass('icon-public')).toEqual(false); | ||
| expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-shared.svg'); | ||
|
|
@@ -271,9 +271,9 @@ describe('OCA.Sharing.Util tests', function() { | |
| ] | ||
| }); | ||
|
|
||
| expect($tr.attr('data-share-recipients')).toEqual('Group One, Group Two, User One, User Two'); | ||
| expect($tr.attr('data-share-recipients')).toEqual('User One, User Two, Group One, Group Two'); | ||
|
|
||
| expect($action.find('>span').text().trim()).toEqual('Shared with Group One, Group Two, User One, User Two'); | ||
| expect($action.find('>span').text().trim()).toEqual('Shared with User One User Two Group One Group Two'); | ||
| expect($action.find('.icon').hasClass('icon-share')).toEqual(true); | ||
| expect($action.find('.icon').hasClass('icon-public')).toEqual(false); | ||
| }); | ||
|
|
@@ -304,9 +304,8 @@ describe('OCA.Sharing.Util tests', function() { | |
| ] | ||
| }); | ||
|
|
||
| expect($tr.attr('data-share-recipients')).toEqual('User One, User Three, User Two'); | ||
| expect($tr.attr('data-share-recipients')).toEqual('User One, User Two, User Three'); | ||
|
|
||
| expect($action.find('>span').text().trim()).toEqual('Shared with User One, User Three, User Two'); | ||
| expect($action.find('.icon').hasClass('icon-share')).toEqual(true); | ||
| expect($action.find('.icon').hasClass('icon-public')).toEqual(false); | ||
| }); | ||
|
|
@@ -398,53 +397,7 @@ describe('OCA.Sharing.Util tests', function() { | |
| expect($action.find('.icon').hasClass('icon-public')).toEqual(false); | ||
| }); | ||
| }); | ||
| describe('formatRecipients', function() { | ||
| it('returns a single recipient when one passed', function() { | ||
| expect(OCA.Sharing.Util.formatRecipients(['User one'])) | ||
| .toEqual('User one'); | ||
| }); | ||
| it('returns two recipients when two passed', function() { | ||
| expect(OCA.Sharing.Util.formatRecipients(['User one', 'User two'])) | ||
| .toEqual('User one, User two'); | ||
| }); | ||
| it('returns four recipients with plus when five passed', function() { | ||
| var recipients = [ | ||
| 'User one', | ||
| 'User two', | ||
| 'User three', | ||
| 'User four', | ||
| 'User five' | ||
| ]; | ||
| expect(OCA.Sharing.Util.formatRecipients(recipients)) | ||
| .toEqual('User four, User one, User three, User two, +1'); | ||
| }); | ||
| it('returns four recipients with plus when ten passed', function() { | ||
| var recipients = [ | ||
| 'User one', | ||
| 'User two', | ||
| 'User three', | ||
| 'User four', | ||
| 'User five', | ||
| 'User six', | ||
| 'User seven', | ||
| 'User eight', | ||
| 'User nine', | ||
| 'User ten' | ||
| ]; | ||
| expect(OCA.Sharing.Util.formatRecipients(recipients)) | ||
| .toEqual('User four, User one, User three, User two, +6'); | ||
| }); | ||
| it('returns four recipients with plus when four passed with counter', function() { | ||
| var recipients = [ | ||
| 'User one', | ||
| 'User two', | ||
| 'User three', | ||
| 'User four' | ||
| ]; | ||
| expect(OCA.Sharing.Util.formatRecipients(recipients, 10)) | ||
| .toEqual('User four, User one, User three, User two, +6'); | ||
| }); | ||
| }); | ||
|
|
||
| describe('Excluded lists', function() { | ||
| function createListThenAttach(listId) { | ||
| var fileActions = new OCA.Files.FileActions(); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel old, never heard of this before. Wow, even IE11 supports this http://caniuse.com/#feat=css-counters