Skip to content

Conversation

@mr-vinn
Copy link
Contributor

@mr-vinn mr-vinn commented Oct 12, 2014

Fixes #3910

This change improves the event note display in dashboard and project activity views:

  • Preserve link href values when the link text is truncated.
  • Display inline code in the first line of a note.
  • Only display "..." when the note contents are truncated.
  • If the note starts with a code block, display the first line instead of an empty <pre/> element.

Examples

Old

truncated_link_old

inline_code_old

plain_old

code_block_old

New

truncated_link_new

inline_code_new

plain_new

code_block_new

Notes on the dashboard views are truncated to 150 characters; this
change ensures that when a link's text is truncated it still points to
the correct URL.
@TeatroIO
Copy link

I've prepared a stage. Click to open.

Choose a reason for hiding this comment

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

Do not use %Q unless interpolation is needed. Use %q.

Update the `#first_line_in_markdown` method so that the first line of
parsed text is displayed more reliably, and the continuation indicators
("...") are displayed in all cases where the note is truncated.

Also add Rspec tests for `EventsHelper#event_note`.
@mr-vinn mr-vinn changed the title Preserve link href in truncated note view Improve event note display in dashboard and project activity views Oct 13, 2014
@dzaporozhets
Copy link
Contributor

@mr-vinn looks good!

dzaporozhets added a commit that referenced this pull request Oct 13, 2014
Improve event note display in dashboard and project activity views
@dzaporozhets dzaporozhets merged commit 4731d77 into gitlabhq:master Oct 13, 2014
@bbodenmiller
Copy link
Contributor

@mr-vinn @randx thank you for getting this!

bbodenmiller added a commit to bbodenmiller/gitlabhq that referenced this pull request Oct 13, 2014
Change log entry for gitlabhq#8020
@bbodenmiller bbodenmiller mentioned this pull request Oct 13, 2014
@mr-vinn mr-vinn deleted the note-trunc-link branch October 13, 2014 23:58
dzaporozhets added a commit that referenced this pull request Oct 14, 2014
Improve event note display in dashboard and project activity views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants