super 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -47
  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 +44 -30
  6. data/app/controllers/super/foundation_controller.rb +30 -0
  7. data/app/controllers/super/sitewide_controller.rb +6 -3
  8. data/app/controllers/super/substructure_controller.rb +40 -47
  9. data/app/controllers/super/view_controller.rb +5 -1
  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_rich_text.html.erb +1 -1
  17. data/app/views/super/application/_form.html.erb +1 -1
  18. data/app/views/super/application/_form_fieldset.html.erb +1 -1
  19. data/app/views/super/application/_form_has_many.html.erb +2 -2
  20. data/app/views/super/application/_form_has_one.html.erb +1 -1
  21. data/app/views/super/application/_layout.html.erb +6 -6
  22. data/app/views/super/application/_link.html.erb +1 -6
  23. data/app/views/super/application/_member_header.html.erb +1 -1
  24. data/app/views/super/application/_panel.html.erb +1 -1
  25. data/app/views/super/application/_query.html.erb +2 -2
  26. data/app/views/super/application/_site_header.html.erb +2 -2
  27. data/app/views/super/application/_sort.html.erb +2 -2
  28. data/app/views/super/application/_sort_expression.html.erb +1 -1
  29. data/app/views/super/application/_view_chain.html.erb +1 -24
  30. data/app/views/super/application/edit.html.erb +1 -1
  31. data/app/views/super/application/index.html.erb +1 -1
  32. data/app/views/super/application/new.html.erb +1 -1
  33. data/app/views/super/application/show.html.erb +1 -1
  34. data/frontend/super-frontend/dist/application.css +54 -6569
  35. data/frontend/super-frontend/dist/application.js +1201 -2092
  36. data/lib/super/action_inquirer.rb +28 -8
  37. data/lib/super/assets.rb +2 -2
  38. data/lib/super/badge.rb +8 -32
  39. data/lib/super/cheat.rb +6 -5
  40. data/lib/super/client_error.rb +4 -0
  41. data/lib/super/compatibility.rb +4 -0
  42. data/lib/super/configuration.rb +3 -0
  43. data/lib/super/display/schema_types.rb +38 -82
  44. data/lib/super/display.rb +13 -13
  45. data/lib/super/error.rb +14 -0
  46. data/lib/super/filter/form_object.rb +2 -2
  47. data/lib/super/filter/operator.rb +1 -1
  48. data/lib/super/filter/schema_types.rb +1 -1
  49. data/lib/super/form/field_transcript.rb +4 -0
  50. data/lib/super/form/schema_types.rb +2 -2
  51. data/lib/super/form/strong_params.rb +1 -1
  52. data/lib/super/form_builder/base_methods.rb +3 -9
  53. data/lib/super/form_builder/flatpickr_methods.rb +3 -3
  54. data/lib/super/form_builder.rb +19 -21
  55. data/lib/super/form_builder_helper.rb +3 -3
  56. data/lib/super/link.rb +15 -6
  57. data/lib/super/link_builder.rb +4 -4
  58. data/lib/super/navigation.rb +12 -8
  59. data/lib/super/partial.rb +0 -12
  60. data/lib/super/plugin.rb +2 -2
  61. data/lib/super/railtie.rb +1 -0
  62. data/lib/super/render_helper.rb +31 -0
  63. data/lib/super/reset.rb +1 -6
  64. data/lib/super/schema/guesser.rb +5 -5
  65. data/lib/super/schema.rb +2 -2
  66. data/lib/super/sort.rb +1 -1
  67. data/lib/super/useful/deprecations.rb +1 -3
  68. data/lib/super/useful/enum.rb +1 -1
  69. data/lib/super/useful/i19.rb +1 -1
  70. data/lib/super/version.rb +1 -1
  71. data/lib/super/view_chain.rb +19 -0
  72. data/lib/super.rb +1 -0
  73. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8074c717fdd2f747e7d880cdbb02ec13515ec85b3504e7f55f1db526ace24838
4
- data.tar.gz: 5d446f1574a35e4ba542281b2edfe5ef36dd588a5c2420b81288702bb96f4607
3
+ metadata.gz: a9267b7ff71d6d06f1a4b870b2afde9b0e57e235f8ad03296ead11a84d350de2
4
+ data.tar.gz: 2c41163e1f04d4496a00cac5c3f9be9e8e2a424de5a76641aa240c9792f9cde9
5
5
  SHA512:
6
- metadata.gz: adca04cac0470dfe22929b710d331ff651eb53ee0fdf5f88657f9b18094963f09bda9c6b13808bc112a565937851eda14622e8a0d853b992fa5f1551e6daadb0
7
- data.tar.gz: b694a20146e50d743fcc7ca5bbf6e67cdd63df3e256352b70a99a5a677ad0f5014f38ca29efe48263d840809d9c4e3f63d1972a28277510c882c0a6023cf55d0
6
+ metadata.gz: 1972c4bc0fd103b8d1475e50c7cd7255b1dcb1ac76d72f0f5881c877442b3aff4ef8e24c23032a65cd6c5402bdf77e389e6ce52c12aa0589f925491729bdd51f
7
+ data.tar.gz: af4cb17c2e23727755391d98015ef53afff77eb071b333d83501826f5876bb108d852946dc76f7952a629aea8823b4e31575337438fd1e05165949f202eb1d56
data/README.md CHANGED
@@ -1,43 +1,46 @@
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
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
41
44
  * Supports Rails 5.0+, 6.0+, 7.0+
42
45
  * Supports Ruby 2.3+, 3.0+
43
46
 
@@ -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