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

Wordwrap/break of Organisation Titles #2754

Closed
Aaron-M opened this issue Nov 23, 2015 · 9 comments
Closed

Wordwrap/break of Organisation Titles #2754

Aaron-M opened this issue Nov 23, 2015 · 9 comments
Assignees

Comments

@Aaron-M
Copy link

Aaron-M commented Nov 23, 2015

After upgrading we have found that on the Organisations page (e.g. https://datastore.landcareresearch.co.nz/organization) the headings of the organisations are not breaking correctly at word breaks, but rather cutting words into bits e.g. below. We have discovered that this is browser influenced – it displays correctly in Chrome, as below (Fig1) in Firefox, and partly OK in IE (the word breaks are correct, but it only displays 2 columns (Fig2).
Firefox:
fig1 firefox
IE:
fig2 ie

The word break issue also occurs elsewhere Organisation names are displayed e.g. https://datastore.landcareresearch.co.nz/dataset/nzflora-fife-2014-anomodontaceae, not just the Organisation Page(s).

This issue has developed in the update path from CKAN 2.2.1 to 2.3, and continued into 2.4.1.

This problem is also evident on demo.ckan.org http://demo.ckan.org/organization?sort=&q=&page=2 (and e.g. http://demo.ckan.org/organization/department-of-agriculture).
fig4 ie - ckan demo

Behaviour is not consistent e.g In IE this organisation displays OK on the Organisation page . http://demo.ckan.org/organization?sort=&q=&page=2

fig5 ie ckan demo

But, click into the organisation and the words break incorrectly (http://demo.ckan.org/organization/consumer-financial-protection-bureau).

fig6 ie ckan demo

In Firefox I get the split P rotection in both ‘views’. In Chrome is fine.

@amercader amercader self-assigned this Nov 24, 2015
@k-nut
Copy link
Contributor

k-nut commented May 27, 2016

This behavior was introduced by commit 50c3114 which was a part of PR #1667 which was supposed to fix #1538.

Unfortunately the original issue did not contain any screenshots so it is not easy to see what they were referring to with make a mess of the display.

@TkTech
Copy link
Member

TkTech commented May 27, 2016

reallylongonewordorganizationtitlebecausesomelanguagesarelikethat Simply splitting on word boundaries as understood by the browser isn't sufficient for many languages that don't have distinctive word breaks.

@k-nut
Copy link
Contributor

k-nut commented May 27, 2016

@TkTech yep, I also just realized that here are screenshots that display before and after behavior with a group called Groupwithatveryveryverylongnamethatprobablybreakthedisplay:

Before the change

screen shot 2016-05-27 at 17 18 29

After the change

screen shot 2016-05-27 at 17 19 02

It would probably be best if we could limit this to only break words that are much too long. Or use automatic hyphenation which unfortunately only has medium support: http://caniuse.com/#feat=css-hyphens

@TkTech
Copy link
Member

TkTech commented May 27, 2016

Support for word breaks have historically been slowly and painful implemented. The only "portable" way I know of at the moment is to use a css rule to always break-on-character and use a bit of javascript to fix it live, which can cause redrawing and a visually jarring user experience when the page loads. Boundary analysis is a real pain when working with multiple languages.

@wardi
Copy link
Contributor

wardi commented May 27, 2016

burn all the grids!

@k-nut
Copy link
Contributor

k-nut commented May 27, 2016

We could for example include the hyphenator polyfill to make this work on browsers that do not support hyphen: auto by default.
At first glance it seems like it weighs in at 134 KB
Whats the CKAN-policy on things like this?

@TkTech
Copy link
Member

TkTech commented May 27, 2016

https://github.com/mnater/Hyphenator/blob/wiki/en_AddNewLanguage.md#what-we-have-now

It seems it has considerable multilanguage support, thus I'm in favour of it. 134kb of static content is irrelevant compared to the weight of existing uncached pages.

@wardi
Copy link
Contributor

wardi commented May 27, 2016

or we could use a list instead of a grid and just show the whole group name in a nice easy-to-scan way. Less space wasted on group images too.

@k-nut k-nut self-assigned this Jun 2, 2016
@kmbn
Copy link
Contributor

kmbn commented Jan 22, 2019

We decided to close old issues that are not actively worked on so that we can focus our effort and attention on issues affecting the current versions of CKAN.

If this issue is still affecting the version of CKAN you're working with now, please feel free to comment or reopen the issue.

If you do reopen this issue, please update it with new details. One reason it might not have been resolved in the past is that it wasn't clear how a contributor could address the issue.

@kmbn kmbn closed this as completed Jan 22, 2019
@kmbn kmbn unassigned k-nut Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants