Skip to content
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

Fix long display names #27059

Closed
wants to merge 7 commits into from
Closed

Fix long display names #27059

wants to merge 7 commits into from

Conversation

felixheidecke
Copy link
Contributor

@felixheidecke felixheidecke commented Jan 31, 2017

Description

  • Show length of shared with string based on viewport.
  • Refactoring code sole in CSS (dropping JS where not needed)

Motivation and Context

Using long display names causes problems in the "Shared with others" view of the files app wich leads to overlapping text. See https://github.com/owncloud/enterprise/issues/1195

How Has This Been Tested?

Browsertestet on latest

  • FF
  • Chrome
  • IE11

Screenshots (if appropriate):

problem_with_long_display_names

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

append comma and count via html
add extra classes to be styled
drop formatRecipients tests,
adapt tests,
fix typo
drop formatRecipients tests,
adapt tests,
fix typo
…core into fix_long_display_names

* 'fix_long_display_names' of https://github.com/owncloud/core:
  Drop formatRecipients() method, drop formatRecipients tests, adapt tests, fix typo
Copy link

@michaelstingl michaelstingl left a comment

Choose a reason for hiding this comment

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

Does this work with extraordinary long displaynames as shown in https://github.com/owncloud/enterprise/issues/1195 ?

reduce max shown names by 1
@@ -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');
Copy link
Member

Choose a reason for hiding this comment

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

no , ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the comma will be added via CSS :after { content: "," }, there will be no comma separation in the result.

@PVince81
Copy link
Contributor

PVince81 commented Jan 31, 2017

Steps:

  1. Share with 4 crazily named users (in their display names)
  2. Go to "Shared with others"
  3. Enlarge the window gradually:
    displayname1
  4. Enlarge further, a little stray comma appears
    displayname2
  5. Enlarge event further
    displayname3
  6. Open the sidebar
    displayname4

@PVince81
Copy link
Contributor

this was with Chromium 55

opacity: 0;
display: block;
float: left;
counter-increment: shared-with-recipient;
Copy link
Contributor

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

@felixheidecke
Copy link
Contributor Author

This brings me to the conclusion, that usernames need to be trimmed to a max length also.
I'll be back at it today.

@individual-it individual-it mentioned this pull request Feb 21, 2017
9 tasks
@individual-it individual-it mentioned this pull request Mar 6, 2017
9 tasks
Copy link
Contributor

@cdamken cdamken left a comment

Choose a reason for hiding this comment

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

👍

@PVince81
Copy link
Contributor

don't merge, the issues I mentionned were not fixed

@pako81
Copy link
Contributor

pako81 commented Apr 7, 2017

Will this solve the overlapping issue also in the "All files" view or rather only in the "Shared with others" one ? I am asking since the same issue has been reported in the "All files" view as well.

@cdamken
Copy link
Contributor

cdamken commented Apr 10, 2017

Would it be possible to backport to 9.X version?

@PVince81 PVince81 added this to the 10.0.1 milestone Apr 26, 2017
@PVince81 PVince81 removed this from the 10.0 milestone Apr 26, 2017
@felixboehm
Copy link
Contributor

No backport please.

@felixboehm
Copy link
Contributor

@felixheidecke can you fix open issues?

@felixheidecke
Copy link
Contributor Author

Was fixed with #28872

@felixheidecke felixheidecke deleted the fix_long_display_names branch September 7, 2017 11:30
@DeepDiver1975 DeepDiver1975 modified the milestones: 10.1, backlog Oct 10, 2017
@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants