Commit Graph

20 Commits

Author SHA1 Message Date
Sean McGivern f9f9147290 Fix page_description helper performance
This helper is used for extracting part of the issue / MR / whatever
description for use in the description meta tag:

1. To do that, we look at the source of the Markdown description.
2. We then strip out all HTML tags.
3. And then take the first 30 words.

Doing that can be really slow - especially as Markdown is supposed to be
treated as plain text. There are many better ways to do this, but the
immediate performance fix is to swap steps 2 and 3. This does mean that
the description may be less than 30 words (or even empty), but it is
much faster when the description is very long.
2019-05-22 16:56:12 +01:00
Alexis Reigel a6f3f6b8cd
extract favicon logic to lib class 2018-06-05 16:20:19 +02:00
Alexis Reigel 8967fc0477
use custom main favicon 2018-06-05 16:20:19 +02:00
Eric Eastwood fca02e2476 Update styling and use Gitlab::Utils.to_boolean 2018-03-27 13:13:48 -05:00
Mike Greiling 7b262c4356 Resolve "Precompiled assets with digest strings are ignored in CI" 2017-10-03 14:47:56 +00:00
Bob Van Landuyt 458f3cf9b0 Update specs for new upload path 2017-07-18 15:38:54 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
DJ Mountney 1d1363e2bb Bring in security changes from the 9.2.5 release
Ran:
 - git format-patch v9.2.2..v9.2.5 --stdout > patchfile.patch
 - git checkout -b 9-2-5-security-patch origin/v9.2.2
 - git apply patchfile.patch
 - git commit
 - [Got the sha ref for the commit]
 - git checkout -b upstream-9-2-security master
 - git cherry-pick <SHA of the patchfile commit>
 - [Resolved conflicts]
 - git cherry-pick --continue
2017-06-07 21:16:20 -07:00
Simon Knox 679ce9dbb3 dev favicon is blue, not purple 2017-02-16 06:55:52 +11:00
Simon Knox e15032eded override favicon for development to find tabs more easily 2017-02-16 01:07:29 +11:00
Robert Speicher 01fc7633d0 Update Hamlit to 2.6.1
Fixes gitlab-org/gitlab-ce#21025 and gitlab-org/gitlab-ce#21017
2016-08-18 13:26:32 -05:00
Douwe Maan 384445eca6 Don't override issue page description in project layout. 2016-01-06 13:02:51 +01:00
Robert Speicher 43053c2e6f Make `page_description` less magical 2016-01-05 14:54:59 -05:00
Robert Speicher a298f69432 Use `User#avatar_url` instead of `avatar_icon` helper 2016-01-05 14:50:52 -05:00
Robert Speicher dcca64a523 Use `assign` instead of `instance_variable_set` 2015-12-27 19:58:44 -05:00
Robert Speicher a7756a4b51 Add specs for page_image using a Group's avatar 2015-12-27 19:49:48 -05:00
Robert Speicher ab3d855c0e Add support for `twitter:label` meta tags 2015-12-24 17:11:08 -05:00
Robert Speicher c6d2508362 Truncate page_description to 30 words 2015-12-24 16:26:52 -05:00
Robert Speicher 5a3b9c97e3 Account for `@project.description` being nil 2015-12-23 17:14:18 -05:00
Robert Speicher b26eb782f5 Add page descriptions and images
A limited number of pages have defined their own descriptions, but
otherwise we default to the Project's description (if `@project` is
set), or the old `brand_title` fallback.

The image will either be the uploaded project icon (never a generated
one), the user's uploaded icon or Gravatar, or, finally, the GitLab
logo.
2015-12-23 16:56:27 -05:00