David Tsiklauri
David Tsiklauri
I almost finished the code. I think it will be ready tomorrow. The idea is to truncate entries server-side and, for example, if we show only 1000 characters, estimate that...
This PR was updated. Now truncation is handled in the back end. After 1000 characters, entry is truncated and `...` are added to it. Every image is handled as 500...
PR was updated. Paragraph truncation was removed. Max length of the diary entry in the list was changed to 2000. Images now take size of 1000 character. Additional parsing to...
PR was updated. Truncation logic was moved to `RichText::Base` and now `.to_html` can take truncation length as an argument (if not provided, full content will be displayed).
@AntonKhorev Thank you for the review. PR was updated accordingly.
> If the truncation was the last step, I'd move to another module/class, which I'd use only when I need to truncate. But currently html conversion is followed by sanitize...
PR was updated. `master` was merged and merge conflicts were fixed. PR was changed according to reviews. @tomhughes to indicate if an entry has been truncated, as @AntonKhorev suggested, `See...
PR was updated. @AntonKhorev `truncate_html` was moved to be done after `linkify` and `sanitize`. @tomhughes visual of `See full entry` link was changed. Now it is separate from other links...
Thanks for the review @tomhughes. PR was updated according to the suggestion.
@tomhughes functionality of Wikimedia selector worked well from your PR, so I didn't touch any code of it. I can change it if we have any more lightweight or visually...