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
/* If a Boostrap container is shown in an overlay,
489
-
don't add to the existing padding of the overlay box. */
490
490
up-modal, up-drawer, up-popup {
491
491
.container, .container-fluid {
492
-
padding-left: 0;
493
-
padding-right: 0;
492
+
padding-left: 0; /* The overlay box already has padding */
493
+
padding-right: 0; /* The overlay box already has padding */
494
+
max-width: none; /* The overlay box already has max-width */
494
495
}
495
496
}
496
497
```
@@ -590,13 +591,6 @@ Example from a real application:
590
591
🎥 *Show demo*
591
592
592
593
593
-
---
594
-
595
-
As we stack layers, multiple copies of your app may run concurrently.
596
-
597
-
598
-
This requires some changes.
599
-
600
594
---
601
595
602
596
Layers are fully isolated
@@ -615,7 +609,7 @@ If you want to do *anything* in another layer, use an `[up-layer]` attribute:
615
609
```html
616
610
<ahref="/path"up-target=".foo"up-layer="parent"> <!-- will only match in parent layer -->
617
611
<ahref="/path"up-target=".foo"up-layer="root"> <!-- will only match in root layer -->
618
-
<ahref="/path"up-target=".foo"up-layer="new"> <!-- opens a new modal overlay -->
612
+
<ahref="/path"up-target=".foo"up-layer="modal"><!-- opens a new modal overlay -->
619
613
```
620
614
621
615
You can always look at `[up-layer]` to know what layer is going to be updated.\
@@ -707,6 +701,8 @@ Events resulting from user navigation (like `up:link:follow`, `up:request:load`)
707
701
---
708
702
709
703
704
+
## Listening to your layer
705
+
710
706
Unpoly 2 provides convenience functions `up.layer.on()` and `up.layer.emit()`\
711
707
to listen / emit on the current layer:
712
708
@@ -715,6 +711,11 @@ up.layer.on('up:request:load', callback) // only listen to events from the curre
715
711
up.layer.emit('my:event') // emit my:event on the current layer's element
716
712
```
717
713
714
+
The current layer is the layer in which you are compiling or navigating.
715
+
716
+
717
+
## Listening to everything
718
+
718
719
Layer events will still bubble up to the `document`,\
719
720
so you can still register
720
721
a listener for events from any layer:
@@ -760,6 +761,8 @@ up.fail_layer.root? # true
760
761
Why we need sub-interactions
761
762
============================
762
763
764
+
🎥 *Show scenario in the demo app*
765
+
763
766
This story is the base use case for a sub-interaction:
764
767
765
768
- User starts filling out the form for a new project
@@ -769,8 +772,6 @@ This story is the base use case for a sub-interaction:
769
772
- When the company was created in the overlay, the overlay should close.\
770
773
The project form should now have the newly created company selected.
771
774
772
-
🎥 *Show scenario in the demo*
773
-
774
775
----
775
776
776
777
<!-- _class: no-watermark no-padding -->
@@ -878,7 +879,7 @@ Another common callback reloads `<select>` options and selects the new foreign k
878
879
879
880
---
880
881
881
-
## Why I think this is useful
882
+
## Why this is useful
882
883
883
884
- You already have a CRUD interaction for companies
884
885
- You can now embed the existing company form into your project form
@@ -974,7 +975,9 @@ The link's layer will be closed when the link is clicked:
974
975
975
976
The JSON value of the `[up-accept]` attribute becomes the overlay's acceptance value.
976
977
977
-
The link will only be followed if the link is on the root layer (where there is no overlay to accept).
978
+
The link's `[href]` is just a fallback here. It will only be followed if the link is on the root layer (where there is no overlay to accept). You can also omit the `[href]` attribute.
979
+
980
+
<br>
978
981
979
982
**I'm not a huge fan of this** because it couples the overlay interaction to its parent layer.\
980
983
But some of you asked for it, and I guess sometimes the overlay cannot be decoupled
Unpoly 2 uses different HTML markup for its overlays. If you have customized your modals and popup with CSS, this is a breaking change for you.
1227
+
Unpoly 2 uses a more compact HTML markup for its overlays.\
1228
+
If you have customized your modals and popup with CSS, this is a breaking change for you.
1225
1229
1226
1230
Luckily the new HTML structure is very similiar:
1227
1231
@@ -1421,7 +1425,7 @@ Customizing overlay HTML
1421
1425
1422
1426
The HTML markup for a given overlay mode is now static. There is no `up.modal.config.template` anymore.
1423
1427
1424
-
Many former use cases for `up.modal.config.template` are covered by assigning a class, size.
1428
+
Many former use cases for `up.modal.config.template` are covered by assigning a class or size.
1425
1429
1426
1430
If you absolutely, positively need to customize the overlay HTML, you may use the `up:layer:opened` event to modify the layer as it becomes visible. The event is emitted
1427
1431
before the opening animation starts.
@@ -1489,7 +1493,7 @@ Switching screens vs. updating boxes
1489
1493
1490
1494
**💡 Not all fragment updates are user navigation.**
1491
1495
1492
-
When Unpoly 1 updates fragment, it applies many opinionated defaults:
1496
+
When Unpoly 1 updates a fragment, it applies many opinionated defaults:
If you have compilers that only set default attributes, consider using a single event listener that manipulates `event.renderOptions` instead. It's much leaner than a compiler, which needs to be called for every new fragment.
2365
2386
2366
2387
---
2388
+
<!-- _class: pro -->
2367
2389
2368
2390
Advanced example
2369
2391
----------------
@@ -2787,13 +2809,26 @@ Extensive rework of almost all APIs.
2787
2809
</div>
2788
2810
</div>
2789
2811
2812
+
2813
+
---
2814
+
2815
+
2816
+
Roadmap
2817
+
=======
2818
+
2819
+
There will be two major Unpoly releases in **December 2020 / January 2021**:
2820
+
2821
+
- The current version 0.62 will be published as **Unpoly 1.0**.
2822
+
- **Unpoly 2.0** will be released as a major upgrade.
0 commit comments