Skip to content

Commit c9d3419

Browse files
committed
Update the documentation to be closer to Vue.js official one
1 parent b9416f2 commit c9d3419

File tree

13 files changed

+126
-48
lines changed

13 files changed

+126
-48
lines changed

docs-source/book/SUMMARY.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* [Handling User Input](introduction/README.md#handling-user-input)
99
* [Composing with Components](introduction/README.md#composing-with-components)
1010

11-
## Essential Topics
11+
## Essentials
1212
* [The Vue Instance](essential/the-vue-instance.md)
1313
* [Template Syntax](essential/template-syntax.md)
1414
* [Computed Properties and Watchers](essential/computed-and-watchers.md)
@@ -24,9 +24,24 @@
2424
* [Content Distribution with Slots](essential/components.md#content-distribution)
2525
* [Dynamic Components](essential/components.md#dynamic-components)
2626

27+
## Transitions & Animation
28+
* [Enter/Leave & List Transitions](transitions/transitions.md)
29+
* [State Transitions](transitions/transitioning-state.md)
30+
31+
## Reusability & Composition
32+
* [Extending Components](composition/extending-components.md)
33+
* [Extending Java Components](composition/extending-components.md#extending-java-component)
34+
* [Extending JS Components](composition/extending-components.md#extending-js-component)
35+
* [Custom Directives](composition/custom-directives.md)
36+
* [Render Function](composition/render-function.md)
37+
* [Basics](composition/render-function.md#basics)
38+
* [The `VNodeBuilder` Instance](composition/render-function.md#v-node-builder-instance)
39+
* [Replacing Template Features with Plain Java](composition/render-function.md#replacing-template-feature-in-java)
40+
* [Plugins](composition/plugins.md)
41+
2742
## Integration with GWT
2843
* [Styles](gwt-integration/styles.md)
29-
* [Client Bundles (Images)](gwt-integration/client-bundles.md)
44+
* [Client Bundles](gwt-integration/client-bundles.md)
3045
* [User Panels](gwt-integration/user-panels.md)
3146
* [JsInterop](js-interop/README.md)
3247
* [JsObject](js-interop/README.md#js-object)
@@ -35,18 +50,14 @@
3550
* [array](js-interop/README.md#array)
3651
* [JsTools](js-interop/README.md#js-tools)
3752

53+
## Tooling
54+
* [Unit Testing](tooling/unit-testing.md)
55+
56+
## Scaling Up
57+
* [Routing](scaling-up/routing.md)
58+
3859
## Advanced Topics
3960
* [Integrating With JS Components](advanced/integrating-with-js-components.md)
4061
* [Using JS Components in Java](advanced/integrating-with-js-components.md#using-js-components-in-java)
4162
* [Using our Java Components in JS](advanced/integrating-with-js-components.md#using-java-components-in-js)
42-
* [Extending Components](advanced/extending-components.md)
43-
* [Extending Java Components](advanced/extending-components.md#extending-java-component)
44-
* [Extending JS Components](advanced/extending-components.md#extending-js-component)
45-
* [Render Function](advanced/render-function.md)
46-
* [Basics](advanced/render-function.md#basics)
47-
* [The `VNodeBuilder` Instance](advanced/render-function.md#v-node-builder-instance)
48-
* [Replacing Template Features with Plain Java](advanced/render-function.md#replacing-template-feature-in-java)
49-
* [Custom Directives](advanced/custom-directives.md)
50-
* [Plugins](advanced/plugins.md)
51-
* [Routing](advanced/routing.md)
52-
* [And more!](advanced/and-more.md)
63+
* [Unsupported Features](advanced/unsupported-features.md)

docs-source/book/advanced/and-more.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs-source/book/advanced/integrating-with-js-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ You can then simply use it in your Java Component template:
147147

148148
### Extending a JS Component
149149

150-
We can also [extend JS Components](extending-components.md#extending-js-component) (this is required for some Vue plugins for example).
150+
We can also [extend JS Components](../composition/extending-components.md#extending-js-component) (this is required for some Vue plugins for example).
151151

152152
## Using our Java Components in JS {#using-java-components-in-js}
153153

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Unsupported Features
2+
3+
Vue GWT doesn't support all of Vue.js features yet.
4+
If you would like to help we are [open to contributions](https://github.com/Axellience/vue-gwt)!
5+
6+
Here is the list of unsupported features:
7+
8+
* [Mixins](https://vuejs.org/v2/guide/mixins.html)
9+
* For now you can use [Java inheritance to extend a given Component](extending-components.md) instead.
10+
* [Filters](https://vuejs.org/v2/guide/filters.html)
11+
* Would require the Vue GWT parser to support those expressions. Type checking would also be challenging.
12+
* [State Management](https://vuejs.org/v2/guide/state-management.html)
13+
* Would require JsInterop for Vuex.
14+
* [Server Side Rendering](https://vuejs.org/v2/guide/ssr.html)
15+
* Vue GWT components compiled and loaded in a Vue.js app should work server side (but not tested).
16+
* Full Vue GWT app would probably not work server side or would require lots of work.
File renamed without changes.

docs-source/book/advanced/extending-components.md renamed to docs-source/book/composition/extending-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ And here is the traditional live example for proof 😉 :
9090

9191
## Extending an existing JS Component {#extending-js-component}
9292

93-
Has you saw in [integrating with JS Components](integrating-with-js-components.md) that we can use JS Components in Vue GWT.
93+
Has you saw in [integrating with JS Components](../advanced/integrating-with-js-components.md) that we can use JS Components in Vue GWT.
9494

9595
Well, we can also extends them!
9696

docs-source/book/advanced/plugins.md renamed to docs-source/book/composition/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ This can be useful if your plugin requires some kind of registration, or other s
4141

4242
## Example With Vue Router
4343

44-
We built a [JsInterop wrapper of the Vue Router](routing.md) plugin for you.
44+
We built a [JsInterop wrapper of the Vue Router](../scaling-up/routing.md) plugin for you.
4545
You can [checkout how it works](https://github.com/Axellience/vue-router-gwt) if you need a working example of integration.
File renamed without changes.

docs-source/book/gwt-integration/client-bundles.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
# GWT Client Bundles (Images)
1+
# GWT Client Bundles
22

33
!INCLUDE "../dependencies.md"
44

55
Vue GWT also support GWT `ClientBundles`.
66

7-
Let see how this work with an example.
7+
Lets see how this work with an example.
88

99
***KittenClientBundle.java***
1010

1111
First, we create a simple `ClientBundle` with an `ImageResource`:
1212

1313
```java
14-
public interface KittenClientBundle extends ClientBundle
15-
{
14+
public interface KittenClientBundle extends ClientBundle {
1615
KittenClientBundle INSTANCE = GWT.create(KittenClientBundle.class);
1716

1817
@Source("kitten.jpg")
@@ -25,13 +24,16 @@ There is no need for any special annotations on it.
2524
***KittenClientBundle.java***
2625

2726
We then create a Component to use our `ClientBundle`.
28-
In this component we add a public field for our `KittenClientBundle`.
27+
In this component we add a computed property for our `KittenClientBundle`.
2928
This will expose the bundle to the Template.
3029

3130
```java
3231
@Component
3332
public class KittenComponent extends VueComponent {
34-
@JsProperty KittenClientBundle myKittenBundle = KittenClientBundle.INSTANCE;
33+
@Computed
34+
public KittenClientBundle getMyKittenBundle() {
35+
return KittenClientBundle.INSTANCE;
36+
}
3537
}
3638
```
3739

@@ -43,13 +45,14 @@ We can then simply access our bundle instance from the template:
4345
<img v-bind:src="myKittenBundle.myKitten().getSafeUri().asString()"/>
4446
```
4547

46-
4748
{% raw %}
4849
<div class="example-container" data-name="kittenComponent">
4950
<span id="kittenComponent"></span>
5051
</div>
5152
{% endraw %}
5253

54+
You could also directly expose your ImageResource to the template, it's really up to you.
55+
5356
## Hey, Couldn't I Use This for Styles?
5457

5558
Yes you can.
File renamed without changes.

0 commit comments

Comments
 (0)