Skip to content

Commit f38db35

Browse files
authored
Merge pull request #291 from basemate/develop
0.7.3 Release
2 parents 636f193 + e1ef4d2 commit f38db35

File tree

214 files changed

+24975
-20184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+24975
-20184
lines changed

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,65 @@
11
# Changelog
22

3+
## v0.7.3
4+
5+
[Merged PRs](https://github.com/basemate/matestack-ui-core/pulls?q=is%3Apr+is%3Aclosed+milestone%3A0.7.3)
6+
7+
[Solved Issues](https://github.com/basemate/matestack-ui-core/issues?q=is%3Aissue+is%3Aclosed+milestone%3A0.7.3)
8+
9+
### Potential Breaking Change - Migration Note
10+
11+
Until `0.7.2.1`, we included all `ActionView` modules in `Matestack::Ui::StaticComponent` and `Matestack::Ui::DynamicComponent`. As we didn't use these modules in all of our core components, we decided to move the `ActionView` modules to the new `Matestack::Ui::StaticActionviewComponent` and `Matestack::Ui::DynamicActionviewComponent` class. If you use `ActionView` modules in your components, you have to change the class you inherit from. This might be a potential breaking change for some users - we are not bumping to 0.8.0 as we don't break explicit specified behavior. If you have any problems, reach out via gitter!
12+
13+
### Security Fixes
14+
15+
none
16+
17+
### Improvements
18+
19+
* Move ActionView dependencies to separate, custom-core-component by pascalwengerter
20+
* Add documentation for testing on macOS by marcoroth
21+
* Add HTML <ruby> tag to core components by stiwwelll
22+
* Add HTML <rt> tag to core components by stiwwelll
23+
* Add HTML <rp> tag to core components by stiwwelll
24+
* Add HTML <q> tag to core components by GrantBarry
25+
* Add HTML <pre> tag to core components by tae8838
26+
* Add HTML <param> tag to core components by marcoroth
27+
* Add HTML <output> tag to core components by marcoroth
28+
* Add HTML <object> tag to core components by pascalwengerter
29+
* Add HTML <noscript> tag to core components by stiwwelll
30+
* Add HTML <meter> tag to core components by bdlb77
31+
* Add HTML <mark> tag to core components by marcoroth
32+
* Add HTML <map> tag to core components by pascalwengerter
33+
* Add HTML <legend> tag to core components by stiwwelll
34+
* Add HTML <kbd> tag to core components by marcoroth
35+
* Add HTML <ins> tag to core components by lumisce
36+
* Add HTML <figure> tag to core components by lumisce
37+
* Add HTML <em> tag to core components by citizen428
38+
* Add HTML <dt> tag to core components by mayanktap
39+
* Add HTML <dl> tag to core components by mayanktap
40+
* Add HTML <dd> tag to core components by mayanktap
41+
* Add HTML <code> tag to core components by pascalwengerter
42+
* Add HTML <cite> tag to core components by cameronnorman
43+
* Add HTML <var> tag to core components by pascalwengerter
44+
* Add HTML <s> tag to core components by Manukam
45+
* Add HTML bold tag to core components by GrantBarry
46+
* Add HTML area tag to core components by pascalwengerter
47+
* Add tests for video component by MarcoBomfim
48+
* Usage of RecordTagHelper by pascalwengerter
49+
* Add HTML aside tag to core components by borref
50+
* Add HTML address tag to core components by michaelrevans
51+
* Add HTML sup tag to core components by borref
52+
* Add params options to link component documentation by pascalwengerter
53+
54+
### Bugfixes
55+
56+
* Unexpected behaviour when creating a record in progress by jonasjabari
57+
* couldn't find file 'matestack_ui_core_manifest.js' on dummy app by jonasjabari
58+
* Add For Attribute to Stand Alone Label Component by bdlb77
59+
* Form component doesn't work on component-level by jonasjabari
60+
* Async component doesn't work on component-level by jonasjabari
61+
62+
363
## v0.7.2.1
464

565
[Merged PRs](https://github.com/basemate/matestack-ui-core/milestone/5?closed=1)

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ gemspec
1313

1414
# To use a debugger
1515
# gem 'byebug', group: [:development, :test]
16+
# gem 'pry-byebug', group: [:development, :test]
1617

1718
gem "trailblazer"
1819
gem "trailblazer-rails"
@@ -31,6 +32,7 @@ group :development, :test do
3132
gem 'simplecov', require: false, group: :test
3233
gem 'byebug'
3334
gem 'webmock'
35+
gem 'webdrivers', '~> 4.1'
3436
end
3537

3638
group :test do

Gemfile.lock

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
matestack-ui-core (0.7.1)
4+
matestack-ui-core (0.7.2.1)
55
cells-haml
66
cells-rails
77
haml
@@ -123,7 +123,7 @@ GEM
123123
mini_mime (1.0.1)
124124
mini_portile2 (2.4.0)
125125
minitest (5.11.3)
126-
nio4r (2.4.0)
126+
nio4r (2.5.2)
127127
nokogiri (1.10.4)
128128
mini_portile2 (~> 2.4.0)
129129
pipetree (0.1.1)
@@ -231,6 +231,10 @@ GEM
231231
tzinfo (1.2.5)
232232
thread_safe (~> 0.1)
233233
uber (0.1.0)
234+
webdrivers (4.1.2)
235+
nokogiri (~> 1.6)
236+
rubyzip (~> 1.0)
237+
selenium-webdriver (>= 3.0, < 4.0)
234238
webmock (3.5.1)
235239
addressable (>= 2.3.6)
236240
crack (>= 0.3.2)
@@ -264,6 +268,7 @@ DEPENDENCIES
264268
trailblazer
265269
trailblazer-cells
266270
trailblazer-rails
271+
webdrivers (~> 4.1)
267272
webmock
268273
webpacker (~> 3.5)
269274

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
%component{dynamic_tag_attributes}
2+
%div
3+
%div{"v-if": "asyncTemplate == null"}
4+
= render_content
5+
%div{"v-if": "asyncTemplate != null"}
6+
%v-runtime-template{":template":"asyncTemplate"}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module Matestack::Ui::Core::Actionview
2+
class Dynamic < Matestack::Ui::Core::Component::Dynamic
3+
4+
include ActionView::Helpers::ActiveModelHelper
5+
include ActionView::Helpers::ActiveModelInstanceTag
6+
include ActionView::Helpers::AssetTagHelper
7+
include ActionView::Helpers::AssetUrlHelper
8+
include ActionView::Helpers::AtomFeedHelper
9+
include ActionView::Helpers::CacheHelper
10+
include ActionView::Helpers::CaptureHelper
11+
include ActionView::Helpers::CspHelper
12+
include ActionView::Helpers::CsrfHelper
13+
include ActionView::Helpers::DateHelper
14+
include ActionView::Helpers::DebugHelper
15+
include ActionView::Helpers::FormHelper
16+
include ActionView::Helpers::FormOptionsHelper
17+
include ActionView::Helpers::FormTagHelper
18+
include ActionView::Helpers::JavaScriptHelper
19+
include ActionView::Helpers::NumberHelper
20+
include ActionView::Helpers::OutputSafetyHelper
21+
include ActionView::Helpers::SanitizeHelper
22+
include ActionView::Helpers::TagHelper
23+
include ActionView::Helpers::TextHelper
24+
include ActionView::Helpers::TranslationHelper
25+
include ActionView::Helpers::UrlHelper
26+
27+
end
28+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
= render_content
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module Matestack::Ui::Core::Actionview
2+
class Static < Matestack::Ui::Core::Component::Static
3+
4+
include ActionView::Helpers::ActiveModelHelper
5+
include ActionView::Helpers::ActiveModelInstanceTag
6+
include ActionView::Helpers::AssetTagHelper
7+
include ActionView::Helpers::AssetUrlHelper
8+
include ActionView::Helpers::AtomFeedHelper
9+
include ActionView::Helpers::CacheHelper
10+
include ActionView::Helpers::CaptureHelper
11+
include ActionView::Helpers::CspHelper
12+
include ActionView::Helpers::CsrfHelper
13+
include ActionView::Helpers::DateHelper
14+
include ActionView::Helpers::DebugHelper
15+
include ActionView::Helpers::FormHelper
16+
include ActionView::Helpers::FormOptionsHelper
17+
include ActionView::Helpers::FormTagHelper
18+
include ActionView::Helpers::JavaScriptHelper
19+
include ActionView::Helpers::NumberHelper
20+
include ActionView::Helpers::OutputSafetyHelper
21+
include ActionView::Helpers::SanitizeHelper
22+
include ActionView::Helpers::TagHelper
23+
include ActionView::Helpers::TextHelper
24+
include ActionView::Helpers::TranslationHelper
25+
include ActionView::Helpers::UrlHelper
26+
27+
end
28+
end

app/concepts/matestack/ui/core/app/app.rb

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,9 @@
11
module Matestack::Ui::Core::App
22
class App < Trailblazer::Cell
3-
include ActionView::Helpers::ActiveModelHelper
4-
include ActionView::Helpers::ActiveModelInstanceTag
5-
include ActionView::Helpers::AssetTagHelper
6-
include ActionView::Helpers::AssetUrlHelper
7-
include ActionView::Helpers::AtomFeedHelper
8-
include ActionView::Helpers::CacheHelper
9-
include ActionView::Helpers::CaptureHelper
10-
include ActionView::Helpers::CspHelper
11-
include ActionView::Helpers::CsrfHelper
12-
include ActionView::Helpers::DateHelper
13-
include ActionView::Helpers::DebugHelper
14-
include ActionView::Helpers::FormHelper
15-
include ActionView::Helpers::FormOptionsHelper
16-
include ActionView::Helpers::FormTagHelper
17-
include ActionView::Helpers::JavaScriptHelper
18-
include ActionView::Helpers::NumberHelper
19-
include ActionView::Helpers::OutputSafetyHelper
20-
include ActionView::Helpers::RecordTagHelper
21-
# include ActionView::Helpers::RenderingHelper
22-
include ActionView::Helpers::SanitizeHelper
23-
include ActionView::Helpers::TagHelper
24-
include ActionView::Helpers::TextHelper
25-
include ActionView::Helpers::TranslationHelper
26-
include ActionView::Helpers::UrlHelper
3+
274
include ::Cell::Haml
285
include Matestack::Ui::Core::ApplicationHelper
296
include Matestack::Ui::Core::ToCell
30-
# include ::Rails.application.routes.url_helpers
317

328
view_paths << "#{Matestack::Ui::Core::Engine.root}/app/concepts"
339

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
%area{@tag_attributes}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module Matestack::Ui::Core::Area
2+
class Area < Matestack::Ui::Core::Component::Static
3+
def setup
4+
@tag_attributes.merge!({
5+
alt: options[:alt],
6+
coords: options[:coords].join(','),
7+
download: options[:download],
8+
href: options[:href],
9+
hreflang: options[:hreflang],
10+
media: options[:media],
11+
rel: options[:rel],
12+
shape: options[:shape],
13+
target: options[:target],
14+
type: options[:type]
15+
})
16+
end
17+
end
18+
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
%aside{@tag_attributes}
2+
- if block_given?
3+
= yield
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Aside
2+
class Aside < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%b{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]

app/concepts/matestack/ui/core/b/b.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::B
2+
class B < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%cite{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Cite
2+
class Cite < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%code{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Code
2+
class Code < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end

app/concepts/matestack/ui/core/component/dynamic.rb

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
module Matestack::Ui::Core::Component
22
class Dynamic < Trailblazer::Cell
33

4-
include ActionView::Helpers::ActiveModelHelper
5-
include ActionView::Helpers::ActiveModelInstanceTag
6-
include ActionView::Helpers::AssetTagHelper
7-
include ActionView::Helpers::AssetUrlHelper
8-
include ActionView::Helpers::AtomFeedHelper
9-
include ActionView::Helpers::CacheHelper
10-
include ActionView::Helpers::CaptureHelper
11-
include ActionView::Helpers::CspHelper
12-
include ActionView::Helpers::CsrfHelper
13-
include ActionView::Helpers::DateHelper
14-
include ActionView::Helpers::DebugHelper
15-
include ActionView::Helpers::FormHelper
16-
include ActionView::Helpers::FormOptionsHelper
17-
include ActionView::Helpers::FormTagHelper
18-
include ActionView::Helpers::JavaScriptHelper
19-
include ActionView::Helpers::NumberHelper
20-
include ActionView::Helpers::OutputSafetyHelper
21-
include ActionView::Helpers::RecordTagHelper
22-
# include ActionView::Helpers::RenderingHelper
23-
include ActionView::Helpers::SanitizeHelper
24-
include ActionView::Helpers::TagHelper
25-
include ActionView::Helpers::TextHelper
26-
include ActionView::Helpers::TranslationHelper
27-
include ActionView::Helpers::UrlHelper
284
include ::Cell::Haml
295
include Matestack::Ui::Core::ApplicationHelper
306
include Matestack::Ui::Core::ToCell
@@ -158,7 +134,7 @@ def components(&block)
158134
@nodes = Matestack::Ui::Core::ComponentNode.build(self, nil, &block)
159135

160136
@nodes.each do |key, node|
161-
@cells[key] = to_cell(key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"], node["cached_params"])
137+
@cells[key] = to_cell("#{@component_key}__#{key}", node["component_name"], node["config"], node["argument"], node["components"], node["included_config"], node["cached_params"])
162138
end
163139
end
164140

@@ -191,6 +167,38 @@ def modifiers
191167
result.join(" ")
192168
end
193169

170+
def render_child_component component_key, current_search_keys_array
171+
if respond_to? :prepare
172+
prepare
173+
end
174+
175+
response
176+
177+
if current_search_keys_array.count > 1
178+
if @nodes.dig(*current_search_keys_array) == nil
179+
rest = []
180+
while @nodes.dig(*current_search_keys_array) == nil
181+
rest << current_search_keys_array.pop
182+
end
183+
node = @nodes.dig(*current_search_keys_array)
184+
cell = to_cell(component_key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"], node["cached_params"])
185+
begin
186+
return cell.render_child_component component_key, rest.reverse[1..-1]
187+
rescue
188+
return cell.render_content
189+
end
190+
else
191+
node = @nodes.dig(*current_search_keys_array)
192+
cell = to_cell(component_key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"], node["cached_params"])
193+
return cell.render_content
194+
end
195+
else
196+
node = @nodes[current_search_keys_array[0]]
197+
cell = to_cell(component_key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"], node["cached_params"])
198+
return cell.render_content
199+
end
200+
end
201+
194202
private
195203

196204
def generate_children_cells
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%dd{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Dd
2+
class Dd < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%dl{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Dl
2+
class Dl < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%dt{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]

0 commit comments

Comments
 (0)