You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While we have over 1000 specs passing, in 3 different configurations, and several large apps using Hyperstack, documentation is a lagging. If you see this icon it means we are working hard to
28
+
While we have over 1000 specs passing in 3 different configurations, and several large apps using Hyperstack, documentation is lagging. If you see this icon it means we are working hard to
29
29
get the docs up to the same state as the code.
30
30
31
-
Chapters without the work-in-progress flag, are still draft, and any issues are greatly appreciated, or better yet follow the `Edit on Github` link make your propsed corrections, and submit a pull request.
31
+
Chapters without the work-in-progress flag are still draft, and any issues are greatly appreciated, or better yet follow the `Edit on Github` link, make your proposed corrections, and submit a pull request.
32
32
33
33
## Setup and installation
34
34
@@ -46,7 +46,7 @@ Hyperstack is supported by a friendly, helpful community, both for users, and co
46
46
47
47
## Roadmap
48
48
49
-
We are currently driving towards our 1.0 release. Currently we are at 1.0.alpha1.5 release candidate. There is a list of 163 open issues including some bugs, many requested enhancements. The plan is to triage the issues, and do a weekly release until the issues are closed as deemed not needed for a 1.0 release.
49
+
We are currently driving towards our 1.0 release. Currently we are at 1.0.alpha1.5 release candidate. There is a list of 163 open issues including some bugs, documentation issues and many requested enhancements. The plan is to triage the issues and do a weekly release until the issues are closed or deemed not needed for a 1.0 release.
50
50
51
51
Please consider contributing by grabbing a "good first issue", or just adding your thoughts, thumbs up, or down on any issues that interest you.
52
52
@@ -55,8 +55,6 @@ Please consider contributing by grabbing a "good first issue", or just adding yo
55
55
In general, if you would like to help in any way, please read the [CONTRIBUTING](https://github.com/hyperstack-org/hyperstack/blob/edge/CONTRIBUTING.md) file for suggestions.
56
56
System setup for the development of Hyperstack itself is documented in this file.
57
57
58
-
More specifically, we have a [Feature Matrix](https://github.com/hyperstack-org/hyperstack/blob/edge/docs/feature_matrix.md) that needs to be filled with missing features. The idea is that you can check here what the implementation status is of a Ruby \(on Rails\) feature. And if you have the time and skill you're more then encouraged to implement or fix one or two. But if you're not in a position to contribute code, just expanding and maintaining this table would be excellent.
Copy file name to clipboardExpand all lines: docs/client-dsl/component-basics.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ end
38
38
39
39
To create a component instance, you reference its class name as a method call from another component. This creates a new instance, passes any parameters and proceeds with the component lifecycle.
40
40
41
-
> **[The actual type created is an Element read on for details...](/notes.html#component_instances)**
41
+
> **[The actual type created is an Element read on for details...](notes.md#component-instances)**
42
42
43
43
```ruby
44
44
classFirstComponent < HyperComponent
@@ -80,7 +80,7 @@ Components can receive new params, causing the component to update. **[More on
80
80
81
81
## Component State
82
82
83
-
Component also have *state*, which is stored in instance variables. You signal a state change using the `mutate` method. Component state is a fundamental concept covered **[here](state.md)**.
83
+
Components also have *state*, which is stored in instance variables. You signal a state change using the `mutate` method. Component state is a fundamental concept covered **[here](state.md)**.
84
84
85
85
86
86
## Life Cycle Callbacks
@@ -101,7 +101,7 @@ class Clock < HyperComponent
101
101
end
102
102
```
103
103
104
-
The complete list of life cycle methods and their syntax is discussed in detail in the **[Lifecycle Methods](/lifecycle-methods)** section.
104
+
The complete list of life cycle methods and their syntax is discussed in detail in the **[Lifecycle Methods](lifecycle-methods.md)** section.
105
105
106
106
## Events, Event Handlers, and Component Callbacks
Copy file name to clipboardExpand all lines: docs/client-dsl/elements-and-rendering.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,14 +13,14 @@ The only major difference between the systems is that JSX compiles directly to R
13
13
As each React element is generated it is stored by Hyperstack in a *rendering buffer*, and when the component finishes the rendering block, the buffer is returned as the result of the components render callback. If the expression has a child block (like `DIV { 'hello' }`) the block is passed to the `createElement` as a the child function the same
14
14
as JSX would do.
15
15
16
-
When an expression like this is evaluated (**[see the full example in the section on params...](/params#named-child-components-as-params)**)
16
+
When an expression like this is evaluated (**[see the full example in the section on params...](../params#named-child-components-as-params)**)
17
17
```ruby
18
18
Reveal(content:DIV { 'I came from the App' })
19
19
```
20
20
we need to *remove* the generated `DIV` element *out* of the rendering buffer before passing it to `Reveal`. This is done automatically by applying the `~` (remove) operator to the
21
21
`DIV` as it is passed on.
22
22
23
-
In general will never have to manually use the remove (`~`) operator, as React's declarative nature makes storing elements for later use not as helpful in more
23
+
In general you will never have to manually use the remove (`~`) operator, as React's declarative nature makes storing elements for later use not as necessary as in more
Copy file name to clipboardExpand all lines: docs/client-dsl/events-and-callbacks.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,14 +115,14 @@ no reason not use the `on` method to attach handlers. Both will keep your code
115
115
The notation `on(:click)` is short for passing a proc to a param named `on_click`. In general `on(:xxx)` will pass the
116
116
given block as the `on_xxx` parameter in a Hyperstack component and `onXxx` in a JS component.
117
117
118
-
All the built-in events and many React libraries follow the `on_xxx` (or `onXxx` in JS.) However even if a library does not use
118
+
All the built-in events and many React libraries follow the `on_xxx` (or `onXxx` in JS) convention. However even if a library does not use
119
119
this convention you can still attach the handler using `on('<name-of-param>')`. Whatever string is inside the `<..>` brackets will
120
120
be used as the param name.
121
121
122
122
Likewise the `fires` method is shorthand for creating a `Proc` param following the `on_xxx` naming convention:
123
123
124
124
`fires :foo` is short for
125
-
`param :foo, type: Proc, alias: :foo!`
125
+
`param :on_foo, type: Proc, alias: :foo!`
126
126
127
127
### The `Event` Object
128
128
@@ -147,7 +147,7 @@ Besides the UI there are several other sources of events:
147
147
The way you receive events from these sources depends on the event. Typically though the method will either take a block, or callback proc, or in many cases will return a Promise.
148
148
Regardless the event handler will do one of three things: mutate some state within the component, fire an event to a higher level component, or update some shared store.
149
149
150
-
> For details on updating shared stores, which is often the best answer **[see the chapter on HyperState...](/hyper-state.md)**
150
+
> For details on updating shared stores, which is often the best answer **[see the chapter on HyperState...](../hyper-state.md)**
151
151
152
152
You have seen the `every` method used to create events throughout this chapter, here is an example with an HTTP post (which returns a promise.)
Copy file name to clipboardExpand all lines: docs/client-dsl/javascript-components.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
Hyperstack gives you full access to the entire universe of JavaScript libraries and components directly within your Ruby code.
4
4
5
-
Everything you can do in JavaScript is simple to do in Opal-Ruby; this includes passing parameters between Ruby and JavaScript and even passing Ruby methods as JavaScript callbacks. See the JavaScript section for more information.
5
+
Everything you can do in JavaScript is simple to do in Opal-Ruby; this includes passing parameters between Ruby and JavaScript and even passing Ruby methods as JavaScript callbacks.
6
6
7
-
> **[For more information on writing Javascript within your Ruby code...](/notes.md#Javascript)**
7
+
> **[For more information on writing Javascript within your Ruby code...](notes.md#javascript)**
8
8
9
9
## Importing Javascript or React Libraries
10
10
@@ -64,7 +64,7 @@ Libraries used often with Hyperstack projects:
64
64
65
65
### Making Custom Wrappers - WORK IN PROGRESS ...
66
66
67
-
Hyperstack will automatically import Javascript components and component libraries as discussed above. Sometimes for
67
+
<imgalign="left"width="100"height="100"style="margin-right: 20px"src="https://github.com/hyperstack-org/hyperstack/blob/edge/docs/wip.png?raw=true"> Hyperstack will automatically import Javascript components and component libraries as discussed above. Sometimes for
68
68
complex libraries that you will use a lot it is useful to add some syntactic sugar to the wrapper.
69
69
70
70
This can be done using the `imports` directive and the `Hyperstack::Component::NativeLibrary` superclass.
@@ -134,7 +134,7 @@ finally require it in your hyper_component.rb file:
134
134
135
135
require'hyperstack/component/jquery'
136
136
```
137
-
You can access jQuery anywhere in your code using the `Element` or the `jQ`methods.
137
+
You can access jQuery anywhere in your code using the `jQ`method.
138
138
For details see https://github.com/opal/opal-jquery
139
139
140
140
> Note most of the time you will not need to manipulate the dom directly.
Copy file name to clipboardExpand all lines: docs/client-dsl/lifecycle-methods.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ A component may define lifecycle methods for each phase of the components lifecy
10
10
*`render` will be called again here
11
11
*`after_update`
12
12
*`before_unmount`
13
-
*`rescues` The `rescues` callback is described **[here...](/error-recovery.md)**
13
+
*`rescues` The `rescues` callback is described **[here...](error-recovery.md)**
14
14
15
15
All the Component Lifecycle methods (except `render`) may take a block or the name(s) of instance method(s) to be called. The `render` method always takes a block.
16
16
@@ -21,7 +21,7 @@ class MyComponent < HyperComponent
21
21
end
22
22
23
23
render do
24
-
# return some elements
24
+
# return some elements
25
25
end
26
26
27
27
before_unmount :cleanup# call the cleanup method before unmounting
Copy file name to clipboardExpand all lines: docs/client-dsl/params.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,7 @@ class App < HyperComponent
84
84
end
85
85
end
86
86
```
87
+
[see the spec...](https://github.com/hyperstack-org/hyperstack/blob/24131990ea1cdacfc9efc328d4994a7c2d86a0f4/docs/specs/spec/client-dsl/params_spec.rb#L4-L25)
87
88
88
89
`render` is used to render the child components. **[For details ...](component-details.md#rendering-children)**
89
90
@@ -163,7 +164,7 @@ end
163
164
Even though we have not gotten to event handlers yet, you can see what is going on: When we click the update button we call `force_update!`
164
165
which will force the `App` component to rerender.
165
166
> By the way `force_update!` is almost never used, but we are using it here
166
-
just to make the example clear.)
167
+
just to make the example clear. Its also one of the reasons this example gets into trouble. Read on!
167
168
168
169
Will `Comp2` rerender? No - because even though we are creating a new hash, the old hash and new hash are equal in value.
169
170
@@ -194,5 +195,5 @@ So when we compare *old* verses *new* we are comparing the same object, so the v
194
195
195
196
That does not seem like a very happy ending, but the case we used was not very realistic. If you stick to passing simple scalars, or hashes and arrays
196
197
whose values don't change after they have been passed, things will work fine. And for situations where you do need to store and
197
-
manipulate complex data, you can use the **[the Hyperstack::Observable module](/hyper-state/README.md)** to build safe classes that don't
198
+
manipulate complex data, you can use the **[the Hyperstack::Observable module](../hyper-state/README.md)** to build safe classes that don't
0 commit comments