super 0.20.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -48
  3. data/app/assets/javascripts/super/application.js +1201 -2092
  4. data/app/assets/stylesheets/super/application.css +54 -6569
  5. data/app/controllers/super/application_controller.rb +52 -47
  6. data/app/controllers/super/foundation_controller.rb +30 -0
  7. data/app/controllers/super/sitewide_controller.rb +36 -0
  8. data/app/controllers/super/substructure_controller.rb +40 -92
  9. data/app/controllers/super/view_controller.rb +59 -0
  10. data/app/views/layouts/super/application.html.erb +3 -3
  11. data/app/views/super/application/_batch_checkbox.csv.erb +1 -1
  12. data/app/views/super/application/_batch_checkbox.html.erb +1 -1
  13. data/app/views/super/application/_collection_header.html.erb +1 -1
  14. data/app/views/super/application/_csv_button.html.erb +1 -1
  15. data/app/views/super/application/_display_actions.html.erb +1 -1
  16. data/app/views/super/application/_display_index.html.erb +8 -2
  17. data/app/views/super/application/_display_rich_text.html.erb +1 -1
  18. data/app/views/super/application/_display_show.html.erb +10 -2
  19. data/app/views/super/application/_filter.html.erb +63 -59
  20. data/app/views/super/application/_form.html.erb +1 -1
  21. data/app/views/super/application/_form_fieldset.html.erb +1 -1
  22. data/app/views/super/application/_form_has_many.html.erb +2 -2
  23. data/app/views/super/application/_form_has_one.html.erb +1 -1
  24. data/app/views/super/application/_layout.html.erb +6 -8
  25. data/app/views/super/application/_link.html.erb +1 -6
  26. data/app/views/super/application/_member_header.html.erb +1 -1
  27. data/app/views/super/application/_panel.html.erb +1 -1
  28. data/app/views/super/application/_query.html.erb +13 -12
  29. data/app/views/super/application/_site_header.html.erb +2 -2
  30. data/app/views/super/application/_sort.html.erb +18 -14
  31. data/app/views/super/application/_sort_expression.html.erb +1 -1
  32. data/app/views/super/application/_view_chain.html.erb +1 -5
  33. data/app/views/super/application/edit.html.erb +1 -1
  34. data/app/views/super/application/index.html.erb +1 -1
  35. data/app/views/super/application/new.html.erb +1 -1
  36. data/app/views/super/application/show.html.erb +1 -1
  37. data/config/locales/en.yml +3 -0
  38. data/frontend/super-frontend/dist/application.css +54 -6569
  39. data/frontend/super-frontend/dist/application.js +1201 -2092
  40. data/lib/super/action_inquirer.rb +28 -8
  41. data/lib/super/assets.rb +2 -2
  42. data/lib/super/badge.rb +8 -23
  43. data/lib/super/cheat.rb +11 -5
  44. data/lib/super/client_error.rb +4 -0
  45. data/lib/super/compatibility.rb +4 -0
  46. data/lib/super/configuration.rb +3 -0
  47. data/lib/super/display/schema_types.rb +50 -71
  48. data/lib/super/display.rb +16 -15
  49. data/lib/super/error.rb +16 -2
  50. data/lib/super/filter/form_object.rb +2 -2
  51. data/lib/super/filter/operator.rb +1 -1
  52. data/lib/super/filter/schema_types.rb +1 -1
  53. data/lib/super/form/field_transcript.rb +4 -0
  54. data/lib/super/form/schema_types.rb +2 -2
  55. data/lib/super/form/strong_params.rb +1 -1
  56. data/lib/super/form_builder/base_methods.rb +3 -9
  57. data/lib/super/form_builder/flatpickr_methods.rb +3 -3
  58. data/lib/super/form_builder.rb +19 -21
  59. data/{app/helpers → lib}/super/form_builder_helper.rb +13 -2
  60. data/lib/super/link.rb +15 -6
  61. data/lib/super/link_builder.rb +4 -4
  62. data/lib/super/navigation.rb +49 -45
  63. data/lib/super/partial.rb +0 -12
  64. data/lib/super/plugin.rb +2 -2
  65. data/lib/super/query.rb +61 -0
  66. data/lib/super/{engine.rb → railtie.rb} +8 -1
  67. data/lib/super/render_helper.rb +31 -0
  68. data/lib/super/reset.rb +7 -5
  69. data/lib/super/schema/guesser.rb +5 -5
  70. data/lib/super/schema.rb +10 -4
  71. data/lib/super/sort.rb +2 -4
  72. data/lib/super/useful/deprecations.rb +16 -0
  73. data/lib/super/useful/enum.rb +1 -1
  74. data/lib/super/useful/i19.rb +1 -1
  75. data/lib/super/version.rb +1 -1
  76. data/lib/super/view_chain.rb +33 -4
  77. data/lib/super.rb +9 -2
  78. metadata +11 -49
  79. data/config/routes.rb +0 -4
  80. data/lib/super/query/form_object.rb +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e47e4344e0e7e7cf55cc943672017a92e7e30d566aa84b28b2351b4f190b22ed
