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

Delegate truncation to CSS #446

Closed
asmecher opened this issue Apr 2, 2015 · 4 comments
Closed

Delegate truncation to CSS #446

asmecher opened this issue Apr 2, 2015 · 4 comments
Assignees
Milestone

Comments

@asmecher
Copy link
Member

asmecher commented Apr 2, 2015

Use of the "truncate" smarty modifier should be dropped where it's used to shorten up content presented in the front end (which is pretty much everywhere it's used). This should be done on the CSS side instead, using "ellipsis" overflow rules.

See: http://forum.pkp.sfu.ca/t/review-form-items-in-ojs/229

@asmecher asmecher added this to the OJS 3.0 milestone Apr 2, 2015
@asmecher
Copy link
Member Author

@NateWr, OTOH you introduced a pattern for "show more" / "show less" links... Do you remember OTOH? (It's possible I'm inventing this memory)

@asmecher asmecher self-assigned this Apr 20, 2016
asmecher added a commit that referenced this issue Apr 20, 2016
asmecher added a commit to pkp/ojs that referenced this issue Apr 20, 2016
@NateWr
Copy link
Contributor

NateWr commented Apr 20, 2016

The CSS ellipsis property only works for truncating single-line text strings.

There are two other "show more" patterns for multi-line content.

The ExtrasOnDemand control is good for hiding larger chunks of the UI. It has a title and wraps its content in a visual container. So it's right for hiding groups of form controls, for instance.

The RevealMoreHandler is good for truncating multi-line text which you want to be able to reveal in full when requested. For instance, we use this to show a few lines of the reviewer's comments and allow in-place expanding to view the whole comment. Once expanded it can't be collapsed.

@asmecher
Copy link
Member Author

Thanks, @NateWr, that's just what I was looking for.

asmecher added a commit that referenced this issue Apr 20, 2016
@asmecher
Copy link
Member Author

There's pretty much no hard-coded truncation in the templates anymore. Content with this for OJS 3.0.

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

2 participants