Skip to content

Prepare 0.7.4 release #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6819ad6
Delete logo.png
jonasjabari Jan 10, 2020
28b8ab2
Add files via upload
jonasjabari Jan 10, 2020
62438e4
Update README.md
jonasjabari Jan 10, 2020
be93f08
Update README.md
jonasjabari Jan 10, 2020
669e4bc
Update README.md
jonasjabari Jan 10, 2020
4117969
Add docs badge
PragTob Jan 27, 2020
66cf994
Improve Setup instructions for Contributions
PragTob Jan 27, 2020
d25399b
Merge pull request #322 from PragTob/patch-1
pascalwengerter Jan 27, 2020
25b9a17
Point people to how to remove turbolinks to be nice
PragTob Jan 29, 2020
7250eee
Point people to concepts after they finished the installation
PragTob Jan 29, 2020
88aaa9e
Adjust the order in which components are provided
PragTob Jan 29, 2020
2a07bd1
also point to hello world guide
PragTob Jan 29, 2020
20578d2
Merge pull request #334 from matestack/improve-contribution-setup
jonasjabari Jan 29, 2020
fabbf93
Point people to dynamix components
PragTob Jan 29, 2020
16dec67
Merge pull request #348 from matestack/installation-finish
jonasjabari Jan 29, 2020
7302c78
Merge pull request #350 from matestack/exchange-component-order
jonasjabari Jan 29, 2020
9733d4d
Merge pull request #351 from matestack/point-people-to-components-dyn…
jonasjabari Jan 29, 2020
38de0ef
Async docs: explicitly mention that the timespans used are in millise…
PragTob Jan 29, 2020
f6d4aa9
Merge pull request #347 from matestack/help-people-remove-turbolinks
jonasjabari Jan 29, 2020
370fcec
Merge pull request #352 from matestack/async-timespan-in-ms
jonasjabari Jan 29, 2020
e96915c
Fix basic XSS vector, check with more of them
PragTob Feb 4, 2020
641a838
Add code of conduct
pascalwengerter Feb 4, 2020
aa9e194
some more specs
PragTob Feb 4, 2020
f03051d
Implement Rawhtml component
PragTob Feb 4, 2020
5c61571
Explicitly define html_escape
PragTob Feb 4, 2020
1b50277
Merge pull request #360 from matestack/add-code-of-conduct-1
jonasjabari Feb 5, 2020
e4df711
Merge remote-tracking branch 'origin/cells-haml-love' into prepare_0.…
jonasjabari Feb 10, 2020
14a74ae
added release note for 0.7.4
jonasjabari Feb 10, 2020
8f15972
renamed raw component
jonasjabari Feb 10, 2020
8e744c1
Merge branch 'develop' into prepare_0.7.4_release
jonasjabari Feb 10, 2020
7ffbec6
version bump js assets
jonasjabari Feb 10, 2020
a6699b2
Bump matestack-ui-core to 0.7.4
jonasjabari Feb 10, 2020
795b94a
Merge branch 'master' into prepare_0.7.4_release
jonasjabari Feb 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# Changelog

## v0.7.4

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

