Skip to content

Commit 53531d6

Browse files
jonasjabarigitbook-bot
authored andcommitted
GitBook: [master] 172 pages and 4 assets modified
1 parent fa77a0c commit 53531d6

File tree

151 files changed

+1846
-1472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+1846
-1472
lines changed

docs/.gitbook/assets/coming_soon.png

51.1 KB
Loading

docs/.gitbook/assets/concept.png

25.3 KB
Loading
277 KB
Loading

docs/.gitbook/assets/logo.png

10.2 KB
Loading

docs/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Matestack UI Core Docs
1+
# Welcome
22

33
Welcome to the docs of the Ruby gem `matestack-ui-core`!
44

@@ -8,24 +8,25 @@ You end up writing 50% less code while increasing productivity, maintainability
88

99
The docs cover following main topics:
1010

11-
**[Installation](/docs/start/100-installation/)**
11+
[**Installation**](start/100-installation.md)
1212

1313
Learn how to properly set up and update matestack-ui-core with your existing Rails application.
1414

15-
**[UI components in pure Ruby](/docs/ui_components/README.md)**
15+
[**UI components in pure Ruby**](ui_components/)
1616

1717
Craft your UI based on your components written in pure Ruby. Utilizing Ruby's amazing language features, you're able to create a cleaner and more maintainable UI implementation.
1818

19-
**[Reactive components in pure Ruby](/docs/reactive_components/README.md)**
19+
[**Reactive components in pure Ruby**](reactive_components/)
2020

21-
*Optional feature*
21+
_Optional feature_
2222

2323
What about going even one step further and implement **REACTIVE** UIs in pure Ruby? Matestack's reactive core components can be used with a simple Ruby DSL enabling you to create reactive UIs without touching JavaScript!
2424

25-
**[Reactive apps in pure Ruby](/docs/reactive_apps/README.md)**
25+
[**Reactive apps in pure Ruby**](reactive_apps/)
2626

27-
*Optional feature*
27+
_Optional feature_
2828

29-
The last step in order to leverage the full Matestack power: Create app (~Rails layout) and page (Rails ~view) classes and implement dynamic page transitions without any JavaScript implementation required.
29+
The last step in order to leverage the full Matestack power: Create app \(~Rails layout\) and page \(Rails ~view\) classes and implement dynamic page transitions without any JavaScript implementation required.
30+
31+
In order to get started quickly, you might want to start with the [getting-started-guide](start/150-getting_started.md)
3032

31-
In order to get started quickly, you might want to start with the [getting-started-guide](/docs/start/150-getting_started)

