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

component: add "read more" component #138

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

benerken
Copy link
Contributor

@benerken benerken commented Feb 17, 2020

Co-Authored-by: Benoit Erken erken.benoit@gmail.com
Co-Authored-by: Renaud Michotte renaud.michotte@gmail.com

Why are you opening this PR?

Create new "read more" component: truncate the text when it's too long and add a link to "show more"

image

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@benerken benerken self-assigned this Feb 17, 2020
@benerken benerken force-pushed the ucl-ng-text-truncate branch 2 times, most recently from e19a06e to f2dbabb Compare February 17, 2020 11:00
@benerken benerken force-pushed the ucl-ng-text-truncate branch 2 times, most recently from 03bca93 to 2e57b91 Compare February 17, 2020 14:44
@benerken benerken force-pushed the ucl-ng-text-truncate branch from 2e57b91 to 3a25a21 Compare February 18, 2020 14:04
Co-Authored-by: Benoit Erken <erken.benoit@gmail.com>
Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
return this.text;
} else {
if (this.limit < 0) {
const tmpLimit = this.limit * -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Math.abs(this.limit) to absolute value.

@sebdeleze sebdeleze merged commit 145b726 into rero:dev Feb 20, 2020
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

Successfully merging this pull request may close these issues.

3 participants