[Solved Issues](https://github.com/basemate/matestack-ui-core/issues?q=is%3Aissue+is%3Aclosed+milestone%3A0.7.4)

### Improvements

* On form submit, matestack form values are reset to previous values by fiedl
--> The form component now does not reset itself when using `put`
--> The reset behavior can now be configured (described in `form` component docs)

* Dockerized core dev and test environment by jonasjabari
--> easy local dev and test setup, cross-platform default for dev and testing
--> CI is configured to run tests via dockerized test suite; same as local testing and good base for matrix testing (upcoming)
--> Usage described in contribution docs

* Add `follow_response` option to action component by fiedl
--> same behavior enhancement as added to the `form` component in 0.7.3
--> server may now decide where the transition should navigate to
--> described in `action` component docs

* Add confirm option to action component by fiedl
--> easily add confirmation before performing an action
--> prevent unintended delete action for example
--> described in `action` component docs

* New webpacker features by fiedl
* make webpacker create es5 code instead of es6 code
* Switch to Vue Production Mode if RAILS_ENV=staging or production
* Establish webpack(er) and asset-pipeline workflows

--> webpacker now builds assets for asset pipline usage AND webpacker usage (both usage approaches are described in the installation docs)
--> webpacker now builds minified versions of matestack-ui-core.js (great improvement in file size!)
--> webpacker now builds es5 code, which is compatible with IE11
--> when used via asset pipeline, the minified version of matestack-ui-core together with the production build of vue.js is automatically required
--> when used via webpacker, matestack-ui-core can be used within a modern javascript workflow, importing and extending single matestack module for example

* New components
* Add HTML `<picture>` tag to core components by pascalwengerter
* Add HTML `<option>` tag to core components by pascalwengerter
* Add HTML `<optgroup>` tag to core components by pascalwengerter
* Add HTML `<iframe>` tag to core components by pascalwengerter
* Add HTML `<dfn>` tag to core components by pascalwengerter
* Add HTML `<del>` tag to core components by pascalwengerter
* Add HTML `<data>` tag to core components by pascalwengerter
* Add HTML `<bdo>` tag to core components by pascalwengerter
* Add HTML `<bdi>` tag to core components by pascalwengerter
* Add HTML `<wbr>` tag to core components by pascalwengerter
* Add HTML `<samp>` tag to core components by pascalwengerter
* Add HTML `<u>` tag to core components by pascalwengerter
* Add HTML `<template>` tag to core components by pascalwengerter


### Bugfixes

* Anchor Link Click triggers full page transition by PragTob


## v0.7.3

[Merged PRs](https://github.com/basemate/matestack-ui-core/pulls?q=is%3Apr+is%3Aclosed+milestone%3A0.7.3)
Expand Down
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
![](https://github.com/matestack/matestack-ui-core/workflows/specs/badge.svg)
[![Gitter](https://badges.gitter.im/basemate/community.svg)](https://gitter.im/basemate/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Gem Version](https://badge.fury.io/rb/matestack-ui-core.svg)](https://badge.fury.io/rb/matestack-ui-core)
[![Docs](https://img.shields.io/badge/docs-matestack-blue.svg)](https://www.matestack.org/docs/install)

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

Expand All @@ -21,7 +22,7 @@ dynamic Web-App.

### Current State:

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:
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:

* debugging and error handling
* core refactoring, increased core maintainability and code quality
Expand Down
2 changes: 1 addition & 1 deletion app/concepts/matestack/ui/core/app/app.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Matestack::Ui::Core::App
class App < Trailblazer::Cell

include ::Cell::Haml
include Matestack::Ui::Core::Cell
include Matestack::Ui::Core::ApplicationHelper
include Matestack::Ui::Core::ToCell

Expand Down
3 changes: 1 addition & 2 deletions app/concepts/matestack/ui/core/component/dynamic.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Matestack::Ui::Core::Component
class Dynamic < Trailblazer::Cell

include ::Cell::Haml
include Matestack::Ui::Core::Cell
include Matestack::Ui::Core::ApplicationHelper
include Matestack::Ui::Core::ToCell
include Matestack::Ui::Core::HasViewContext
Expand Down
4 changes: 2 additions & 2 deletions app/concepts/matestack/ui/core/page/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Matestack::Ui::Core::Page
class Page < Trailblazer::Cell

include ActionView::Helpers::TranslationHelper
include ::Cell::Haml
include Matestack::Ui::Core::Cell
include Matestack::Ui::Core::ApplicationHelper
include Matestack::Ui::Core::ToCell
include Matestack::Ui::Core::HasViewContext
Expand Down Expand Up @@ -94,7 +94,7 @@ def show(component_key=nil, only_page=false)
begin
render_child_component component_key
rescue => e
raise "Component '#{component_key}' could not be resolved."
raise "Component '#{component_key}' could not be resolved, because of #{e},\n#{e.backtrace.join("\n")}"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/concepts/matestack/ui/core/plain/plain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Matestack::Ui::Core::Plain
class Plain < Matestack::Ui::Core::Component::Static

def show
@argument
html_escape @argument
end

end
Expand Down
7 changes: 7 additions & 0 deletions app/concepts/matestack/ui/core/unescaped/unescaped.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module Matestack::Ui::Core::Unescaped
class Unescaped < Matestack::Ui::Core::Component::Static
def show
@argument
end
end
end
6 changes: 3 additions & 3 deletions docs/components/async.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ end

### Hide_after

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

```ruby
async hide_after: 1000 do
Expand Down Expand Up @@ -103,7 +103,7 @@ end
```

#### delayed defer
`defer: 2000` means that the content of the `async` component gets requested within a separate GET request `2000ms` after initial page load is done.
`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.
```ruby
async defer: 2000 do
div id: 'my-div' do
Expand Down Expand Up @@ -290,7 +290,7 @@ end

### Example 4: Hide after show on event

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.
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.

```ruby
class ExamplePage < Matestack::Ui::Page
Expand Down
2 changes: 1 addition & 1 deletion docs/components/plain.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

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

## Parameters

Expand Down
35 changes: 35 additions & 0 deletions docs/components/rawhtml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# matestack core component: Rawhtml

Show [specs](/spec/usage/components/rawhtml_spec.rb)

This element simply renders the value of a variable (or simple a string) wherever you want it **without escaping HTML**.

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.

## Parameters

This component expects one parameter.

## Example 1

Rendering some HTML.

```ruby

def response
components {
rawhtml <<~HTML
<h1>Hello World</h1>
<script>alert('Really Hello!')</script>
HTML
}
end

```

returns

```html
<h1>Hello World</h1>
<script>alert('Really Hello!')</script>
```
48 changes: 24 additions & 24 deletions docs/concepts/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,26 +219,19 @@ This gets rendered into HTML as shown below. Notice that the `@foo` from the com
To use *component instance scope slots*, first define slots within a static component:

```ruby
class Components::Some::Component < Matestack::Ui::StaticComponent
class Components::Other::Component < Matestack::Ui::StaticComponent

def prepare
@foo = "foo from component"
@foo = "foo from other component"
end

def response
components {
div id: "my-component" do
custom_other_component slots: {
my_slot_from_component: my_slot_from_component,
my_slot_from_page: @options[:my_slot_from_page]
}
end
}
end

def my_slot_from_component
slot {
span id: "my-slot-from-component" do
div id: "my-other-component" do
slot @options[:slots][:my_slot_from_component]
br
slot @options[:slots][:my_slot_from_page]
br
plain @foo
end
}
Expand All @@ -247,22 +240,29 @@ class Components::Some::Component < Matestack::Ui::StaticComponent
end
```

And another component:
and also in some component:

```ruby
class Components::Other::Component < Matestack::Ui::StaticComponent
class Components::Some::Component < Matestack::Ui::StaticComponent

def prepare
@foo = "foo from other component"
@foo = "foo from component"
end

def response
components {
div id: "my-other-component" do
slot @options[:slots][:my_slot_from_component]
br
slot @options[:slots][:my_slot_from_page]
br
div id: "my-component" do
custom_other_component slots: {
my_slot_from_component: my_slot_from_component,
my_slot_from_page: @options[:my_slot_from_page]
}
end
}
end

def my_slot_from_component
slot {
span id: "my-slot-from-component" do
plain @foo
end
}
Expand All @@ -271,7 +271,7 @@ class Components::Other::Component < Matestack::Ui::StaticComponent
end
```

Then, put both components to use on the example page:
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:

```ruby
class Pages::ExamplePage < Matestack::Ui::Page
Expand Down Expand Up @@ -367,7 +367,7 @@ Not a fancy example, but this is the result:
<div id="div-on-page">
<div id="my-component">
foo from page
</div>
</div>
</div>
```

Expand Down
Loading