docs/SUMMARY.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Table of contents
2+
3+
* [Welcome](README.md)
4+
* [Start](start/README.md)
5+
* [Create a reactive Twitter clone in pure Ruby](start/150-getting_started.md)
6+
* [Core Contribution](start/400-contribute.md)
7+
* [Community](start/300-community.md)
8+
* [About Matestack](start/200-about.md)
9+
* [Installation/Update guide](start/100-installation.md)
10+
* [UI Components in pure Ruby](ui_components/README.md)
11+
* [Rails integration](ui_components/100-rails_integration.md)
12+
* [Component registry](ui_components/200-registry.md)
13+
* [Component API](ui_components/300-component_api.md)
14+
* [Haml components](ui_components/500-haml_components.md)
15+
* [Testing](ui_components/1400-testing.md)
16+
* [Reusing views or partials](ui_components/400-reusing_views_or_partials.md)
17+
* [Reactivity in pure Ruby](reactive_components/README.md)
18+
* [Action Cable](reactive_components/1000-action_cable.md)
19+
* [Collection](reactive_components/700-collection.md)
20+
* [Actions](reactive_components/200-actions.md)
21+
* [Async](reactive_components/400-async.md)
22+
* [Cable](reactive_components/500-cable.md)
23+
* [Custom reactive components](reactive_components/800-custom_reactive_components.md)
24+
* [Forms](reactive_components/300-forms.md)
25+
* [Rails integration](reactive_components/100-rails_integration.md)
26+
* [Event Hub](reactive_components/900-event_hub.md)
27+
* [Isolated](reactive_components/600-isolated.md)
28+
* [SPA-like Apps in pure Ruby](reactive_apps/README.md)
29+
* [Tutorial](reactive_apps/1000-tutorial/README.md)
30+
* [Essential Guide 8: Styling and Notifications](reactive_apps/1000-tutorial/10_styling_notifications.md)
31+
* [Essential Guide 8: Collection and async component](reactive_apps/1000-tutorial/08_collection_async.md)
32+
* [Essential Guide 13: Wrap Up & Outlook](reactive_apps/1000-tutorial/13_wrap_up.md)
33+
* [Essential Guide 5: Toggle Component](reactive_apps/1000-tutorial/05_toggle_component.md)
34+
* [Essential Guide 11: Authentication](reactive_apps/1000-tutorial/11_authentication_devise.md)
35+
* [Essential Guide 3: Person Index, Show, Transition](reactive_apps/1000-tutorial/03_index_show_transition.md)
36+
* [Essential Guide 2: ActiveRecord & Database](reactive_apps/1000-tutorial/02_active_record.md)
37+
* [Essential Guide 7: Partials and custom components](reactive_apps/1000-tutorial/07_partials_and_custom_components.md)
38+
* [Essential Guide 4: Forms & Actions \(Create, Update, Delete\)](reactive_apps/1000-tutorial/04_forms_edit_new_create_update_delete.md)
39+
* [Essential Guide 12: Heroku Deployment with Postgres](reactive_apps/1000-tutorial/12_heroku_deployment.md)
40+
* [Essential Guide 6: Async Component](reactive_apps/1000-tutorial/06_async_component.md)
41+
* [Essential Guide 9: Custom Vue.js components](reactive_apps/1000-tutorial/09_custom_vue_js_components.md)
42+
* [Essential Guide 1: Setup](reactive_apps/1000-tutorial/01_setup.md)
43+
* [Creating a SPA-like App with Matestack](reactive_apps/1000-tutorial/00_introduction.md)
44+
* [Transitions](reactive_apps/400-transitions.md)
45+
* [Authorization via Pundit or CanCanCan](reactive_apps/600-pundit.md)
46+
* [Integrating Devise](reactive_apps/500-devise.md)
47+
* [Page API](reactive_apps/300-page_api.md)
48+
* [Rails integration](reactive_apps/100-rails_integration.md)
49+
* [App API](reactive_apps/200-app_api.md)
50+
* [API](api/README.md)
51+
* [Core Components](api/100-components/README.md)
52+
* [Matestack Core Component: Samp](api/100-components/samp.md)
53+
* [Matestack Core Component: Abbr](api/100-components/abbr.md)
54+
* [Matestack Core Component: Aside](api/100-components/aside.md)
55+
* [Matestack Core Component: Dt](api/100-components/dt.md)
56+
* [Matestack Core Component: Br](api/100-components/br.md)
57+
* [Matestack Core Component: Blockquote](api/100-components/blockquote.md)
58+
* [Matestack Core Component: Form Select](api/100-components/form_select.md)
59+
* [Matestack Core Component: Form Input](api/100-components/form_input.md)
60+
* [Matestack Core Component: Article](api/100-components/article.md)
61+
* [Matestack Core Component: Form Textarea](api/100-components/form_textarea.md)
62+
* [Matestack Core Component: Code](api/100-components/code.md)
63+
* [Matestack Core Component: Header](api/100-components/header.md)
64+
* [Matestack Core Component: Area](api/100-components/area.md)
65+
* [Matestack Core Component: U](api/100-components/u.md)
66+
* [Matestack Core Component: Progress](api/100-components/progress.md)
67+
* [Matestack Core Component: Legend](api/100-components/legend.md)
68+
* [Matestack Core Component: Mark](api/100-components/mark.md)
69+
* [Matestack Core Component: Optgroup](api/100-components/optgroup.md)
70+
* [Matestack Core Component: Label](api/100-components/label.md)
71+
* [Matestack Core Component: Noscript](api/100-components/noscript.md)
72+
* [Matestack Core Component: Address](api/100-components/address.md)
73+
* [Matestack Core Component: Form Submit](api/100-components/form_submit.md)
74+
* [Matestack Core Component: S](api/100-components/s.md)
75+
* [Matestack Core Component: Data](api/100-components/data.md)
76+
* [Matestack Core Component: Span](api/100-components/span.md)
77+
* [Matestack Core Component: Hr](api/100-components/hr.md)
78+
* [Matestack Core Component: Q](api/100-components/q.md)
79+
* [Matestack Core Component: Div](api/100-components/div.md)
80+
* [Matestack Core Component: Dialog](api/100-components/dialog.md)
81+
* [Matestack Core Component: Fieldset](api/100-components/fieldset.md)
82+
* [Matestack Core Component: Em](api/100-components/em.md)
83+
* [Matestack Core Component: Dl](api/100-components/dl.md)
84+
* [Matestack Core Component: Datalist](api/100-components/datalist.md)
85+
* [Matestack Core Component: Sup](api/100-components/sup.md)
86+
* [Matestack Core Component: Table](api/100-components/table.md)
87+
* [Matestack Core Component: Paragraph](api/100-components/paragraph.md)
88+
* [Matestack Core Component: Ins](api/100-components/ins.md)
89+
* [Matestack Core Component: kbd](api/100-components/kbd.md)
90+
* [Matestack Core Component: Param](api/100-components/param.md)
91+
* [Matestack Core Component: Bdo](api/100-components/bdo.md)
92+
* [Matestack Core Component: Figure](api/100-components/figure.md)
93+
* [Matestack Core Component: Iframe](api/100-components/iframe.md)
94+
* [Matestack Core Component: Dfn](api/100-components/dfn.md)
95+
* [Matestack Core Component: Form](api/100-components/form.md)
96+
* [Matestack Core Component: rails\_view](api/100-components/rails_view.md)
97+
* [Matestack Core Component: Del](api/100-components/del.md)
98+
* [Matestack Core Component: Input](api/100-components/input.md)
99+
* [Matestack Core Component: Plain](api/100-components/plain.md)
100+
* [Matestack Core Component: Unescaped](api/100-components/unescaped.md)
101+
* [Matestack Core Component: Rt](api/100-components/rt.md)
102+
* [Matestack Core Component: Meter](api/100-components/meter.md)
103+
* [Matestack Core Component: Output](api/100-components/output.md)
104+
* [Matestack Core Component: Onclick](api/100-components/onclick.md)
105+
* [Matestack Core Component: Dd](api/100-components/dd.md)
106+
* [Matestack Core Component: Form Radio](api/100-components/form_radio.md)
107+
* [Matestack Core Component: Var](api/100-components/var.md)
108+
* [Matestack Core Component: Wbr](api/100-components/wbr.md)
109+
* [Matestack Core Component: Small](api/100-components/small.md)
110+
* [Matestack Core Component: Object](api/100-components/object.md)
111+
* [Matestack Core Component: Bdi](api/100-components/bdi.md)
112+
* [Matestack Core Component: Lists](api/100-components/list.md)
113+
* [Matestack Core Component: Collection](api/100-components/collection.md)
114+
* [Matestack Core Component: Rp](api/100-components/rp.md)
115+
* [Matestack Core Component: Caption](api/100-components/caption.md)
116+
* [Matestack Core Component: Section](api/100-components/section.md)
117+
* [Matestack Core Component: Select](api/100-components/select.md)
118+
* [Matestack Core Component: Nav](api/100-components/nav.md)
119+
* [Matestack Core Component: Youtube](api/100-components/youtube.md)
120+
* [Matestack Core Component: Img](api/100-components/img.md)
121+
* [Matestack Core Component: Footer](api/100-components/footer.md)
122+
* [Matestack Core Component: Pre](api/100-components/pre.md)
123+
* [Matestack Core Component: Template](api/100-components/template.md)
124+
* [Matestack Core Component: Ruby](api/100-components/ruby.md)
125+
* [Matestack Core Component: Details](api/100-components/details.md)
126+
* [Matestack Core Component: Textarea](api/100-components/textarea.md)
127+
* [Matestack Core Component: Heading](api/100-components/heading.md)
128+
* [Matestack Core Component: B](api/100-components/b.md)
129+
* [Matestack Core Component: Link](api/100-components/link.md)
130+
* [Matestack Core Component: Main](api/100-components/main.md)
131+
* [Matestack Core Component: Icon](api/100-components/icon.md)
132+
* [Matestack Core Component: Sub](api/100-components/sub.md)
133+
* [Matestack Core Component: Strong](api/100-components/strong.md)
134+
* [Matestack Core Component: Cite](api/100-components/cite.md)
135+
* [Matestack Core Component: PG](api/100-components/pg.md)
136+
* [Matestack Core Component: Action](api/100-components/action.md)
137+
* [Matestack Core Component: Picture](api/100-components/picture.md)
138+
* [Matestack Core Component: Form Checkbox](api/100-components/form_checkbox.md)
139+
* [Matestack Core Component: Option](api/100-components/option.md)
140+
* [Matestack Core Component: Transition](api/100-components/transition.md)
141+
* [Matestack Core Component: Cable](api/100-components/cable.md)
142+
* [Matestack Core Component: Async](api/100-components/async.md)
143+
* [Matestack Core Component: Map](api/100-components/map.md)
144+
* [matestack core component: Toggle](api/100-components/toggle.md)
145+
* [Matestack Core Component: Video](api/100-components/video.md)
146+
* [Matestack Core Component: Button](api/100-components/button.md)
147+

