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

Better readability of long file and event names #3295

Closed

Conversation

Jerome-Herbinet
Copy link
Member

@Jerome-Herbinet Jerome-Herbinet commented Sep 26, 2022

Signed-off-by: Jérôme Herbinet [email protected]

Signed-off-by: Jérôme Herbinet [email protected]

Currently, in the right side panel, the labels end too easily with ellipsis dots. This is, from my personal and professional experience, too restrictive because we often cannot see the continuation of the file or event name (potentially also in any other similar case using this "vue"). It's a pain especially in Nextcloud Calendar but in Nextcloud Files too and probably in other apps.

I propose, with this change, to allow 3 lines to be displayed before the ellipsis.

Nextcloud Calendar test :
2022-09-26_16-01
2022-09-26_16-00_1
2022-09-26_16-00
2022-09-26_16-15

Nextcloud Files test :
2022-09-27_15-35
2022-09-26_15-57_1
2022-09-26_15-57
2022-09-26_15-56

Note :
My only point of hesitation concerns the management of long (or even very long) unbreakable words with the "hyphens" CSS property, which sometimes causes a hyphen to appear just above the suspension points.

Signed-off-by: Jérôme Herbinet <[email protected]>

Signed-off-by: Jérôme Herbinet <[email protected]>
@raimund-schluessler
Copy link
Contributor

This property is only part of the CSS Overflow Module Level 3 specification which is not yet finalized. While the browser support seems to be surprisingly good, I am not sure, we should/want to use this property already.

@skjnldsv @marcoambrosini for opinions.

This PR would supersede #1788.

text-overflow: ellipsis;
display: -webkit-box;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to also add the non webkit variant

Copy link
Member Author

@Jerome-Herbinet Jerome-Herbinet Sep 28, 2022

Choose a reason for hiding this comment

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

Hello @juliushaertl, I did some research this morning, and it seems that there are no specific tags for non-webkit browsers.
"display: -webkit-box" has no equivalent and seems to be compatible with all current browsers, except maybe Opera Mini and Internet Explorer (which is no longer maintained ... thank god). Moreover, the Firefox development tool does not know "display: -moz-box" for example and there is no "display: box" (for exemple as well). Also, "-webkit-line-clamp" and "-webkit-box-orient" seem to have no equivalent either and are, against all current appearances, compatible with the vast majority of current browsers. No CSS error in the Firefox inspector tool. All the research I've done on information on this subject, dating back less than a year, all leads to this set of properties, whether it's discussions, forums, blog posts, docs, etc:

display: -webkit-box;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;

What I say is not gospel, but I think these properties are worth trying (the risk of a problem seems very low if there is one). What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, this property is weird and unfortunately there is no non-webkit options.
Firefox supports it though https://caniuse.com/?search=webkit-box

@Jerome-Herbinet
Copy link
Member Author

Jerome-Herbinet commented Sep 28, 2022

And what do you think of the question I was asking myself, concerning the hyphenation with the use of the CSS hyphen property. I said:
My only point of hesitation concerns the management of long (or even very long) unbreakable words with the "hyphens" CSS property, which sometimes causes a hyphen to appear just above the suspension points.

@Jerome-Herbinet Jerome-Herbinet added the 3. to review Waiting for reviews label May 29, 2023
@skjnldsv
Copy link
Contributor

@skjnldsv skjnldsv added the feature: app-sidebar Related to the app-sidebar component label May 31, 2023
@Jerome-Herbinet
Copy link
Member Author

cypress if failing :( It needs a snapshot update

https://github.com/nextcloud/nextcloud-vue/blob/ad9e43cce49e7df19ec07b72781bf985302decec/package.json#L32

What should I do in this case ? 🤔

@Jerome-Herbinet
Copy link
Member Author

cypress if failing :( It needs a snapshot update

https://github.com/nextcloud/nextcloud-vue/blob/ad9e43cce49e7df19ec07b72781bf985302decec/package.json#L32

@skjnldsv can you tell me how to solve this problem (first time for me) ? Thx

@skjnldsv
Copy link
Contributor

skjnldsv commented Jun 7, 2023

@skjnldsv can you tell me how to solve this problem (first time for me) ? Thx

npm run cypress:update-snapshots

@Jerome-Herbinet
Copy link
Member Author

npm run cypress:update-snapshots

2023-06-07_13-13

@Jerome-Herbinet
Copy link
Member Author

@skjnldsv can you tell me how to solve this problem (first time for me) ? Thx

npm run cypress:update-snapshots

If too complicated, I can replace this PR with a new one @skjnldsv, what do you think ?

@raimund-schluessler
Copy link
Contributor

You need to download the snapshots from the Github Cypress action. Updating the snapshots on your local machine likely won't work, as the snapshots generated will be different.

@Jerome-Herbinet
Copy link
Member Author

New PR #4194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews feature: app-sidebar Related to the app-sidebar component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants