bullet_train 1.6.27 → 1.6.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/account/markdown_helper.rb +1 -1
- data/app/views/layouts/docs.html.erb +6 -0
- data/config/locales/en/addresses.en.yml +16 -0
- data/config/locales/en/invitations.en.yml +16 -0
- data/config/locales/en/memberships.en.yml +33 -1
- data/config/locales/en/teams.en.yml +12 -0
- data/config/locales/en/users.en.yml +22 -0
- data/docs/action-models.md +4 -4
- data/docs/field-partials.md +7 -1
- data/docs/index.md +1 -0
- data/docs/stylesheets.md +16 -0
- data/docs/upgrades.md +1 -1
- data/lib/bullet_train/resolver.rb +7 -0
- data/lib/bullet_train/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16b060ec914c03447d1c8abcca50aa9b75c00a975ec04013173088b67d76b2ab
|
4
|
+
data.tar.gz: fa0e341a42e660cbdd889d7f4e95e517fc3b930ec24184d895271f01ae1257c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e283d6dcf94770920e558958790e32cd5f4a6f80b8a51f59e14a5ead26d9beee9d25fe50448ba78ec5163afe6fbd22b756db67d56d3440fb70f76a6ef0f7e20
|
7
|
+
data.tar.gz: adfbaf616f7a78c9052bebf187dad24d257524ecc5f32923ce6d4b267547677d1a79d157b7d05acd1260ee8f341a8f47e5c73fdd11a3ae7c50ba90c53e0ea4e7
|
@@ -111,6 +111,12 @@
|
|
111
111
|
<% end %>
|
112
112
|
<% end %>
|
113
113
|
|
114
|
+
<%= render 'account/shared/menu/item', url: '/docs/stylesheets', label: 'Style Sheets' do |p| %>
|
115
|
+
<% p.icon do %>
|
116
|
+
<i class="fa-brands fa-js ti ti-brush"></i>
|
117
|
+
<% end %>
|
118
|
+
<% end %>
|
119
|
+
|
114
120
|
<%= render 'account/shared/menu/item', url: '/docs/i18n', label: 'Internationalization' do |p| %>
|
115
121
|
<% p.icon do %>
|
116
122
|
<i class="fa-brands fa-js ti ti-world"></i>
|
@@ -7,23 +7,33 @@ en:
|
|
7
7
|
_: &address_one Address
|
8
8
|
label: *address_one
|
9
9
|
heading: *address_one
|
10
|
+
api_title: *address_one
|
11
|
+
api_description: *address_one
|
10
12
|
address_two:
|
11
13
|
_: &address_two Address cont.
|
12
14
|
label: *address_two
|
13
15
|
heading: *address_two
|
16
|
+
api_title: *address_two
|
17
|
+
api_description: *address_two
|
14
18
|
city:
|
15
19
|
_: &city City
|
16
20
|
label: *city
|
17
21
|
heading: *city
|
22
|
+
api_title: *city
|
23
|
+
api_description: *city
|
18
24
|
region_id: ®ion
|
19
25
|
_: ®ion_id State / Province / Region
|
20
26
|
label: *region_id
|
21
27
|
heading: *region_id
|
28
|
+
api_title: *region_id
|
29
|
+
api_description: *region_id
|
22
30
|
region: *region
|
23
31
|
region_name:
|
24
32
|
_: ®ion_name Region name
|
25
33
|
label: *region_name
|
26
34
|
heading: *region_name
|
35
|
+
api_title: *region_name
|
36
|
+
api_description: *region_name
|
27
37
|
admin_divisions:
|
28
38
|
states: State
|
29
39
|
provinces_territories: Province or Territory
|
@@ -40,12 +50,18 @@ en:
|
|
40
50
|
_: &country_id Country
|
41
51
|
label: *country_id
|
42
52
|
heading: *country_id
|
53
|
+
api_title: *country_id
|
54
|
+
api_description: *country_id
|
43
55
|
country: *country
|
44
56
|
postal_code:
|
45
57
|
_: &postal_code Postal code
|
46
58
|
label: *postal_code
|
47
59
|
heading: *postal_code
|
60
|
+
api_title: *postal_code
|
61
|
+
api_description: *postal_code
|
48
62
|
zip_code:
|
49
63
|
_: &zip_code Zip code
|
50
64
|
label: *zip_code
|
51
65
|
heading: *zip_code
|
66
|
+
api_title: *zip_code
|
67
|
+
api_description: *zip_code
|
@@ -17,34 +17,50 @@ en:
|
|
17
17
|
_: &id Invitation ID
|
18
18
|
label: *id
|
19
19
|
heading: *id
|
20
|
+
api_title: *id
|
21
|
+
api_description: *id
|
20
22
|
email:
|
21
23
|
_: &email Email Address
|
22
24
|
label: *email
|
23
25
|
heading: *email
|
26
|
+
api_title: *email
|
27
|
+
api_description: *email
|
24
28
|
uuid:
|
25
29
|
name: &uuid Invitation UUID
|
26
30
|
label: *uuid
|
27
31
|
heading: *uuid
|
32
|
+
api_title: *uuid
|
33
|
+
api_description: *uuid
|
28
34
|
from_membership_id:
|
29
35
|
name: &from_membership_id Who sent ID
|
30
36
|
label: *from_membership_id
|
31
37
|
heading: *from_membership_id
|
38
|
+
api_title: *from_membership_id
|
39
|
+
api_description: *from_membership_id
|
32
40
|
team_id:
|
33
41
|
name: &team_id Team ID
|
34
42
|
label: *team_id
|
35
43
|
heading: *team_id
|
44
|
+
api_title: *team_id
|
45
|
+
api_description: *team_id
|
36
46
|
roles: &role_ids
|
37
47
|
name: &roles Special Privileges
|
38
48
|
label: *roles
|
39
49
|
heading: *roles
|
50
|
+
api_title: *roles
|
51
|
+
api_description: *roles
|
40
52
|
role_ids: *role_ids
|
41
53
|
# 🚅 super scaffolding will insert new fields above this line.
|
42
54
|
created_at:
|
43
55
|
name: &created_at Sent
|
44
56
|
heading: *created_at
|
57
|
+
api_title: *created_at
|
58
|
+
api_description: *created_at
|
45
59
|
updated_at:
|
46
60
|
name: &updated_at Updated
|
47
61
|
heading: *updated_at
|
62
|
+
api_title: *updated_at
|
63
|
+
api_description: *updated_at
|
48
64
|
index:
|
49
65
|
section: "Invitations for %{team_name}"
|
50
66
|
header: Team Member Invitations
|
@@ -26,50 +26,78 @@ en:
|
|
26
26
|
_: &id Membership ID
|
27
27
|
label: *id
|
28
28
|
heading: *id
|
29
|
+
api_title: *id
|
30
|
+
api_description: *id
|
29
31
|
user_id:
|
30
32
|
name: &user_id User ID
|
31
33
|
heading: *user_id
|
34
|
+
api_title: *user_id
|
35
|
+
api_description: *user_id
|
32
36
|
team_id:
|
33
37
|
name: &team_id Team ID
|
34
38
|
heading: *team_id
|
39
|
+
api_title: *team_id
|
40
|
+
api_description: *team_id
|
35
41
|
invitation_id:
|
36
42
|
name: &invitation_id Invitation ID
|
37
43
|
heading: *invitation_id
|
44
|
+
api_title: *invitation_id
|
45
|
+
api_description: *invitation_id
|
38
46
|
name:
|
39
47
|
name: &name Full Name
|
40
48
|
heading: *name
|
49
|
+
api_title: *name
|
50
|
+
api_description: *name
|
41
51
|
user_first_name:
|
42
52
|
name: &user_first_name First Name
|
43
53
|
label: *user_first_name
|
44
54
|
heading: *user_first_name
|
55
|
+
api_title: *user_first_name
|
56
|
+
api_description: *user_first_name
|
45
57
|
user_last_name:
|
46
58
|
name: &user_last_name Last Name
|
47
59
|
label: *user_last_name
|
48
60
|
heading: *user_last_name
|
61
|
+
api_title: *user_last_name
|
62
|
+
api_description: *user_last_name
|
49
63
|
user_profile_photo_id:
|
50
64
|
name: &user_profile_photo_id Profile Photo
|
51
65
|
label: *user_profile_photo_id
|
52
66
|
heading: *user_profile_photo_id
|
67
|
+
api_title: *user_profile_photo_id
|
68
|
+
api_description: *user_profile_photo_id
|
53
69
|
user_profile_photo:
|
54
70
|
name: &user_profile_photo Profile Photo
|
55
71
|
label: *user_profile_photo
|
56
|
-
heading: *
|
72
|
+
heading: *user_profile_photo
|
73
|
+
api_title: *user_profile_photo
|
74
|
+
api_description: *user_profile_photo
|
57
75
|
user_email:
|
58
76
|
name: &user_email User Email
|
59
77
|
heading: *user_email
|
78
|
+
api_title: *user_email
|
79
|
+
api_description: *user_email
|
60
80
|
added_by_id:
|
61
81
|
name: &added_by_id Added by User ID
|
62
82
|
heading: *added_by_id
|
83
|
+
api_title: *added_by_id
|
84
|
+
api_description: *added_by_id
|
63
85
|
platform_agent_of_id:
|
64
86
|
name: &platform_agent_of_id Platform Agent of ID
|
65
87
|
heading: *platform_agent_of_id
|
88
|
+
api_title: *platform_agent_of_id
|
89
|
+
api_description: *platform_agent_of_id
|
66
90
|
platform_agent:
|
67
91
|
name: &platform_agent Platform Agent
|
68
92
|
heading: *platform_agent
|
93
|
+
api_title: *platform_agent
|
94
|
+
api_description: *platform_agent
|
69
95
|
role_ids:
|
70
96
|
name: &roles Special Privileges
|
71
97
|
label: *roles
|
72
98
|
heading: *roles
|
99
|
+
api_title: *roles
|
100
|
+
api_description: *roles
|
73
101
|
options:
|
74
102
|
default:
|
75
103
|
label: Viewer
|
@@ -84,9 +112,13 @@ en:
|
|
84
112
|
created_at:
|
85
113
|
_: &created_at Created At
|
86
114
|
heading: *created_at
|
115
|
+
api_title: *created_at
|
116
|
+
api_description: *created_at
|
87
117
|
updated_at:
|
88
118
|
_: &updated_at Updated At
|
89
119
|
heading: *updated_at
|
120
|
+
api_title: *updated_at
|
121
|
+
api_description: *updated_at
|
90
122
|
index:
|
91
123
|
section: "%{team_name} Team Members"
|
92
124
|
contexts:
|
@@ -53,25 +53,37 @@ en:
|
|
53
53
|
_: &id Team ID
|
54
54
|
label: *id
|
55
55
|
heading: *id
|
56
|
+
api_title: *id
|
57
|
+
api_description: *id
|
56
58
|
name:
|
57
59
|
_: &name Team Name
|
58
60
|
label: *name
|
59
61
|
heading: Team
|
62
|
+
api_title: *name
|
63
|
+
api_description: *name
|
60
64
|
time_zone:
|
61
65
|
_: &time_zone Primary Time Zone
|
62
66
|
label: "Primary Time Zone"
|
63
67
|
heading: *time_zone
|
68
|
+
api_title: *time_zone
|
69
|
+
api_description: *time_zone
|
64
70
|
locale:
|
65
71
|
_: &locale Language
|
66
72
|
label: "Primary Language"
|
67
73
|
heading: *locale
|
74
|
+
api_title: *locale
|
75
|
+
api_description: *locale
|
68
76
|
# 🚅 super scaffolding will insert new fields above this line.
|
69
77
|
created_at:
|
70
78
|
_: &created_at Signed Up At
|
71
79
|
heading: *created_at
|
80
|
+
api_title: *created_at
|
81
|
+
api_description: *created_at
|
72
82
|
updated_at:
|
73
83
|
_: &updated_at Updated At
|
74
84
|
heading: *updated_at
|
85
|
+
api_title: *updated_at
|
86
|
+
api_description: *updated_at
|
75
87
|
_: &self
|
76
88
|
name:
|
77
89
|
label: Your Team Name
|
@@ -38,32 +38,46 @@ en:
|
|
38
38
|
_: &id Team ID
|
39
39
|
label: *id
|
40
40
|
heading: *id
|
41
|
+
api_title: *id
|
42
|
+
api_description: *id
|
41
43
|
name:
|
42
44
|
heading: Name
|
43
45
|
first_name:
|
44
46
|
_: &first_name First Name
|
45
47
|
label: *first_name
|
46
48
|
heading: *first_name
|
49
|
+
api_title: *first_name
|
50
|
+
api_description: *first_name
|
47
51
|
last_name:
|
48
52
|
_: &last_name Last Name
|
49
53
|
label: *last_name
|
50
54
|
heading: *last_name
|
55
|
+
api_title: *last_name
|
56
|
+
api_description: *last_name
|
51
57
|
email:
|
52
58
|
_: &email Email Address
|
53
59
|
label: *email
|
54
60
|
heading: *email
|
61
|
+
api_title: *email
|
62
|
+
api_description: *email
|
55
63
|
time_zone:
|
56
64
|
_: &time_zone Your Time Zone
|
57
65
|
label: *time_zone
|
58
66
|
heading: *time_zone
|
67
|
+
api_title: *time_zone
|
68
|
+
api_description: *time_zone
|
59
69
|
profile_photo_id:
|
60
70
|
_: &profile_photo_id Profile Photo
|
61
71
|
label: *profile_photo_id
|
62
72
|
heading: *profile_photo_id
|
73
|
+
api_title: *profile_photo_id
|
74
|
+
api_description: *profile_photo_id
|
63
75
|
profile_photo:
|
64
76
|
_: &profile_photo Profile Photo
|
65
77
|
label: *profile_photo
|
66
78
|
heading: *profile_photo
|
79
|
+
api_title: *profile_photo
|
80
|
+
api_description: *profile_photo
|
67
81
|
current_password:
|
68
82
|
label: Current Password
|
69
83
|
password:
|
@@ -76,18 +90,26 @@ en:
|
|
76
90
|
_: &otp_attempt Your Verification Code
|
77
91
|
label: *otp_attempt
|
78
92
|
heading: *otp_attempt
|
93
|
+
api_title: *otp_attempt
|
94
|
+
api_description: *otp_attempt
|
79
95
|
locale:
|
80
96
|
_: &locale Language
|
81
97
|
label: *locale
|
82
98
|
heading: *locale
|
99
|
+
api_title: *locale
|
100
|
+
api_description: *locale
|
83
101
|
help: By default the interface language will adjust based on each team's language setting, but you can set a global personal preference for your account here.
|
84
102
|
# 🚅 super scaffolding will insert new fields above this line.
|
85
103
|
created_at:
|
86
104
|
_: &created_at Signed Up At
|
87
105
|
heading: *created_at
|
106
|
+
api_title: *created_at
|
107
|
+
api_description: *created_at
|
88
108
|
updated_at:
|
89
109
|
_: &updated_at Updated At
|
90
110
|
heading: *updated_at
|
111
|
+
api_title: *updated_at
|
112
|
+
api_description: *updated_at
|
91
113
|
# this is how we define customizations to fields for a specific namespace.
|
92
114
|
_: &self
|
93
115
|
email:
|
data/docs/action-models.md
CHANGED
@@ -63,9 +63,9 @@ Don't forget to run `bundle install` and `rails restart`.
|
|
63
63
|
You can get detailed information about using Super Scaffolding to generate different types of Action Models like so:
|
64
64
|
|
65
65
|
```
|
66
|
-
rails generate super_scaffold:
|
67
|
-
rails generate super_scaffold:
|
68
|
-
rails generate super_scaffold:
|
66
|
+
rails generate super_scaffold:action_models:targets_many
|
67
|
+
rails generate super_scaffold:action_models:targets_one
|
68
|
+
rails generate super_scaffold:action_models:targets_one_parent
|
69
69
|
```
|
70
70
|
|
71
71
|
## Basic Example
|
@@ -79,7 +79,7 @@ rails generate super_scaffold Project Team name:text_field
|
|
79
79
|
### 2. Generate and scaffold an archive action for projects.
|
80
80
|
|
81
81
|
```
|
82
|
-
rails generate super_scaffold:
|
82
|
+
rails generate super_scaffold:action_models:targets_many Archive Project Team
|
83
83
|
```
|
84
84
|
|
85
85
|
### 3. Implement the action logic.
|
data/docs/field-partials.md
CHANGED
@@ -96,15 +96,19 @@ text_field_value:
|
|
96
96
|
name: &text_field_value Text Field Value
|
97
97
|
label: *text_field_value
|
98
98
|
heading: *text_field_value
|
99
|
+
api_title: *text_field_value
|
100
|
+
api_description: *text_field_value
|
99
101
|
```
|
100
102
|
|
101
|
-
This might look redundant at first glance, as you can see that by default the same label ("Text Field Value") is being used for both the form field label (`label`) and the heading (`heading`) of the show view and table view. It's also used when the field is referred to in a validation error message. However, having these three values defined separately gives us the flexibility of defining much more user-friendly labels in the context of a form field. In my own applications, I'll frequently configure these form field labels to be much more verbose questions (in an attempt to improve the UX), but still use the shorter label as a column header on the table view and the show view:
|
103
|
+
This might look redundant at first glance, as you can see that by default the same label ("Text Field Value") is being used for both the form field label (`label`) and the heading (`heading`) of the show view and table view, and in API `api_title` and `api_descriptions` are used for documentation purposes. It's also used when the field is referred to in a validation error message. However, having these three values defined separately gives us the flexibility of defining much more user-friendly labels in the context of a form field. In my own applications, I'll frequently configure these form field labels to be much more verbose questions (in an attempt to improve the UX), but still use the shorter label as a column header on the table view and the show view:
|
102
104
|
|
103
105
|
```yaml
|
104
106
|
text_field_value:
|
105
107
|
name: &text_field_value Text Field Value
|
106
108
|
label: "What should the value of this text field be?"
|
107
109
|
heading: *text_field_value
|
110
|
+
api_title: *text_field_value
|
111
|
+
api_description: *text_field_value
|
108
112
|
```
|
109
113
|
|
110
114
|
You can also configure some placeholder text (displayed in the field when in an empty state) or some inline help text (to be presented to users under the form field) like so:
|
@@ -114,6 +118,8 @@ text_field_value:
|
|
114
118
|
name: &text_field_value Text Field Value
|
115
119
|
label: "What should the value of this text field be?"
|
116
120
|
heading: *text_field_value
|
121
|
+
api_title: *text_field_value
|
122
|
+
api_description: *text_field_value
|
117
123
|
placeholder: "Type your response here"
|
118
124
|
help: "The value can be anything you want it to be!"
|
119
125
|
```
|
data/docs/index.md
CHANGED
data/docs/stylesheets.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Style Sheets
|
2
|
+
Bullet Train's stock UI theme, called “Light”, is built to use `tailwindcss` extensively, where most of the styling is defined within the `.html.erb` theme partials.
|
3
|
+
|
4
|
+
As such, there are two ways to update the styling of your app: either by modifying theme partials, or by adding your own custom CSS.
|
5
|
+
|
6
|
+
## Modify Theme Partials
|
7
|
+
|
8
|
+
Since `tailwindcss` is used, most style changes are done by ejecting theme partials into your app's `app/views` directory, and modifying the Tailwind classes within the `.html.erb` templates.
|
9
|
+
|
10
|
+
You can eject only the theme files you wish to override or you can eject the whole UI theme for customization. You can find more information in the [indirection documentation](indirection) about using `bin/resolve` to find the theme partials to eject. Or see the [themes documentation](themes) for details on using the "Light" UI theme as a starting point for creating your own.
|
11
|
+
|
12
|
+
## Add custom CSS
|
13
|
+
|
14
|
+
To add your own custom CSS, add to the `app/assets/stylesheets/application.css` file found in your app. In this file, you'll be able to use Tailwind `@apply` directives and add `@import` statements to include the CSS from third-party `npm` packages.
|
15
|
+
|
16
|
+
For further modifications to the theme's style sheet (for example, to change the order in which base Tailwind stylesheets are included), you can eject the theme's css by using the command `rake bullet_train:themes:light:eject_css`.
|
data/docs/upgrades.md
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
## The Stepwise Upgrade Method
|
16
16
|
|
17
|
-
This method will ensure that the version of the Bullet Train gems that your app uses will stay in sync with the
|
17
|
+
This method will ensure that the version of the Bullet Train gems that your app uses will stay in sync with the application framework provided by the starter repo.
|
18
18
|
If you've ever upgraded a Rails app from version to version this process should feel fairly similar.
|
19
19
|
|
20
20
|
## Pulling Updates from the Starter Repository
|
@@ -151,6 +151,13 @@ module BulletTrain
|
|
151
151
|
result[:package_name] = package_name
|
152
152
|
end
|
153
153
|
end
|
154
|
+
|
155
|
+
# If we can't find the package name, check if it's because the file path is in the root of the gem
|
156
|
+
# and not in a subdirectory like app, config or lib.
|
157
|
+
if result[:package_name].nil? && base_path.split("/").size == 3
|
158
|
+
result[:project_path] = "./#{base_path.split("/").last}"
|
159
|
+
result[:package_name] = base_path.split("/").second
|
160
|
+
end
|
154
161
|
end
|
155
162
|
end
|
156
163
|
result
|
data/lib/bullet_train/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -749,6 +749,7 @@ files:
|
|
749
749
|
- docs/overriding.md
|
750
750
|
- docs/permissions.md
|
751
751
|
- docs/seeds.md
|
752
|
+
- docs/stylesheets.md
|
752
753
|
- docs/super-scaffolding.md
|
753
754
|
- docs/super-scaffolding/delegated-types.md
|
754
755
|
- docs/super-scaffolding/options.md
|