glimmer-dsl-web 0.10.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef597116fc763e29269c604996c84cd52e30788ef04c799cc39c5c599762e96d
4
- data.tar.gz: aaebc4caeb56cf94acaf81b59bd8854d73e7a4ff4e943ebe811431f042df656e
3
+ metadata.gz: aad28a356df583d4a4784a532111d9e4d4f3743f8855998deb69ff03521a0107
4
+ data.tar.gz: 79c3a03baea98bd0774d95e4dbd049e30ddde606402b17770b037cffcbdb63ce
5
5
  SHA512:
6
- metadata.gz: 8cc956e1aebd99dbccfbc1ffa037227b86e87cd985d0ae41fe5d2a7da1bd37641178f8f4f4445c4f84e9e567c23480ddabed77b9bf0f68da8ee01ff025ba9545
7
- data.tar.gz: c98b9ed6629354054c23cc23b42cb8e1496eec246f6baacf5e6f51d4a84041c06fd36586ba8f2756e066e941413a53e950bb269326d84c7e1a5716ccb775abc7
6
+ metadata.gz: 427e0f03396027917230ad86fbfbfc258253b31044cadb32718caab75de8230edf22c5dc628a561db08c9b1bb82729e9e8347eef097ccb67d5e823fbcf90686f
7
+ data.tar.gz: e6f98162f1ab9a278547bf21d73cd861606b7595dc8ddd86cddf6901cc3b4f0d2e24af477bcbaf3bbaf870898abaa0901696e526ff040682bcede3cd595d3e07
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.10.2
4
+
5
+ - Support `ElementProxy#append {}`/`Glimmer::Web::Component#append {}` as an alias for `content {}` to enable appending elements to the content of a parent element
6
+
3
7
  ## 0.10.1
4
8
 
5
9
  - Support auto-converting HTML element value when set via HTML attributes (kwargs)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Web 0.10.1 (Beta)
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Web 0.10.2 (Beta)
2
2
  ## Ruby-in-the-Browser Web Frontend Framework
3
3
  ### The "Rails" of Frontend Frameworks!!! ([Fukuoka Award Winning](https://andymaleh.blogspot.com/2025/01/glimmer-dsl-for-web-wins-in-fukuoka.html))
4
4
  #### Finally, Ruby Developer Productivity, Happiness, and Fun in the Frontend!!!
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.1
1
+ 0.10.2
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer-dsl-web 0.10.1 ruby lib
5
+ # stub: glimmer-dsl-web 0.10.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-dsl-web".freeze
9
- s.version = "0.10.1".freeze
9
+ s.version = "0.10.2".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
@@ -510,6 +510,7 @@ module Glimmer
510
510
  end
511
511
  end
512
512
  end
513
+ alias append content
513
514
 
514
515
  def remove_all_listeners
515
516
  data_bindings.each do |option_binding, model_binding|
@@ -552,6 +552,7 @@ module Glimmer
552
552
  options[:bulk_render] = original_bulk_render if rendered?
553
553
  return_value
554
554
  end
555
+ alias append content
555
556
 
556
557
  # Subclasses must override with their own mappings
557
558
  def observation_request_to_event_mapping
@@ -24,8 +24,7 @@ Document.ready? do
24
24
  onclick do |event|
25
25
  if ([@name_input, @email_input].all? {|input| input.check_validity })
26
26
  event.prevent_default
27
- # re-open table content and add row
28
- @table.content {
27
+ @table.append {
29
28
  tr {
30
29
  td { @name_input.value }
31
30
  td { @email_input.value }
@@ -21,11 +21,7 @@ class TodoListItem
21
21
  inner_html <= [todo, :task]
22
22
 
23
23
  ondblclick do |event|
24
- unless markup_root.children.last.keyword == 'input'
25
- markup_root.content {
26
- edit_todo_input(presenter:, todo:)
27
- }
28
- end
24
+ add_edit_form_on_first_edit
29
25
  todo.start_editing
30
26
  end
31
27
  }
@@ -139,5 +135,17 @@ class TodoListItem
139
135
  }
140
136
  }
141
137
  }
138
+
139
+ private
140
+
141
+ def add_edit_form_on_first_edit
142
+ unless markup_root.children.last.keyword == 'input'
143
+ # Adding edit form dynamically prevents rendering extra elements
144
+ # until they become needed to ensure faster performance
145
+ markup_root.append {
146
+ edit_todo_input(presenter:, todo:)
147
+ }
148
+ end
149
+ end
142
150
  end
143
151
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh