Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ac242aa
Merge branch 'menu-show-hide' into staging
minkhantkyaw35 Jul 18, 2025
10bd9be
Merge branch 'main' into staging
minkhantkyaw35 Jul 18, 2025
b1dc0fb
Merge branch 'menu-show-hide' into staging
minkhantkyaw35 Jul 18, 2025
4138575
Merge branch 'main' into staging
minkhantkyaw35 Jul 21, 2025
5f2c1bb
Merge branch 'main' into staging
minkhantkyaw35 Jul 21, 2025
010d9cb
Merge branch 'menu-show-hide' into staging
minkhantkyaw35 Jul 21, 2025
1ac17cf
Merge branch 'menu-show-hide' into staging
minkhantkyaw35 Jul 21, 2025
15559d9
Merge branch 'menu-show-hide' into staging
minkhantkyaw35 Jul 22, 2025
bb4281f
Merge branch 'main' into staging
minkhantkyaw35 Jul 22, 2025
44d5960
Merge pull request #182 from patchwork-hub/main
kirankarki Jul 22, 2025
2281590
Merge branch 'main' into staging
minkhantkyaw35 Jul 23, 2025
217bf9a
Merge branch 'main' into staging
minkhantkyaw35 Jul 23, 2025
e847ee5
Merge branch 'main' into staging
minkhantkyaw35 Jul 23, 2025
089b68d
Merge branch 'main' into staging
minkhantkyaw35 Jul 23, 2025
652cc38
Merge branch 'main' into staging
minkhantkyaw35 Jul 24, 2025
ef4bab0
Merge branch 'main' into staging
minkhantkyaw35 Jul 24, 2025
1bb7f84
Merge branch 'main' into staging
minkhantkyaw35 Jul 28, 2025
79484ea
Merge branch 'main' into staging
minkhantkyaw35 Jul 28, 2025
dc5928a
Merge branch 'main' into staging
minkhantkyaw35 Jul 28, 2025
0362f7a
Merge branch 'main' into staging
minkhantkyaw35 Jul 28, 2025
5e9ee7f
Merge branch 'exclude_not_recommended'
minkhantkyaw35 Jul 28, 2025
75f2a3a
Merge branch 'bullet-gem' into staging
minkhantkyaw35 Jul 28, 2025
34a1a0f
Merge branch 'feat-global-keywords' into staging
minkhantkyaw35 Jul 29, 2025
ac7e3ff
Merge branch 'main' into staging
minkhantkyaw35 Jul 30, 2025
6861045
Merge branch 'main' into staging
minkhantkyaw35 Jul 30, 2025
1e6b281
Merge branch 'main' into staging
minkhantkyaw35 Jul 30, 2025
e7c12d7
Merge pull request #188 from patchwork-hub/main
kirankarki Aug 5, 2025
e9c539c
git push
kirankarki Aug 5, 2025
72fbc48
Refactor un-mute list section
kirankarki Aug 5, 2025
21dd80a
Merge branch 'main' into staging
kirankarki Aug 5, 2025
506df70
Modify search logic
kirankarki Aug 5, 2025
187fe6b
Call the helper
kirankarki Aug 5, 2025
13bc3be
Add missing helper file
kirankarki Aug 5, 2025
e0da4b2
Unify the result
kirankarki Aug 5, 2025
b62408a
Fix typo issue
kirankarki Aug 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/services/contributor_search_service.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
class ContributorSearchService
include ActionView::Helpers::TextHelper
include ActionView::Helpers::AssetTagHelper
include ApplicationHelper

