Prevent links in project descriptions from making project rows too wide
Compare changes
When project descriptions contain links, they can cause the rows on a user's contributed projects page to get too wide.
Note that this bug is very difficult to reproduce with test data. This bug depends on a combination of data conditions:
One reliable way to reproduce this is to apply the following patch to fake this data:
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index f21e41b33146..2995fc15d6b3 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -63,7 +63,8 @@
= link_to_markdown(project.commit.title, project_commit_path(project, project.commit), class: "commit-row-message")
- elsif project.description.present?
.description.gl-hidden.sm:gl-block.gl-overflow-hidden.gl-mr-3.gl-mt-2.gl-text-sm
- = markdown_field(project, :description)
+ -# = markdown_field(project, :description)
+ = link_to "https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/security/engineer.md", "https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/security/engineer.md"
- if project.topics.any?
.gl-mt-2
@@ -100,19 +101,23 @@
- if stars
= link_to project_starrers_path(project), class: "#{css_metadata_classes} stars", title: _('Stars'), data: { container: 'body', placement: 'top' } do
= sprite_icon('star-o', size: 14, css_class: 'gl-mr-2')
- = badge_count(project.star_count)
+ -# = badge_count(project.star_count)
+ = 999
- if show_count?(disabled: !forks, compact_mode: compact_mode)
= link_to project_forks_path(project), class: "#{css_metadata_classes} forks", title: _('Forks'), data: { container: 'body', placement: 'top' } do
= sprite_icon('fork', size: 14, css_class: 'gl-mr-2')
- = badge_count(project.forks_count)
+ -# = badge_count(project.forks_count)
+ = 999
- if show_count?(disabled: !merge_requests, compact_mode: compact_mode)
= link_to project_merge_requests_path(project), class: "#{css_metadata_classes} merge-requests", title: _('Merge requests'), data: { container: 'body', placement: 'top' } do
= sprite_icon('merge-request', size: 14, css_class: 'gl-mr-2')
- = badge_count(project.open_merge_requests_count)
+ -# = badge_count(project.open_merge_requests_count)
+ = 999
- if show_count?(disabled: !issues, compact_mode: compact_mode)
= link_to project_issues_path(project), class: "#{css_metadata_classes} issues", title: _('Issues'), data: { container: 'body', placement: 'top' } do
= sprite_icon('issues', size: 14, css_class: 'gl-mr-2')
- = badge_count(project.open_issues_count)
+ -# = badge_count(project.open_issues_count)
+ = 999
= render_if_exists 'shared/projects/actions', project: project
.updated-note.gl-text-sm.gl-whitespace-nowrap.gl-justify-end
%span
Related to #474921 (closed)