unpoly-rails 0.24.1 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of unpoly-rails might be problematic. Click here for more details.

Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README_RAILS.md +8 -1
  4. data/dist/unpoly.css +22 -10
  5. data/dist/unpoly.js +406 -196
  6. data/dist/unpoly.min.css +1 -1
  7. data/dist/unpoly.min.js +3 -3
  8. data/lib/assets/javascripts/unpoly/flow.js.coffee +36 -19
  9. data/lib/assets/javascripts/unpoly/form.js.coffee +1 -2
  10. data/lib/assets/javascripts/unpoly/link.js.coffee +2 -2
  11. data/lib/assets/javascripts/unpoly/modal.js.coffee +174 -81
  12. data/lib/assets/javascripts/unpoly/navigation.js.coffee +3 -1
  13. data/lib/assets/javascripts/unpoly/popup.js.coffee +62 -37
  14. data/lib/assets/javascripts/unpoly/proxy.js.coffee +1 -0
  15. data/lib/assets/javascripts/unpoly/syntax.js.coffee +12 -4
  16. data/lib/assets/javascripts/unpoly/util.js.coffee +55 -13
  17. data/lib/assets/stylesheets/unpoly/modal.css.sass +28 -12
  18. data/lib/unpoly/rails/inspector.rb +26 -0
  19. data/lib/unpoly/rails/version.rb +1 -1
  20. data/spec_app/Gemfile.lock +1 -1
  21. data/spec_app/app/controllers/binding_test_controller.rb +6 -0
  22. data/spec_app/spec/controllers/binding_test_controller_spec.rb +82 -11
  23. data/spec_app/spec/javascripts/up/flow_spec.js.coffee +21 -7
  24. data/spec_app/spec/javascripts/up/form_spec.js.coffee +15 -0
  25. data/spec_app/spec/javascripts/up/link_spec.js.coffee +11 -10
  26. data/spec_app/spec/javascripts/up/modal_spec.js.coffee +232 -30
  27. data/spec_app/spec/javascripts/up/motion_spec.js.coffee +33 -27
  28. data/spec_app/spec/javascripts/up/popup_spec.js.coffee +72 -0
  29. data/spec_app/spec/javascripts/up/syntax_spec.js.coffee +51 -13
  30. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 444cce448401d3fa82374d61dc82bb0b66285c6c
4
- data.tar.gz: 73318e89b0163faccb400b4c1ca6f6a10478c2eb
3
+ metadata.gz: 03aa9661d36119a89bdb8ccd66ba4085caab9e45
4
+ data.tar.gz: 3c41cce4a677932ff2e487cf9451770c4d3c9767
5
5
  SHA512:
6
- metadata.gz: 7d8ba3e9e42cb9a7a204a98894af79e748dbad3b5c9e8946cb98419de5580486cf4b99bf4d1c55eccb8d4c7794d3acae621fd5760e8c96ec8f782d998b014698
7
- data.tar.gz: 899c0b34847380d7770e2cd2ddb4aee0571979a68c54eaae896acc51aab8c7883049fc189257d081e0210a05d68a02384f6816fd3c970f92f6503646e4d98a12
6
+ metadata.gz: f9ab2c3fa46b3e9d805d1c897a0745cd844beb74a54c1140ab80f6424affe9155a407276dd3fbd2577ab3f98e73cbbc8561b7875e0568d1a5713cd170e9a80cb
7
+ data.tar.gz: 2dd8bde89f3a40a4d7aae54aad6afb67f10a004103173b0404857e2c2a138d7c1b232d002d11b27bf63c598e7777fce9449c08c13893ce5334bd94a18a9d3244
data/CHANGELOG.md CHANGED
@@ -14,6 +14,37 @@ Unreleased
14
14
  ### Breaking changes
15
15
 
16
16
 
