ideasbugs 0.7.4 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd02a4b6d94f04c5fe4533f1f9fe3e51a8d7d5a0d9508657fe0b01fc2ac83abe
4
- data.tar.gz: 6308208667e3d63aff2ec4750811e2a781ce06722ce54b8f4b44df0dba373171
3
+ metadata.gz: 557db9d9cbc47fc16e7f9ff26ebf1d95d77914c3796b0a4260368ca00905e3ae
4
+ data.tar.gz: e6d9b54315f9168159c77c60c08a13e2847d2edfb2e6d31ac6311619808bbad5
5
5
  SHA512:
6
- metadata.gz: a9b8082e850661015f81cbc9b0700f78a1e0eb2d4e0d155b75e761640270f01b5d670f219ac464a8c28346be7a6c4cc7d0d4acf88001fb4374cfe235abd6c228
7
- data.tar.gz: 5f7f874294bf4bd272aa1e31712e36595f7aa5911ce2ca6a1c5cf11be619d3f12616c7288b082aaea6f73d9c91f55ad269f5f3b015e1d0258ecc7d2cf3f47fef
6
+ metadata.gz: 0c7df315ef2d7bd4f3b2cb83f52bb927b922b484648061e82f1a9a8b61469f127c0009a4bdc401199c8203269720ca605324e278cc61eb7de3490dbbc03e1f27
7
+ data.tar.gz: 861a573a6bd3c751ebe2a8fa19e2b860bf95e650103729d9ae8a9d75c03c8c5ba35198ef7baced02f91b1ec19bbd28e7ff76521d64baf0506ac66b6383ace91c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.5 (2026-07-31)
4
+
5
+ - Added `config.admin_layout`, letting host apps render the Ideasbugs dashboard
6
+ inside their own admin layout while keeping the standalone gem layout as the
7
+ default.
8
+
3
9
  ## 0.7.4 (2026-07-31)
4
10
 
5
11
  - Redesigned the admin feedback dashboard into a two-column triage layout with
@@ -6,6 +6,10 @@ module Ideasbugs
6
6
 
7
7
  private
8
8
 
9
+ def ideasbugs_admin_layout
10
+ Ideasbugs.config.admin_layout
11
+ end
12
+
9
13
  def current_author
10
14
  return @current_author if defined?(@current_author)
11
15
 
@@ -4,7 +4,7 @@ module Ideasbugs
4
4
  class FeedbacksController < ApplicationController
5
5
  PER_PAGE = 50
6
6
 
7
- layout 'ideasbugs/application', except: :create
7
+ layout :ideasbugs_admin_layout, except: :create
8
8
 
9
9
  # The widget posts here; everything else is the triage dashboard.
10
10
  before_action :require_enabled, only: :create
@@ -8,6 +8,10 @@ Ideasbugs.configure do |config|
8
8
  # Who can browse and triage feedback at the mount path. Defaults to
9
9
  # development only — override before deploying.
10
10
  # config.authorize_admin = ->(request) { request.env["warden"]&.user&.admin? }
11
+ #
12
+ # Render the dashboard inside your app's admin layout. Default: the gem's
13
+ # standalone dashboard layout.
14
+ # config.admin_layout = "admin/application"
11
15
 
12
16
  # Attribute feedback to a user (optional). Return an object responding to
13
17
  # #id, or nil. Receives the request.
@@ -16,6 +16,10 @@ module Ideasbugs
16
16
  # deploying, e.g. with an admin check.
17
17
  attr_accessor :authorize_admin
18
18
 
19
+ # Layout used by the built-in dashboard. Override this to render Ideasbugs
20
+ # inside your app's admin shell, e.g. "admin/application".
21
+ attr_accessor :admin_layout
22
+
19
23
  # Resolve the current user for attribution (optional). Return an object
20
24
  # responding to #id, or nil. Receives the request.
21
25
  attr_accessor :current_user
@@ -79,6 +83,7 @@ module Ideasbugs
79
83
  def initialize
80
84
  @enabled = ->(_request) { true }
81
85
  @authorize_admin = ->(_request) { Rails.env.development? }
86
+ @admin_layout = 'ideasbugs/application'
82
87
  @current_user = ->(_request) {}
83
88
  @tenant = ->(_request) {}
84
89
  @author_label = ->(user) { user.respond_to?(:email) ? user.email : user&.to_s }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ideasbugs
4
- VERSION = '0.7.4'
4
+ VERSION = '0.7.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ideasbugs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov