-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Matt noted two issues with the changeset: 1. It unintentionally removes the `truncated-list` class from the contributors list in the results. 2. The `list-inline` class provided by the style library styles list items with `inline-block`, not `inline`. When I went to fix issue 1, I realized that issue 2 impacts it: i.e., if the list items are `inline-block`, then `line-clamp` will not truncate them properly. This commit reintroduces `truncated-list` to the contributors list in the results views and adds a rule to display items inline. (The `list-inline` class is still applied, as it also removes the left margin from the `ul`.) This also changes how contributor kinds are rendered by refactoring that logic to a helper method and handling some edge cases. This is unrelated to the code review discussion, but I noticed it while fixing the CSS issues.
- Loading branch information
Showing
8 changed files
with
42 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
<%= return if contributors.blank? %> | ||
<% contribs_list = [] %> | ||
<% contributors&.each do |contributor| %> | ||
<% contribs_list << contributor %> | ||
<% end %> | ||
|
||
<span class="sr">Contributors: </span> | ||
<ul class="list-inline contributors"> | ||
<% contribs_list.uniq.map do |contributor| %> | ||
<% contributors.uniq.map do |contributor| %> | ||
<li> | ||
<%= "#{contributor['kind'].titleize}: " %><%= link_to contributor['value'], | ||
<%= render_contributor_type(contributor['kind']) %><%= link_to contributor['value'], | ||
results_path({ advanced: true, contributors: contributor['value'] }) %> | ||
</li> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters