widget_list 2.0.1 → 2.0.2

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: 6b5d067152f22e1bd2ffb74af059cd39fb122fc25d5c6a45e7f4867e2983a886
4
- data.tar.gz: a745558b966558ef6d8390c8af300e2829b8f6e42710a6281d52a692c043c9b6
3
+ metadata.gz: 65e24eab11f0979fb9b5345f2abc750120245e1a3170c1c3cf4314650e01b42b
4
+ data.tar.gz: 49994c8e04a8fed60a7605cf896e78f79d6bdcabd5407a780ba8ceaeae9142fd
5
5
  SHA512:
6
- metadata.gz: eeecb5f4a006a10763572bc1db5cbcc869f2a6109a9f6e20238a80a4cc93a58b7c029711e41e8e9338fbfa4bfcfa4a773c83df0b120c7adb01d5992d4bd6c9ed
7
- data.tar.gz: b896345aa5cccd676a62fa693b30299f5305325f332104abf19d61fee2fda06e2fe15da32cf7931590ad7c5f18e557fce9165519273da0cd24f58e1e71373821
6
+ metadata.gz: 4876ec92b2d1cf146f96d9b777575ff44ece4f3e707bed4098fef565025fc2a321246dbf200b084ef9ae847bd6822262ab39a68979213d9a2b3f8044f330399d
7
+ data.tar.gz: bbbeaf1232b1db0c48452af7dbd42b980e403ec3f3fb843aace3df2b9364af425256a945cc9dc3dea08e985853c2d4ec2d881e3d61b161b8236d2a6bc60d8cd9
data/README.md CHANGED
@@ -49,6 +49,24 @@ Load the assets in the application layout's `<head>`:
49
49
 
50
50
  Load this script in the layout's `<head>` without `defer`: the administration wizard's inline script needs jQuery as it is parsed. The gem resolves its image URLs through Sprockets when compiling CSS. No manual image copy or static middleware is needed. An app using the default Rails 8 Propshaft pipeline should replace `propshaft` with `sprockets-rails` for this integration. Run `bin/rails assets:precompile` to check production assets.
51
51
 
52
+ ## Themes
53
+
54
+ `widget_list` lets a theme provide default colors, type, borders, and button styles through `WidgetListThemeHelper::ThemeDefaults`. Settings passed to an individual `WidgetList.go!` call override theme defaults. A theme can also ship a stylesheet for finer control.
55
+
56
+ | Theme | Appearance | Compatibility |
57
+ | --- | --- | --- |
58
+ | [AI theme](https://github.com/davidrenne/widget_list_theme_ai) | Midnight surfaces, cyan and violet accents, modern grid controls | Built for widget_list 2.x and Rails 8 |
59
+ | [Cruddy](https://github.com/davidrenne/widget_list_theme_cruddy) | Warm, textured classic style | Legacy 1.x theme; requires migration for 2.x |
60
+ | [Blue Sky Basin](https://github.com/davidrenne/widget_list_theme_blue_sky_basin) | Blue mountain inspired palette | Legacy 1.x theme; requires migration for 2.x |
61
+
62
+ The AI theme is under development. To try it in your own Rails app, check out `widget_list_theme_ai` next to the app and add this line to its Gemfile:
63
+
64
+ ```ruby
65
+ gem 'widget_list_theme_ai', path: '../widget_list_theme_ai'
66
+ ```
67
+
68
+ Then run `bundle install`, add `//= link widget_list_theme_ai.css` to `app/assets/config/manifest.js`, and load `widget_list_theme_ai` after `widget_list` and `widgets` in the layout's `stylesheet_link_tag`. The theme uses a local system font stack and makes no external font request. See the [theme README on the preview branch](https://github.com/davidrenne/widget_list_theme_ai/tree/codex/ai-theme) for the complete setup and the example's `codex/ai-theme-example` branch for a working caller. That branch also uses the local core checkout for a pagination fix pending release.
69
+
52
70
  ## Choose a database source
53
71
 
54
72
  **Active Record only:** `config/widget-list.yml` is optional. The gem uses the current Rails environment's Active Record connection as its primary source. Pass an `ActiveRecord::Relation` as `list['view']`.
@@ -1,3 +1,3 @@
1
1
  module WidgetList
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
data/lib/widget_list.rb CHANGED
@@ -1819,7 +1819,7 @@ module WidgetList
1819
1819
  @items['LIST_SEQUENCE'] = 1
1820
1820
  end
1821
1821
 
1822
- if @items['LIST_SEQUENCE'].class.name == 'Fixnum' && @items['LIST_SEQUENCE'] > 0
1822
+ if @items['LIST_SEQUENCE'].is_a?(Integer) && @items['LIST_SEQUENCE'] > 0
1823
1823
  @sequence = @items['LIST_SEQUENCE'].to_i
1824
1824
  end
1825
1825
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: widget_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Renne