4
- data.tar.gz: 62b74ffa083bbabe27890359f987e78363e6fc86a8b164d8529155f9eeaff655
3
+ metadata.gz: a9267b7ff71d6d06f1a4b870b2afde9b0e57e235f8ad03296ead11a84d350de2
4
+ data.tar.gz: 2c41163e1f04d4496a00cac5c3f9be9e8e2a424de5a76641aa240c9792f9cde9
5
5
  SHA512:
6
- metadata.gz: ec637b18bb09e636e988507036d41dde995a8f33aeacd69a5b94924eadfcbae4acba73a58c32a0d4188f4f3a8ae852c5b9a9566af647bf4e0583484369d4566c
7
- data.tar.gz: 7a9e37ed3dc2232e902e2d8b770c02e737413eec66cc4df80c1cefdb974e38d523568a1f66962a2943b667c6cb28439c0fb501c98b102747ad511d9d5204cc3c
6
+ metadata.gz: 1972c4bc0fd103b8d1475e50c7cd7255b1dcb1ac76d72f0f5881c877442b3aff4ef8e24c23032a65cd6c5402bdf77e389e6ce52c12aa0589f925491729bdd51f
7
+ data.tar.gz: af4cb17c2e23727755391d98015ef53afff77eb071b333d83501826f5876bb108d852946dc76f7952a629aea8823b4e31575337438fd1e05165949f202eb1d56
data/README.md CHANGED
@@ -1,44 +1,47 @@
1
1
  # Super
2
2
 
