Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messageboard grid: Incomplete rows up to 6 cells #754

Merged
merged 1 commit into from Oct 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/assets/stylesheets/thredded/components/_messageboard.scss
Expand Up @@ -157,6 +157,11 @@
}
}

// A helper class for sizing incomplete rows with more than two missing items.
.thredded--grid-sizer {
@extend %thredded--messageboards-cell-flex;
}

.thredded--messageboard {
@extend %thredded--messageboards-cell-flex;
margin-top: $margin-y;
Expand Down
2 changes: 2 additions & 0 deletions app/views/thredded/messageboards/_grid_sizers.html.erb
@@ -0,0 +1,2 @@
<%# Ensures that cells in incomplete rows are sized correctly (up to 5 missing cells). %>
<i class="thredded--grid-sizer"></i><i class="thredded--grid-sizer"></i><i class="thredded--grid-sizer"></i>
1 change: 1 addition & 0 deletions app/views/thredded/messageboards/index.html.erb
Expand Up @@ -15,6 +15,7 @@
<%= render partial: 'thredded/messageboards/messageboard',
collection: group.messageboards %>
<% end %>
<%= render partial: 'thredded/messageboards/grid_sizers' %>
</div>
<% end %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/app/models/user.rb
Expand Up @@ -3,7 +3,7 @@
class User < ActiveRecord::Base
validates :name, presence: true

# Finds the post by its ID, or raises {Errors::UserNotFound}.
# Finds the user by their ID or raises {Errors::UserNotFound}.
# @param id [String, Number]
# @return [User]
# @raise [Errors::UserNotFound] if the user with the given ID does not exist.
Expand Down