Skip to content

Commit 915daf3

Browse files
authored
Merge pull request #372 from matestack/prepare_0.7.4_release
Prepare 0.7.4 release
2 parents b1e4be1 + 795b94a commit 915daf3

34 files changed

+450
-72
lines changed

CHANGELOG.md

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

3+
## v0.7.4
4+
5+
[Merged PRs](https://github.com/basemate/matestack-ui-core/pulls?q=is%3Apr+is%3Aclosed+milestone%3A0.7.4)
6+
7+
[Solved Issues](https://github.com/basemate/matestack-ui-core/issues?q=is%3Aissue+is%3Aclosed+milestone%3A0.7.4)
8+
9+
### Improvements
10+
11+
* On form submit, matestack form values are reset to previous values by fiedl
12+
--> The form component now does not reset itself when using `put`
13+
--> The reset behavior can now be configured (described in `form` component docs)
14+
15+
* Dockerized core dev and test environment by jonasjabari
16+
--> easy local dev and test setup, cross-platform default for dev and testing
17+
--> CI is configured to run tests via dockerized test suite; same as local testing and good base for matrix testing (upcoming)
18+
--> Usage described in contribution docs
19+
20+
* Add `follow_response` option to action component by fiedl
21+
--> same behavior enhancement as added to the `form` component in 0.7.3
22+
--> server may now decide where the transition should navigate to
23+
--> described in `action` component docs
24+
25+
* Add confirm option to action component by fiedl
26+
--> easily add confirmation before performing an action
27+
--> prevent unintended delete action for example
28+
--> described in `action` component docs
29+
30+
* New webpacker features by fiedl
31+
* make webpacker create es5 code instead of es6 code
32+
* Switch to Vue Production Mode if RAILS_ENV=staging or production
33+
* Establish webpack(er) and asset-pipeline workflows
34+
35+
--> webpacker now builds assets for asset pipline usage AND webpacker usage (both usage approaches are described in the installation docs)
36+
--> webpacker now builds minified versions of matestack-ui-core.js (great improvement in file size!)
37+
--> webpacker now builds es5 code, which is compatible with IE11
38+
--> when used via asset pipeline, the minified version of matestack-ui-core together with the production build of vue.js is automatically required
39+
--> when used via webpacker, matestack-ui-core can be used within a modern javascript workflow, importing and extending single matestack module for example
40+
41+
* New components
42+
* Add HTML `<picture>` tag to core components by pascalwengerter
43+
* Add HTML `<option>` tag to core components by pascalwengerter
44+
* Add HTML `<optgroup>` tag to core components by pascalwengerter
45+
* Add HTML `<iframe>` tag to core components by pascalwengerter
46+
* Add HTML `<dfn>` tag to core components by pascalwengerter
47+
* Add HTML `<del>` tag to core components by pascalwengerter
48+
* Add HTML `<data>` tag to core components by pascalwengerter
49+
* Add HTML `<bdo>` tag to core components by pascalwengerter
50+
* Add HTML `<bdi>` tag to core components by pascalwengerter
51+
* Add HTML `<wbr>` tag to core components by pascalwengerter
52+
* Add HTML `<samp>` tag to core components by pascalwengerter
53+
* Add HTML `<u>` tag to core components by pascalwengerter
54+
* Add HTML `<template>` tag to core components by pascalwengerter
55+
56+
57+
### Bugfixes
58+
59+
* Anchor Link Click triggers full page transition by PragTob
60+
61+
362
## v0.7.3
463

564
[Merged PRs](https://github.com/basemate/matestack-ui-core/pulls?q=is%3Apr+is%3Aclosed+milestone%3A0.7.3)

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![](https://github.com/matestack/matestack-ui-core/workflows/specs/badge.svg)
22
[![Gitter](https://badges.gitter.im/basemate/community.svg)](https://gitter.im/basemate/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
33
[![Gem Version](https://badge.fury.io/rb/matestack-ui-core.svg)](https://badge.fury.io/rb/matestack-ui-core)
4+
[![Docs](https://img.shields.io/badge/docs-matestack-blue.svg)](https://www.matestack.org/docs/install)
45

56
![matestack logo](./logo.png)
67

@@ -21,7 +22,7 @@ dynamic Web-App.
2122

2223
### Current State:
2324

24-
We love to see more and more people using and contributing to matestack-ui-core. Our current version is 0.7.3 and it's not perfect yet. We recommend you to start using matestack-ui-core in a side project and report issues as this helps us to push matestack-ui-core towards a production ready 1.0.0. At basemate, we already use matestack-ui-core in production as we know how to handle current issues and bypass them with deep insights of the core implementation. We plan to invest time and money (yes, we're hiring) on following improvements:
25+
We love to see more and more people using and contributing to matestack-ui-core. Our current version is 0.7.4 and it's not perfect yet. We recommend you to start using matestack-ui-core in a side project and report issues as this helps us to push matestack-ui-core towards a production ready 1.0.0. At matestack, we already use matestack-ui-core in production as we know how to handle current issues and bypass them with deep insights of the core implementation. We plan to invest time and money (yes, we're hiring) on following improvements:
2526

2627
* debugging and error handling
2728
* core refactoring, increased core maintainability and code quality

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Matestack::Ui::Core::App
22
class App < Trailblazer::Cell
33

4-
include ::Cell::Haml
4+
include Matestack::Ui::Core::Cell
55
include Matestack::Ui::Core::ApplicationHelper
66
include Matestack::Ui::Core::ToCell
77

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module Matestack::Ui::Core::Component
22
class Dynamic < Trailblazer::Cell
3-
4-
include ::Cell::Haml
3+
include Matestack::Ui::Core::Cell
54
include Matestack::Ui::Core::ApplicationHelper
65
include Matestack::Ui::Core::ToCell
76
include Matestack::Ui::Core::HasViewContext

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Matestack::Ui::Core::Page
22
class Page < Trailblazer::Cell
33

44
include ActionView::Helpers::TranslationHelper
5-
include ::Cell::Haml
5+
include Matestack::Ui::Core::Cell
66
include Matestack::Ui::Core::ApplicationHelper
77
include Matestack::Ui::Core::ToCell
88
include Matestack::Ui::Core::HasViewContext
@@ -94,7 +94,7 @@ def show(component_key=nil, only_page=false)
9494
begin
9595
render_child_component component_key
9696
rescue => e
97-
raise "Component '#{component_key}' could not be resolved."
97+
raise "Component '#{component_key}' could not be resolved, because of #{e},\n#{e.backtrace.join("\n")}"
9898
end
9999
end
100100
end

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Matestack::Ui::Core::Plain
22
class Plain < Matestack::Ui::Core::Component::Static
33

44
def show
5-
@argument
5+
html_escape @argument
66
end
77

88
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module Matestack::Ui::Core::Unescaped
2+
class Unescaped < Matestack::Ui::Core::Component::Static
3+
def show
4+
@argument
5+
end
6+
end
7+
end

docs/components/async.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ end
5454

5555
### Hide_after
5656

57-
The `hide_after` option lets us define a timespan after which the component gets hidden.
57+
The `hide_after` option lets us define a timespan in milliseconds after which the component gets hidden.
5858

5959
```ruby
6060
async hide_after: 1000 do
@@ -103,7 +103,7 @@ end
103103
```
104104

105105
#### delayed defer
106-
`defer: 2000` means that the content of the `async` component gets requested within a separate GET request `2000ms` after initial page load is done.
106+
`defer: 2000` means that the content of the `async` component gets requested within a separate GET request 2000 milliseconds after initial page load is done.
107107
```ruby
108108
async defer: 2000 do
109109
div id: 'my-div' do
@@ -290,7 +290,7 @@ end
290290

291291
### Example 4: Hide after show on event
292292

293-
On our example page, we wrap a simple timestamp in an async component and tell it to show up when the event `my_event` gets triggered and be hidden after 1000ms.
293+
On our example page, we wrap a simple timestamp in an async component and tell it to show up when the event `my_event` gets triggered and be hidden after 1000 milliseconds.
294294

295295
```ruby
296296
class ExamplePage < Matestack::Ui::Page

docs/components/plain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Show [specs](/spec/usage/components/plain_spec.rb)
44

5-
This element simply renders the value of a variable (or simple a string) wherever you want it.
5+
This element simply renders the value of a variable (or simple a string) wherever you want it **escaping HTML tags** (`<` becomes `&lt;` etc.).
66

77
## Parameters
88

docs/components/rawhtml.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# matestack core component: Rawhtml
2+
3+
Show [specs](/spec/usage/components/rawhtml_spec.rb)
4+
5+
This element simply renders the value of a variable (or simple a string) wherever you want it **without escaping HTML**.
6+
7+
Only use this if you are sure that you have full control over the input to this function/no malicious code can find its way inside.
8+
9+
## Parameters
10+
11+
This component expects one parameter.
12+
13+
## Example 1
14+
15+
Rendering some HTML.
16+
17+
```ruby
18+
19+
def response
20+
components {
21+
rawhtml <<~HTML
22+
<h1>Hello World</h1>
23+
<script>alert('Really Hello!')</script>
24+
HTML
25+
}
26+
end
27+
28+
```
29+
30+
returns
31+
32+
```html
33+
<h1>Hello World</h1>
34+
<script>alert('Really Hello!')</script>
35+
```

docs/concepts/component.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -219,26 +219,19 @@ This gets rendered into HTML as shown below. Notice that the `@foo` from the com
219219
To use *component instance scope slots*, first define slots within a static component:
220220

221221
```ruby
222-
class Components::Some::Component < Matestack::Ui::StaticComponent
222+
class Components::Other::Component < Matestack::Ui::StaticComponent
223223

224224
def prepare
225-
@foo = "foo from component"
225+
@foo = "foo from other component"
226226
end
227227

228228
def response
229229
components {
230-
div id: "my-component" do
231-
custom_other_component slots: {
232-
my_slot_from_component: my_slot_from_component,
233-
my_slot_from_page: @options[:my_slot_from_page]
234-
}
235-
end
236-
}
237-
end
238-
239-
def my_slot_from_component
240-
slot {
241-
span id: "my-slot-from-component" do
230+
div id: "my-other-component" do
231+
slot @options[:slots][:my_slot_from_component]
232+
br
233+
slot @options[:slots][:my_slot_from_page]
234+
br
242235
plain @foo
243236
end
244237
}
@@ -247,22 +240,29 @@ class Components::Some::Component < Matestack::Ui::StaticComponent
247240
end
248241
```
249242

250-
And another component:
243+
and also in some component:
251244

252245
```ruby
253-
class Components::Other::Component < Matestack::Ui::StaticComponent
246+
class Components::Some::Component < Matestack::Ui::StaticComponent
254247

255248
def prepare
256-
@foo = "foo from other component"
249+
@foo = "foo from component"
257250
end
258251

259252
def response
260253
components {
261-
div id: "my-other-component" do
262-
slot @options[:slots][:my_slot_from_component]
263-
br
264-
slot @options[:slots][:my_slot_from_page]
265-
br
254+
div id: "my-component" do
255+
custom_other_component slots: {
256+
my_slot_from_component: my_slot_from_component,
257+
my_slot_from_page: @options[:my_slot_from_page]
258+
}
259+
end
260+
}
261+
end
262+
263+
def my_slot_from_component
264+
slot {
265+
span id: "my-slot-from-component" do
266266
plain @foo
267267
end
268268
}
@@ -271,7 +271,7 @@ class Components::Other::Component < Matestack::Ui::StaticComponent
271271
end
272272
```
273273

274-
Then, put both components to use on the example page:
274+
Then, put both components (note that some component uses other component so that's how they're both in here) to use on the example page:
275275

276276
```ruby
277277
class Pages::ExamplePage < Matestack::Ui::Page
@@ -367,7 +367,7 @@ Not a fancy example, but this is the result:
367367
<div id="div-on-page">
368368
<div id="my-component">
369369
foo from page
370-
</div>
370+
</div>
371371
</div>
372372
```
373373

0 commit comments

Comments
 (0)