diff --git a/.vscode/settings.json b/.vscode/settings.json index 93b185d14..3ae8e3cd7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,4 @@ { - "rubyLsp.rubyVersionManager": { - "identifier": "auto" - }, + "rubyLsp.rubyVersionManager": "auto", "rubyLsp.formatter": "rubocop", } diff --git a/app/assets/builds/.keep b/app/assets/builds/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/stylesheets/config/_generator.scss b/app/assets/stylesheets/config/_generator.scss index d33fedd74..4ae2b277d 100644 --- a/app/assets/stylesheets/config/_generator.scss +++ b/app/assets/stylesheets/config/_generator.scss @@ -161,13 +161,7 @@ '3': repeat(3, minmax(0, 1fr)), '4': repeat(4, minmax(0, 1fr)), '5': repeat(5, 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)) + '6': repeat(6, minmax(0, 1fr)) ), (), true diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb index 937abbd47..18c9cd208 100644 --- a/app/controllers/stories_controller.rb +++ b/app/controllers/stories_controller.rb @@ -207,7 +207,16 @@ class StoriesController < ApplicationController assign_user_github_repositories - @grouped_badges = @user.badge_achievements.order(id: :desc).includes(:badge).group_by(&:badge_id) + # @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 @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 5bb4d06d5..c317bd185 100644 --- a/app/views/users/_badges_area.html.erb +++ b/app/views/users/_badges_area.html.erb @@ -1,22 +1,19 @@