diff --git a/app/assets/stylesheets/config/_generator.scss b/app/assets/stylesheets/config/_generator.scss
index 4ae2b277d..d33fedd74 100644
--- a/app/assets/stylesheets/config/_generator.scss
+++ b/app/assets/stylesheets/config/_generator.scss
@@ -161,7 +161,13 @@
'3': repeat(3, minmax(0, 1fr)),
'4': repeat(4, minmax(0, 1fr)),
'5': repeat(5, minmax(0, 1fr)),
- '6': repeat(6, minmax(0, 1fr))
+ '6': repeat(6, minmax(0, 1fr)),
+ '7': repeat(7, minmax(0, 1fr)),
+ '8': repeat(8, minmax(0, 1fr)),
+ '9': repeat(9, minmax(0, 1fr)),
+ '10': repeat(10, minmax(0, 1fr)),
+ '11': repeat(11, minmax(0, 1fr)),
+ '12': repeat(12, minmax(0, 1fr))
),
(),
true
diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb
index 18c9cd208..937abbd47 100644
--- a/app/controllers/stories_controller.rb
+++ b/app/controllers/stories_controller.rb
@@ -207,16 +207,7 @@ class StoriesController < ApplicationController
assign_user_github_repositories
- # @badges_limit is here and is set to 6 because it determines how many badges we will display
- # on Profile sidebar widget. If user has more badges, we hide them and let them be revealed
- # by clicking "See more" button (because we want to save space etc..). But why 6 exactly?
- # To make that widget look good:
- # - On desktop it will have 3 rows, each row with 2 badges.
- # - On mobile it will have 2 rows, each row with 3 badges.
- # So it's always 6. If we make it higher or lower number, we would have to sacrifice UI:
- # - Let's say it's `4`. On mobile it would display two rows: 1st with 3 badges and
- # 2nd with 1 badge (!) <-- and that would look off.
- @badges_limit = 6
+ @grouped_badges = @user.badge_achievements.order(id: :desc).includes(:badge).group_by(&:badge_id)
@profile = @user.profile.decorate
@is_user_flagged = Reaction.where(user_id: session_current_user_id, reactable: @user).any?
diff --git a/app/views/users/_badges_area.html.erb b/app/views/users/_badges_area.html.erb
index c317bd185..5bb4d06d5 100644
--- a/app/views/users/_badges_area.html.erb
+++ b/app/views/users/_badges_area.html.erb
@@ -1,19 +1,22 @@