docs/api/100-components/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
Matestack provides you with a wide set of core components that enable you to easily build your UI.
44

55
Please use the sidebar to navigate to the component documentations.
6+

docs/api/100-components/abbr.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
11
# Matestack Core Component: Abbr
22

3-
The HTML `<abbr>` tag, implemented in Ruby.
3+
The HTML `<abbr>` tag, implemented in Ruby.
44

55
## Parameters
6+
67
This component expects 1 required param and various optional configuration params and can either yield content or display what gets passed to the `text` configuration param.
78

89
### Title - required
10+
911
Expects a string with the meaning of the abbreviation contained within the tag.
1012

11-
### Text (optional)
13+
### Text \(optional\)
14+
1215
Expects a string which will be displayed as the content inside the `<abbr>` tag. If this is not passed, a block must be passed instead.
1316

14-
### HMTL attributes (optional)
17+
### HMTL attributes \(optional\)
18+
1519
This component accepts all the canonical [HTML global attributes](https://www.w3schools.com/tags/ref_standardattributes.asp) like `id` or `class`.
1620

1721
## Examples
1822

19-
### Example 1 - render options[:text] param
23+
### Example 1 - render options\[:text\] param
2024

2125
```ruby
2226
abbr title: 'Hypertext Markup Language', text: 'HTML'
2327
```
2428

2529
returns
2630

27-
```html
31+
```markup
2832
<abbr title="Hypertext Markup Language">HTML</abbr>
2933
```
3034

@@ -38,6 +42,7 @@ end
3842

3943
returns
4044

41-
```html
45+
```markup
4246
<abbr title="Cascading Style Sheets"><span>CSS</span></abbr>
4347
```
48+

docs/api/100-components/action.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ end
123123

124124
#### Perform redirect
125125

126-
We can also perform a redirect (full page load) that only gets triggered on success and also accepts further params:
126+
We can also perform a redirect \(full page load\) that only gets triggered on success and also accepts further params:
127127

128-
Please be aware, that emiting a event doen't have an effect when performing a redirect instead of a transition, as the whole page (including the surrounding app) gets reloaded!
128+
Please be aware, that emiting a event doen't have an effect when performing a redirect instead of a transition, as the whole page \(including the surrounding app\) gets reloaded!
129129

130130
```ruby
131131
success: {
@@ -166,7 +166,6 @@ end
166166

167167
Same applies for the `failure` configuration.
168168

169-
170169
### Failure
171170

172171
As counterpart to the success part of the action component, there is also the possibility to define the failure behavior. This is what gets triggered after the response to our action returns a failure code, usually in the range of `400` or `500` HTTP status codes.
@@ -190,7 +189,7 @@ failure: {
190189
}
191190
```
192191

193-
### ID (optional)
192+
### ID \(optional\)
194193

195194
This parameter accepts a string of ids that the action component should have:
196195

@@ -200,11 +199,11 @@ id: 'my-action-id'
200199

201200
which renders as an HTML `id` attribute, like so:
202201

203-
```html
202+
```markup
204203
<a id="my-action-id">...</a>
205204
```
206205

207-
### Class (optional)
206+
### Class \(optional\)
208207

209208
This parameter accepts a string of classes that the action component should have:
210209

@@ -214,7 +213,7 @@ class: 'my-action-class'
214213

215214
which renders as an HTML `class` attribute, like so:
216215

217-
```html
216+
```markup
218217
<a class="my-action-class">...</a>
219218
```
220219

@@ -228,7 +227,7 @@ See some common use cases for the action core component below:
228227

229228
### Example 1 - Async request with payload
230229

231-
First, make sure our routes accept requests the way we want to use them. Modify them in `config/routes.rb`
230+
First, make sure our routes accept requests the way we want to use them. Modify them in `config/routes.rb`
232231

233232
```ruby
234233
post '/action_test', to: 'action_test#test', as: 'action_test'
@@ -326,8 +325,7 @@ end
326325

327326
### Example 3.1: Async request with success event emit used for rerendering
328327

329-
Below, we define an action component and an async component. The async component is documented [here](/docs/components/async.md),
330-
for now it is just important that it waits for our `action_config` success message and will get re-rendered.
328+
Below, we define an action component and an async component. The async component is documented [here](https://github.com/matestack/matestack-ui-core/tree/829eb2f5a7483ef4b78450a5429589ec8f8123e8/docs/components/async.md), for now it is just important that it waits for our `action_config` success message and will get re-rendered.
331329

332330
```ruby
333331
class ExamplePage < Matestack::Ui::Page
@@ -358,7 +356,7 @@ class ExamplePage < Matestack::Ui::Page
358356
end
359357
```
360358

361-
Now, if we click the button and everything goes well (which should be the case in this very simple example), we can see the timestamp gets updated - nice!
359+
Now, if we click the button and everything goes well \(which should be the case in this very simple example\), we can see the timestamp gets updated - nice!
362360

363361
### Example 3.2: Async request with success event emit used for notification
364362

@@ -388,14 +386,14 @@ class ExamplePage < Matestack::Ui::Page
388386
}
389387
end
390388

391-
end
389+
end
392390
```
393391

394392
This time, after clicking our action component we should see the `good job!` message that was initially hidden and disappears again after 300ms.
395393

396394
### Example 3.3: Async request with failure event emit used for notification
397395

398-
In the examples before, we always assumed (and made sure) that things went well. Now, it's the first time to use the `failure_action_test_path` to see how we can notify the user if things go wrong!
396+
In the examples before, we always assumed \(and made sure\) that things went well. Now, it's the first time to use the `failure_action_test_path` to see how we can notify the user if things go wrong!
399397

400398
```ruby
401399
class ExamplePage < Matestack::Ui::Page
@@ -546,6 +544,7 @@ end
546544

547545
Now, we can visit `localhost:3000/action_test/page1` and see our first page, shown by the `This is Page 1` text.
548546

549-
There, we can click on our button (`Click me!`) and get transfered to the second page. There, we see the `This is Page 2` text and, for 300ms, our `server says: good job!` success message. Neat!
547+
There, we can click on our button \(`Click me!`\) and get transfered to the second page. There, we see the `This is Page 2` text and, for 300ms, our `server says: good job!` success message. Neat!
548+
549+
If we click the button \(`Click me!`\) on the second page, we get the failure message \(`server says: something went wrong!`\) and get sent back to page 2, just as we wanted to.
550550

551-
If we click the button (`Click me!`) on the second page, we get the failure message (`server says: something went wrong!`) and get sent back to page 2, just as we wanted to.

docs/api/100-components/address.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
The HTML `<address>` tag, implemented in Ruby.
44

55
## Parameters
6+
67
This component can take various optional configuration params and either yield content or display what gets passed to the `text` configuration param.
78

8-
### Text (optional)
9+
### Text \(optional\)
10+
911
Expects a string which will be displayed as the content inside the `<address>` tag. If this is not passed, a block must be passed instead.
1012

11-
### HMTL attributes (optional)
13+
### HMTL attributes \(optional\)
14+
1215
This component accepts all the canonical [HTML global attributes](https://www.w3schools.com/tags/ref_standardattributes.asp) like `id` or `class`.
1316

1417
## Examples
@@ -27,24 +30,25 @@ end
2730

2831
returns
2932

30-
```html
33+
```markup
3134
<address>
3235
Codey McCodeface<br>
3336
1 Developer Avenue<br>
3437
Techville
3538
</address>
3639
```
3740

38-
### Example 2 - render options[:text] param
41+
### Example 2 - render options\[:text\] param
3942

4043
```ruby
4144
address text: 'PO Box 12345'
4245
```
4346

4447
returns
4548

46-
```html
49+
```markup
4750
<address>
4851
PO Box 12345
4952
</address>
5053
```
54+

0 commit comments

Comments
 (0)