trestle-search 0.5.0.pre → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c42f02ebcaea688ddcd3f938ad244560945d07ba240b78d255284125166501cf
4
- data.tar.gz: 159eb551a40014b4f2fb4736b839496ee70d19690a3806003626baccd633926b
3
+ metadata.gz: c1ba3963b3be70834383be75f9ea8b4babd68c0555cb0757dc4bbc100ae27bb3
4
+ data.tar.gz: d267ebc746d46782983543e656959cd2f34a060fdd15fac1d26e544c567e0cbd
5
5
  SHA512:
6
- metadata.gz: 192f8bbd91cfa90d09330150ab05873fa7fee38a94b58063ab827fd919c7b2e2679ce32e4352417d7e4948e93878b78c81e80f5762a33fc89d1dfbc911018a67
7
- data.tar.gz: a49ef3f81ea20a99616e743d6194693d93b0976466b1331202294890b24e20fa727e324608a594903ebda08b1ecfcf6a5187a13194e01f66fa83219aa0776404
6
+ metadata.gz: 4520214c2670c705604957686d9261234189e4cdea69e2e34d6e0f742d84f4dae74d5c99b2496dc5fd20607971f4ec6aabe998c027c68e2e8666421a71aab15b
7
+ data.tar.gz: 4e96a03daf68830169aa0a4ca005e81529fdd886361ca774289e2f493a26ec1861e944395b50e17966d28d0231c4da381a42a97a4ccac7ae03f9d17c99df9bba
@@ -0,0 +1,26 @@
1
+ name: Publish gem
2
+
3
+ on: workflow_dispatch
4
+
5
+ jobs:
6
+ push:
7
+ runs-on: ubuntu-latest
8
+
9
+ permissions:
10
+ contents: write
11
+ id-token: write
12
+
13
+ # If you configured a GitHub environment on RubyGems, you must use it here.
14
+ environment: release
15
+
16
+ steps:
17
+ # Set up
18
+ - uses: actions/checkout@v4
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ bundler-cache: true
23
+ ruby-version: ruby
24
+
25
+ # Release
26
+ - uses: rubygems/release-gem@v1
@@ -7,9 +7,11 @@ jobs:
7
7
  strategy:
8
8
  fail-fast: false
9
9
  matrix:
10
- gemfile: [ rails-5.2, rails-6.0, rails-6.1 ]
11
- ruby: [ '2.7' ]
12
10
  include:
11
+ - gemfile: rails-6.0
12
+ ruby: '2.7'
13
+ - gemfile: rails-6.1
14
+ ruby: '2.7'
13
15
  - gemfile: rails-6.1
14
16
  ruby: '3.0'
15
17
  - gemfile: rails-7.0
data/Gemfile CHANGED
@@ -1,13 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in trestle-auth.gemspec
4
- gemspec
5
-
6
3
  group :test do
7
4
  gem "rspec-rails"
8
5
 
9
6
  gem 'coveralls_reborn', require: false
10
- gem "capybara"
7
+ gem "capybara", ">= 3.39.0"
11
8
 
12
9
  gem "sqlite3", "~> 1.4"
13
10
  end
@@ -16,3 +13,6 @@ gem "rails", "~> 7.1.0"
16
13
  gem "sprockets-rails"
17
14
 
18
15
  gem "trestle", github: "TrestleAdmin/trestle"
16
+
17
+ # Specify your gem's dependencies in trestle-search.gemspec
18
+ gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Trestle Search (trestle-search)
2
2
 