17
+ 0.25.0
18
+ ------
19
+
20
+ ### Compatible changes
21
+
22
+ - New modal default [`up.modal.config.sticky`](/up.modal.config)
23
+ - New experimental function [`up.modal.flavor`](/up.modal.flavor) to register modal variants (like drawers).
24
+ - Fix a bug where [compilers](/up.compiler) and [macros](/up.macro) with higher priorities were executed last (instead of first like it says in the docs).
25
+ - Fix a bug that would occur if two compiled elements, that were nested within each other, would raise an error if the outer element was destroyed and both compilers have destructor functions.
26
+ - Fix a bug where replacing the `body` tag would raise an error if any element in the old `<body>` had a destructor function.
27
+ - The promise returned by [`up.replace`](/up.replace) now waits for transitions to complete before resolving
28
+ - Fix a bug where an error would be shown when opening a modal while another modal was still loading
29
+ - Fix a bug where two popups would be shown when opening a popup while another popup was still loading
30
+ - New options for [up.popup.config](/up.popup.config):
31
+ - `up.popup.config.openDuration`
32
+ - `up.popup.config.closeDuration`
33
+ - `up.popup.config.openEasing`
34
+ - `up.popup.config.closeEasing`
35
+ - Modals now longer addsa right padding to the `<body>` if the document has no vertical scroll bars
36
+ - Animations now wait until the browser signals completion of the CSS transition. Previously
37
+ animations were canceled after its duration, which might or might not have matched to the actual
38
+ last animation frame.
39
+
40
+ ### Breaking changes
41
+
42
+ - When opening a modal while another modal is open, the first modal will be closed (with animation) before the second modal opens (with animation)
43
+ - When opening a popup while another popup is open, the first popup will be closed (with animation) before the second popup opens (with animation)
44
+ - User-defined macros are now always run *before* built-in macros.
45
+ This way you can set [`[up-dash]`](/up-dash) and [`[up-expand]`](/up-expand) from your own macros.
46
+
47
+
17
48
  0.24.1
18
49
  ------
19
50
 
data/README_RAILS.md CHANGED
@@ -19,7 +19,14 @@ To retrieve the CSS selector that is being [updated](http://unpoly.com/up.replac
19
19
 
20
20
  up.target
21
21
 
22
- The Unpoly frontend will expect an HTML response containing an element that matches this selector. If no such element is found, an error is shown to the user. Server-side code is free to optimize its response by only returning HTML that matches this selector.
22
+ The Unpoly frontend will expect an HTML response containing an element that matches this selector. If no such element is found, an error is shown to the user.
23
+
24
+ Server-side code is free to optimize its response by only returning HTML that matches this selector:
25
+
26
+ if up.target?('.sidebar')
27
+ = render 'expensive_sidebar_partial'
28
+ end
29
+
23
30
 
24
31
  ### Pushing a document title to the client
25
32
 
data/dist/unpoly.css CHANGED
@@ -16,30 +16,42 @@
16
16
  z-index: 99999999; }
17
17
  [up-href] {
18
18
  cursor: pointer; }
19
- .up-modal-backdrop {
19
+ .up-modal {
20
+ position: fixed;
21
+ top: 0;
22
+ left: 0;
23
+ bottom: 0;
24
+ right: 0;
20
25
  z-index: 10000;
26
+ overflow-x: hidden; }
27
+
28
+ .up-modal-backdrop {
29
+ z-index: 11000;
21
30
  background-color: rgba(90, 90, 90, 0.4);
22
- position: fixed;
31
+ position: absolute;
23
32
  top: 0;
24
33
  right: 0;
25
34
  bottom: 0;
26
35
  left: 0; }
27
36
 
28
37
  .up-modal-viewport {
29
- z-index: 11000;
30
- position: fixed;
38
+ position: absolute;
31
39
  top: 0;
32
40
  left: 0;
33
41
  bottom: 0;
34
42
  right: 0;
43
+ z-index: 12000;
35
44
  overflow-x: hidden;
36
- overflow-y: hidden;
45
+ overflow-y: scroll;
37
46
  text-align: center; }
38
- .up-modal.up-modal-ready .up-modal-viewport {
39
- overflow-y: scroll; }
47
+
48
+ .up-modal.up-modal-animating {
49
+ overflow-y: scroll; }
50
+ .up-modal.up-modal-animating .up-modal-viewport {
51
+ overflow-y: hidden; }
40
52
 
41
53
  .up-modal-dialog {
42
- z-index: 12000;
54
+ z-index: 13000;
43
55
  position: relative;
44
56
  box-sizing: border-box;
45
57
  margin: 30px 10px;
@@ -48,13 +60,13 @@
48
60
  text-align: left; }
49
61
 
50
62
  .up-modal-content {
51
- z-index: 13000;
63
+ z-index: 14000;
52
64
  padding: 20px;
53
65
  background-color: #fff;
54
66
  box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.3); }
55
67
 
56
68
  .up-modal-close {
57
- z-index: 14000;
69
+ z-index: 15000;
58
70
  position: absolute;
59
71
  right: 0;
60
72
  top: 0;