3
- ![Unit tests status](https://github.com/superadministration/super/workflows/Unit%20tests/badge.svg?branch=master)
3
+ ![Unit tests status](https://github.com/superadministration/super/workflows/Unit%20tests/badge.svg?branch=main)
4
4
  [![Gem](https://img.shields.io/gem/v/super)][gem]
5
- [![Try the demo](https://img.shields.io/badge/demo-try-blue)][demo]
6
- [![Read the docs](https://img.shields.io/badge/docs-available-brightgreen)][docs]
7
5
 
6
+ Super is an admin framework for Ruby on Rails applications. It helps you make
7
+ admin pages quickly, and it provides a powerful interface for admins to use.
8
8
 
9
- Super is an admin framework for Ruby on Rails applications. Super helps you make
10
- admin pages quickly and provides a powerful interface for admins to use.
11
-
12
- It's distinguishing feature is that it's easy for you to maintain in your
13
- application. It does this by having zero dependencies—this lets you update your
14
- app's dependencies without worrying about breaking your admin pages, and vice
15
- versa, update your admin pages without breaking your app.
16
-
17
- Note: Super is under active development and will likely have a few more breaking
18
- changes before 1.0.
9
+ Check out the [demo][demo] / Read the [docs][docs]
19
10
 
20
11
 
21
12
  ## Features
22
13
 
23
- * Responsive and mobile-friendly web pages
24
- * Automatic controllers that work without any configuration
25
- * Configurable forms
26
- * Supports nested attributes `accepts_nested_attributes_for`
27
- * New and edit forms can be totally different
28
- * Configurable display (index and show tables)
14
+ #### Ease of use and setup
15
+
16
+ * Configurable display pages
17
+ * Advanced filtering and sorting
29
18
  * Supports showing computed values that aren't backed by database fields
30
- * Advanced filtering/search
31
- * Compatible with Sprockets and Webpacker
32
- * Pre-built frontend assets. Super doesn't depend on Sass, PostCSS, Babel, etc
33
- * Carefully chosen, vendored frontend assets
34
- * Stimulus JS v2
35
- * Tailwind CSS v2
36
- * Rails UJS
37
- * Flatpickr
38
- * Builds on top of standard Rails controllers and ERB views
19
+ * Configurable form pages
20
+ * Supports nested attributes using `accepts_nested_attributes_for`
21
+ * Supports having different forms for new and edit pages
22
+ * Controllers that can automatically configure itself for any ActiveRecord model
23
+ * Compatible with Sprockets, Webpacker, jsbundling, and cssbundling
24
+ * Responsive and mobile-friendly web pages
25
+
26
+ #### Ease of customization
27
+
39
28
  * Plenty of escape hatches for those very customized pages
40
- * No DSL. Configure your admin pages by setting methods and returning objects
41
- * Supports Rails 5.0+, 6.0+
29
+ * Builds on top of standard Rails controllers and ERB views
30
+ * No DSL. Configure your admin pages by setting attributes and returning objects
31
+
32
+ #### Ease of long-term maintainability
33
+
34
+ Each gem in your Gemfile requires some maintenance around keeping dependencies
35
+ up to date. Super works hard to keep its maintenance as simple as possible.
36
+
37
+ *Note: Super is under active development and will likely have a few more
38
+ breaking changes before 1.0.*
39
+
40
+ * Only depends on code that comes with Rails or Ruby. There are no other
41
+ third-party dependencies
42
+ * Includes pre-built frontend assets. Super doesn't depend on Sass, PostCSS,
43
+ Babel, etc
44
+ * Supports Rails 5.0+, 6.0+, 7.0+
42
45
  * Supports Ruby 2.3+, 3.0+
43
46
 
44
47
 
@@ -48,16 +51,10 @@ features. See the [docs][docs] for a walkthrough.
48
51
 
49
52
  ## Quick start
50
53
 
51
- Add this line anywhere in your Gemfile:
52
-
53
- ```ruby
54
- gem "super"
55
- ```
56
-
57
- Then install Super by running:
54
+ Install Super by running:
58
55
 
59
56
  ```
60
- bundle install
57
+ bundle add super
61
58
  bin/rails g super:install
62
59
  ```
63
60
 
@@ -68,15 +65,6 @@ bin/rails g super:resource ModelName
68
65
  ```
69
66
 
70
67
 
71
- ## Super doesn't fit my needs. What are some alternatives?
72
-
73
- [ActiveAdmin](https://github.com/activeadmin/activeadmin) is great if you need
74
- lots of features. It relies heavily on DSLs but is flexible and popular.
75
-
76
- [Administrate](https://github.com/thoughtbot/administrate) doesn't have as many
77
- features as ActiveAdmin, but it feels like developing a normal Rails app.
78
-
79
-
80
68
  ## Contributing
81
69
 
82
70
  See [CONTRIBUTING](./CONTRIBUTING.md)
@@ -90,5 +78,5 @@ The gem is available under the terms of the [GNU LGPLv3](./LICENSE).
90
78
  [gem]: https://rubygems.org/gems/super
91
79
  [discussions]: https://github.com/superadministration/super/discussions
92
80
  [docs]: https://superadministration.github.io/
93
- [demo]: https://demo-super.herokuapp.com/admin
81
+ [demo]: https://superdemo.zachahn.com/admin
94
82
  [demo_source]: https://github.com/superadministration/super_demo