3
- [![RubyGem](https://img.shields.io/gem/v/trestle-search.svg?style=flat&colorB=4065a9)](https://rubygems.org/gems/trestle-search)
3
+ [![RubyGem](https://img.shields.io/gem/v/trestle-search?include_prereleases&color=%234d6bb2)](https://rubygems.org/gems/trestle-search)
4
4
  [![Build Status](https://img.shields.io/github/actions/workflow/status/TrestleAdmin/trestle-search/rspec.yml?style=flat)](https://github.com/TrestleAdmin/trestle-search/actions)
5
5
  [![Coveralls](https://img.shields.io/coveralls/TrestleAdmin/trestle-search.svg?style=flat)](https://coveralls.io/github/TrestleAdmin/trestle-search)
6
6
 
@@ -1 +1 @@
1
- .searchbox{margin-right:auto;max-width:30em;width:100%}.searchbox .input-group{background:#fff;border:1px solid #ccc;border-radius:50rem}.searchbox .form-control,.searchbox .input-group-text{background:transparent;border:0}.searchbox .form-control{box-shadow:none;padding-left:0}.searchbox .form-control::-webkit-search-cancel-button{display:none}.searchbox .clear-search{color:#555;font-size:1.2rem;padding:.35rem;position:absolute;right:.75rem;z-index:5}.searchbox .clear-search:focus,.searchbox .clear-search:hover{color:#333}
1
+ .searchbox{margin-right:auto;max-width:30em;width:100%}.searchbox .input-group{background:#fff;border:1px solid #ccc;border-radius:50rem}.searchbox .form-control,.searchbox .input-group-text{background:transparent;border:0}.searchbox .form-control{box-shadow:none;padding-left:0}.searchbox .form-control::-webkit-search-cancel-button{display:none}.searchbox .btn-clear-search{--bs-btn-padding-y:0;--bs-btn-font-size:1.325rem;--bs-btn-color:#555;--bs-btn-hover-color:#333}@media(min-width:576px){.searchbox .btn-clear-search{--bs-btn-font-size:1.25rem}}
@@ -1,9 +1,13 @@
1
1
  <div class="searchbox">
2
- <%= form_tag admin.path, method: :get do %>
2
+ <%= form_tag admin.path, method: :get, data: { turbo_frame: "main" } do %>
3
+ <%= serialize_persistent_params except: :q %>
4
+
3
5
  <div class="input-group">
4
- <span class="input-group-text"><icon class="fa fa-search"></icon></span>
5
- <%= link_to icon("fa fa-times"), admin.path, class: "clear-search" if params[:q].present? %>
6
+ <%= label_tag :q, icon("fas fa-search"), class: "input-group-text" %>
7
+
6
8
  <%= search_field_tag :q, params[:q], class: "form-control", autocomplete: "off", placeholder: admin.t("search.placeholder", default: "Search") %>
9
+
10
+ <%= link_to icon("fas fa-times"), persistent_params.except(:q), class: "btn btn-clear-search", data: { turbo_frame: "main" } if params[:q].present? %>
7
11
  </div>
8
12
  <% end %>
9
13
  </div>
data/frontend/index.scss CHANGED
@@ -1,3 +1,5 @@
1
+ @import "~trestle/frontend/css/support";
2
+
1
3
  .searchbox {
2
4
  width: 100%;
3
5
  max-width: 30em;
@@ -27,16 +29,14 @@
27
29
  }
28
30
  }
29
31
 
30
- .clear-search {
31
- position: absolute;
32
- right: 0.75rem;
33
- z-index: 5;
34
- color: #555;
35
- font-size: 1.2rem;
36
- padding: 0.35rem;
32
+ .btn-clear-search {
33
+ --bs-btn-padding-y: 0;
34
+ --bs-btn-font-size: 1.325rem;
35
+ --bs-btn-color: #555;
36
+ --bs-btn-hover-color: #333;
37
37
 
38
- &:hover, &:focus {
39
- color: #333;
38
+ @include media-breakpoint-up(sm) {
39
+ --bs-btn-font-size: 1.25rem;
40
40
  }
41
41
  }
42
42
  }
@@ -5,7 +5,7 @@ group :test do
5
5
 
6
6
  gem "coveralls_reborn", require: false
7
7
 
8
- gem "capybara"
8
+ gem "capybara", ">= 3.39.0"
9
9
  gem "sqlite3", "~> 1.4"
10
10
  end
11
11
 
@@ -5,7 +5,7 @@ group :test do
5
5
 
6
6
  gem "coveralls_reborn", require: false
7
7
 
8
- gem "capybara"
8
+ gem "capybara", ">= 3.39.0"
9
9
  gem "sqlite3", "~> 1.4"
10
10
  end
11
11
 
@@ -5,7 +5,7 @@ group :test do
5
5
 
6
6
  gem "coveralls_reborn", require: false
7
7
 
8
- gem "capybara"
8
+ gem "capybara", ">= 3.39.0"
9
9
  gem "sqlite3", "~> 1.4"
10
10
  end
11
11
 
@@ -5,7 +5,7 @@ group :test do
5
5
 
6
6
  gem "coveralls_reborn", require: false
7
7
 
8
- gem "capybara"
8
+ gem "capybara", ">= 3.39.0"
9
9
  gem "sqlite3", "~> 1.4"
10
10
  end
11
11
 
@@ -1,5 +1,5 @@
1
1
  module Trestle
2
2
  module Search
3
- VERSION = "0.5.0.pre"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trestle-search",
3
- "version": "0.5.0.pre",
3
+ "version": "0.5.1",
4
4
  "description": "Search plugin for the Trestle admin framework",
5
5
  "main": "index.scss",
6
6
  "repository": "https://github.com/TrestleAdmin/trestle-search.git",
@@ -13,16 +13,16 @@
13
13
  "watch": "webpack --mode development --watch"
14
14
  },
15
15
  "devDependencies": {
16
- "autoprefixer": "^10.2.6",
17
- "css-loader": "^5.2.6",
18
- "css-minimizer-webpack-plugin": "^3.0.2",
19
- "mini-css-extract-plugin": "^2.0.0",
20
- "node-sass": "^7.0.0",
21
- "postcss-loader": "^6.1.1",
22
- "sass-loader": "^12.1.0",
23
- "webpack": "^5.42.0",
24
- "webpack-cli": "^4.7.2",
25
- "webpack-remove-empty-scripts": "^0.7.1"
16
+ "autoprefixer": "^10.4.20",
17
+ "css-loader": "^7.1.2",
18
+ "css-minimizer-webpack-plugin": "^7.0.0",
19
+ "mini-css-extract-plugin": "^2.9.1",
20
+ "postcss-loader": "^8.1.1",
21
+ "sass": "^1.79.1",
22
+ "sass-loader": "^16.0.1",
23
+ "webpack": "^5.94.0",
24
+ "webpack-cli": "^5.1.4",
25
+ "webpack-remove-empty-scripts": "^1.0.4"
26
26
  },
27
27
  "dependencies": {
28
28
  "trestle": "https://github.com/TrestleAdmin/trestle.git"
@@ -17,12 +17,12 @@ Gem::Specification.new do |spec|
17
17
 
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
20
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
21
21
 
22
22
  spec.metadata["homepage_uri"] = spec.homepage
23
23
  spec.metadata["source_code_uri"] = "https://github.com/TrestleAdmin/trestle-search"
24
24
 
25
- spec.add_dependency "trestle", "~> 0.10.0.pre"
25
+ spec.add_dependency "trestle", "~> 0.10.1"
26
26
 
27
27
  spec.add_development_dependency "rspec-rails"
28
28
  end