def initialize(query, options = {})
@query = query
@api_base_url = options[:url]
Expand Down Expand Up @@ -41,7 +45,7 @@ def find_saved_accounts_with_retry(accounts)
{
'id' => account.id.to_s,
'username' => account.username,
'display_name' => account.display_name,
'display_name' => render_custom_emojis(account.display_name),
'domain' => account.domain,
'note' => account.note,
'avatar_url' => account.avatar_url,
Expand Down
9 changes: 6 additions & 3 deletions app/views/communities/_form_step4.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@
%td{ style: 'width: 10%;' }
%img{ alt: "", src: account.avatar_url, class: "rounded-circle mr-2", style: "width: 70px; height: 70px; border: 2px solid white;" }
%td{ style: 'width: 80%;' }
%h6.mb-0= account.username
%p.text-muted.mb-0= raw(account.note)
%td{ style: 'width: 10%;' }
= render_custom_emojis(account.display_name)
- domain = account&.domain.present? ? "https://#{account.domain}" : ENV.fetch('MASTODON_INSTANCE_URL', nil)
%br
%a{ href: "#{account.url}", target: "_blank" }= "@#{account.username}@#{account.domain || 'channel.org'}"
%td{style: "width: 60px;"}
= form_with url: unmute_contributor_community_path, method: :post, remote: true, authenticity_token: true do |form|
= form.hidden_field :account_id, value: account.id
%button.btn.btn-sm.btn-outline-secondary{ type: 'submit' }
Unmute

.pagination.pagination-sm.m-0.float-right
= paginate @muted_accounts, theme: 'bootstrap4'

Expand Down
4 changes: 2 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

require 'doorkeeper'

# require_relative '../lib/middleware/bullet_logger'
# require_relative '../lib/middleware/query_profiler'
require_relative '../lib/middleware/bullet_logger'
require_relative '../lib/middleware/query_profiler'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Expand Down
28 changes: 14 additions & 14 deletions config/initializers/bullet.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# if Rails.env.development? || Rails.env.local?
# require 'stringio'
# require 'logger'
# Bullet.enable = true
# Bullet.alert = true
# Bullet.bullet_logger = true
# Bullet.console = true
# Bullet.rails_logger = true
# Bullet.add_footer = false # Disable HTML injection for APIs
if Rails.env.development? || Rails.env.local?
require 'stringio'
require 'logger'
Bullet.enable = true
Bullet.alert = true
Bullet.bullet_logger = true
Bullet.console = true
Bullet.rails_logger = true
Bullet.add_footer = false # Disable HTML injection for APIs

# # For Postman/N+1 detection in logs:
# ActiveSupport::Notifications.subscribe('n_plus_one_query') do |event|
# Rails.logger.warn "N+1 Query detected: #{event.payload[:message]}"
# end
# end
# For Postman/N+1 detection in logs:
ActiveSupport::Notifications.subscribe('n_plus_one_query') do |event|
Rails.logger.warn "N+1 Query detected: #{event.payload[:message]}"
end
end
20 changes: 10 additions & 10 deletions config/initializers/rack_profiler.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
return unless Rails.env.development?
if Rails.env.development?
begin
require 'rack-mini-profiler'

begin
require 'rack-mini-profiler'
# Start the profiler
::Rack::MiniProfilerRails.initialize!(Rails.application)

# Start the profiler
::Rack::MiniProfilerRails.initialize!(Rails.application)

# Optional: Customize settings
Rack::MiniProfiler.config.position = 'bottom' # display at bottom of page
rescue LoadError => e
Rails.logger.warn "rack-mini-profiler not available: #{e.message}"
# Optional: Customize settings
Rack::MiniProfiler.config.position = 'bottom' # display at bottom of page
rescue LoadError => e
Rails.logger.warn "rack-mini-profiler not available: #{e.message}"
end
end
40 changes: 20 additions & 20 deletions lib/middleware/bullet_logger.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# class BulletLogger
# def initialize(app)
# @app = app
# end
class BulletLogger
def initialize(app)
@app = app
end

# def call(env)
# warnings = []
# subscriber = ActiveSupport::Notifications.subscribe('n_plus_one_query') do |event|
# warnings << event.payload[:message] rescue nil
# end
def call(env)
warnings = []
subscriber = ActiveSupport::Notifications.subscribe('n_plus_one_query') do |event|
warnings << event.payload[:message] rescue nil
end

# status, headers, response = @app.call(env)
status, headers, response = @app.call(env)

# ActiveSupport::Notifications.unsubscribe(subscriber)
ActiveSupport::Notifications.unsubscribe(subscriber)

# if warnings.any?
# headers['X-N-Plus-One-Warnings'] = warnings.to_json
# end
if warnings.any?
headers['X-N-Plus-One-Warnings'] = warnings.to_json
end

# [status, headers, response]
# rescue => e
# Rails.logger.error "BulletLogger Error: #{e.message}"
# @app.call(env) # Fallback to original request
# end
# end
[status, headers, response]
rescue => e
Rails.logger.error "BulletLogger Error: #{e.message}"
@app.call(env) # Fallback to original request
end
end
Loading