Skip to content

Commit

Permalink
Merge pull request #216 from ba-st/pharo11
Browse files Browse the repository at this point in the history
Add Pharo 11 support
  • Loading branch information
gcotelli committed May 27, 2023
2 parents 48b56ad + ee190af commit a76a0fd
Show file tree
Hide file tree
Showing 22 changed files with 1,037 additions and 1,211 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/loading-groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
load-spec: [ deployment, dependent-sunit-extensions, tests, tools, development ]
name: ${{ matrix.smalltalk }} + ${{ matrix.load-spec }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ jobs:
name: runner / markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: markdownlint
uses: reviewdog/action-markdownlint@v0.1
uses: reviewdog/action-markdownlint@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
fail-fast: false
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Smalltalk CI
uses: hpi-swa/setup-smalltalkCI@v1
with:
Expand All @@ -21,7 +22,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
name: ${{matrix.os}}-${{matrix.smalltalk}}
name: Unit-Tests-${{matrix.smalltalk}}
token: ${{ secrets.CODECOV_TOKEN }}
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Logo](assets/logo.svg)

Ready-to-use components for interactive web applications + framework agnostic integration
Ready-to-use components for interactive web applications + framework-agnostic integration

[![Unit Tests](https://github.com/ba-st/Willow/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/ba-st/Willow/actions/workflows/unit-tests.yml/badge.svg)
[![Coverage Status](https://codecov.io/github/ba-st/Willow/coverage.svg?branch=release-candidate)](https://codecov.io/gh/ba-st/Willow/branch/release-candidate)
Expand All @@ -13,6 +13,7 @@ Ready-to-use components for interactive web applications + framework agnostic in
[![Pharo 8.0](https://img.shields.io/badge/Pharo-8.0-informational)](https://pharo.org)
[![Pharo 9.0](https://img.shields.io/badge/Pharo-9.0-informational)](https://pharo.org)
[![Pharo 10](https://img.shields.io/badge/Pharo-10-informational)](https://pharo.org)
[![Pharo 11](https://img.shields.io/badge/Pharo-11-informational)](https://pharo.org)

[Willow](https://github.com/ba-st/Willow) is developed using [Smalltalk](http://stephane.ducasse.free.fr/FreeBooks.html),
providing a simple interface for your web application, no matter the front-end
Expand All @@ -37,7 +38,7 @@ is also recommended.

## Installation

To load the project in a Pharo image follow this [instructions](docs/how-to/how-to-load-in-pharo.md).
To load the project in a Pharo image follow these [instructions](docs/how-to/how-to-load-in-pharo.md).

## Contributing

Expand All @@ -48,11 +49,11 @@ Check the [Contribution Guidelines](CONTRIBUTING.md)
- Willow was first presented in the [Smalltalks 2013 Conference](http://fast.org.ar).
A video of the presentation can be seen [here](https://youtu.be/JezITRHCBuc?list=PLCGAAdUizzH027lLWKXh_44cGuEsay7-R).

- A follow up presentation was made in the Smalltalks 2017 Conference. The slides
- A follow-up presentation was made in the Smalltalks 2017 Conference. The slides
are available [here](https://www.slideshare.net/gcotelli/willow-101-82159948)
and a video of the presentation can be seen [here](https://youtu.be/-QmvIBLDASM).

- Another follow up presentation was made in the ESUG 2018 and Smalltalks 2018
- Another follow-up presentation was made in the ESUG 2018 and Smalltalks 2018
conferences. The slides are available [here](https://www.slideshare.net/FASTPresentations/willow-the-interaction-tour-by-maxi-tabacman)
and a video of the presentation can be seen [here](https://youtu.be/U6-JoPRcXHc)

Expand Down
32 changes: 16 additions & 16 deletions docs/Migration-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The value of the parameter can be obtained by sending `request parameter`. In
the previous version this was the second argument of the block, now removed. In
the previous version the condition was a string that had to contain a macro to
expand with the argument, this has been changed to a block that optionally
receives the parameter as a javascript object and must return a javascript
receives the parameter as a JavaScript object and must return a JavaScript
boolean condition.

`onReturn` has been renamed to `onRespond`
Expand Down Expand Up @@ -51,7 +51,7 @@ To access other events check the protocol offered by `EventInterpreterDispatcher
For example to configure the behavior on mouse over, send `on mouseOver` then
configure as usual.

For custom events, use `on eventNamed:` followed by a symbol with the Javascript
For custom events, use `on eventNamed:` followed by a symbol with the JavaScript
method to call. This custom interaction assumes by default that no serialization
is required on the triggering component. To override this behavior, simply add
the corresponding serialization command, for example:
Expand All @@ -78,7 +78,7 @@ transforms to `EventInterpreterDispatcher defaultingToChangeHidden`
`WebInteractionInterpreter forReleaseOfKeyInComponent` transforms to
`EventInterpreterDispatcher defaultingToKeyUp`

Instance creation protocol for TextFieldWebView has been changed so that the
Instance creation protocol for `TextFieldWebView` has been changed so that the
default is always on change, since the key up behavior can now be achieved by
sending `on keyUp` to any instance.
To reflect this,
Expand All @@ -88,7 +88,7 @@ To reflect this,
`PhrasingContainerWebView`, `GenericContainerWebView` and `IdentifiedWebView`
have all been replaced by `ContainerWebView`. The deprecated classes are now
located in the migration package `Willow-Core-MigrationTo14` and all their
instance creation method now include a transformation rule. If the senders has
instance creation method now include a transformation rule. If the senders have
access to a component supplier, "divs" can be created by sending
`divisionContainerWrapping:applying:` and "spans" by sending
`inlineContainerWrapping:applying:`. For all other scenarios, a `ContainerWebView`
Expand All @@ -103,9 +103,9 @@ an id is created for the container element.
`DropDownListWebView` and `SingleSelectionListBoxWebView` have been replaced by
`SingleSelectionWebView`. The deprecated classes are now located in the migration
package `Willow-Core-MigrationTo14` and all their instance creation method now
include a transformation rule. If the senders has access to a component supplier,
drop downs can be created by sending `dropdownListApplying:` and list boxes by
sending `listBoxDisplayingAtOnce:applying:`. Otherwise they can be created by
include a transformation rule. If the senders have access to a component supplier,
drop-downs can be created by sending `dropdownListApplying:` and list boxes by
sending `listBoxDisplayingAtOnce:applying:`. Otherwise, they can be created by
sending the corresponding instance creation method in `SingleSelectionWebView`.

## Version 10 to 11
Expand All @@ -123,7 +123,7 @@ automatically attached to it. So you have to:

## Version 9 to 10

- If you we're directly referencing `WillowCssStyles` or `WillowConstants` now
- If you were directly referencing `WillowCssStyles` or `WillowConstants` now
you need to include the `Willow` shared pool and use `Classification` and
`Constants`, and change the message sending so, for example:
`WillowCssStyles willow` turns into `Classification >> #willow`.
Expand All @@ -134,7 +134,7 @@ automatically attached to it. So you have to:

## Version 8 to 9

The following methods has been deprecated and can be automatically converted
The following methods have been deprecated and can be automatically converted
using the proposed rewrite expressions:

- `TableWebViewBuilder >> addColumnTitled: aTitle rendering: aRenderingCommand`
Expand All @@ -143,7 +143,7 @@ using the proposed rewrite expressions:
`@receiver addColumnTitled: `@aTitle rendering: `@aRenderingCommand
```

->

```smalltalk
`@receiver addColumn: [ :column | column titled: `@aTitle;
Expand All @@ -159,7 +159,7 @@ using the proposed rewrite expressions:
applyingToCells: `@aCellCommand applyingToHeading:`@aHeadingCommand
```

->

```smalltalk
`@receiver addColumn: [ :column |
Expand All @@ -180,7 +180,7 @@ using the proposed rewrite expressions:
summarizedWith: `@aFooterRenderingCommand applyingToFooter: `@aFooterCommand
```

->

```smalltalk
`@receiver addColumn: [ :column |
Expand All @@ -197,20 +197,20 @@ using the proposed rewrite expressions:
`@receiver addUntitledColumnRendering: `@aRenderingCommand'
```

->

```smalltalk
`@receiver addColumn: [ :column | column rendering: `@aRenderingCommand ]
```

The following method has been deprecated and the action is just remove the
The following method has been deprecated, and the action is just to remove the
senders, because now tables built using the builder will automatically detect if
a header is needed or not.

- `TableWebViewBuilder >> beHeadless`

The following methods has been deprecated and the senders must be adapted to use
the TableWebViewBuilder API:
The following methods have been deprecated, and the senders must be adapted to use
the `TableWebViewBuilder` API:

- `TableWebView class >> definedBy: aColumnRendererCollection applying:
aTableCommand headerRenderedBy: aHeader applyingToEachRow: aRowCommand`
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Willow Documentation

Ready-to-use components for interactive web applications + framework agnostic integration.
Ready-to-use components for interactive web applications + framework-agnostic integration.

To learn about the project, [install it](how-to/how-to-load-in-pharo.md) and
read the following documents:
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/how-to-debug.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to debug a Willow Application

By default you will get standard HTTP errors when some unexpected thing happens.
By default, you will get standard HTTP errors when some unexpected thing happens.
If you want to get a debugger when something fails, you need to configure the
error handler:

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/how-to-release-new-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using the GitHub releases support.
- The following code changes should be made before the
release:
- Update version number in `package.json`
- If there was changes in WillowNamespaceFileMetadataLibrary file contents
- If there were changes in `WillowNamespaceFileMetadataLibrary` file contents
(there's a test checking that using the hash)
- Update version number in `WillowNamespaceFileMetadataLibrary class>>version`
- Fix the test cases related to version numbers
Expand Down
12 changes: 6 additions & 6 deletions docs/tutorial/Applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ You can unregister your app from the dispatcher at any time by sending:
Willow supports two different registration modes: Deployment and Development.
The main differences are:

- Determining the type of self hosted libraries. In Development you will get
- Determining the type of self-hosted libraries. In Development, you will get
the non-minified files served and in Deployment you will get the minified versions.
This is resolved in collaboration with the libraries.
- The mode is also used to change the file handler behavior, so as to ignore
- The mode is also used to change the file handler behavior, to ignore
the libraries corresponding to non-matching modes
- It can be extended and used for your own purposes, when there's code that
needs to differ between Development and Deployment:
Expand All @@ -56,12 +56,12 @@ For the server-side configuration, you must re-implement
dump a stack trace and log errors.
- `updateRootWith:` and `renderNonAjaxErrorsWith:` can be used to customize what
happens when rendering errors with code 5xx.
- Sending `on:do:` you can setup error handlers specific for AJAX calls. In case
- Sending `on:do:` you can set up error handlers specific for AJAX calls. In case
no handler applies the standard handling mechanics take control.

For the client-side some Javascript is required, because if the server is not
For the client-side some JavaScript is required, because if the server is not
responding some feedback should be provided to the user. You can write it by hand
or just creates a library and use the Seaside rendering/javascript capabilities
or just creates a library and use the Seaside rendering/JavaScript capabilities
to produce it. You can see a working example in the [Willow Playground](https://github.com/ba-st/Willow-Playground),
just browse `Smalltalks2017FileMetadataLibrary >> willowplaygrounderrorhandlerJsContent`.

Expand Down Expand Up @@ -115,7 +115,7 @@ good idea to have a unique point of interaction with your backend services, API
or in-image model. To achieve that Willow applications provide a hook so you can
have your own "Application Context" easily accessible from each component.

You must subclass WillowSession, and hook up in the method `startUpApplicationContextFor:`
You must subclass `WillowSession`, and hook up in the method `startUpApplicationContextFor:`
creating or getting your application context and saving it on the session.
(Don't forget to do `super startUpApplicationContextFor: aWillowApp`). Later,
you can easily access your context by collaborating with the session by sending
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial/Components.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ used in the app. The base Willow support includes an HTML5 supplier, but if you
load other projects on the ecosystem you can get access to Bootstrap, Semantic
UI & JQuery UI suppliers.

The supplier provides access to the components in a well defined API to ease
The supplier provides access to the components in a well-defined API to ease
the transition between one front-end framework and another. All the interactive
components created by the supplier support `#on`, to access the interaction
affordances (`#on trigger` for the default interaction). You can access the
Expand Down Expand Up @@ -78,7 +78,7 @@ There's also a date field component
(`self componentSupplier dateFieldApplying: []`), which supports the messages
`changeDateTo: aData` and `date` to set and retrieve the contained date respectively.

Also there is protocol for numeric fields:
Also, there is protocol for numeric fields:

- `decimalNumberFieldApplying:` accepting decimal numbers
- `naturalNumberFieldApplying:` accepting natural numbers
Expand Down Expand Up @@ -192,7 +192,7 @@ dialogs and panels/cards.

## Miscellaneous components

- `ImageWebView` will provide an `img` with interaction affordances
- `ImageWebView` will provide an `img` with interaction affordances
- `LabeledWebView` will help displaying a `label` bound to a field

Other projects in the ecosystem provide additional components likes Tabs, Pills
Expand Down
28 changes: 14 additions & 14 deletions docs/tutorial/Interaction-Affordances.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ textField on click
]
```

Willow provides native support for `click`, `change` , `keyup` and `mouseover`
Willow provides native support for `click`, `change`, `keyup` and `mouseover`
but any event can be used by sending `#on eventNamed:`.

## Summary
Expand Down Expand Up @@ -104,17 +104,17 @@ but any event can be used by sending `#on eventNamed:`.

> :computer: indicates the command generates a request to the server. This is
> not always because the server needs information related to the command from
> the user agent, but because Willow expects the Javascript associated with the
> the user agent, but because Willow expects the JavaScript associated with the
> command to be executed after the server completes all necessary processing.
## General Affordances

### User Agent Execution

This affordance allows you to configure some javascript code to be run in the
This affordance allows you to configure some JavaScript code to be run in the
browser without notifying the server. We already saw an example.

It uses the Seaside javascript generation support and it's usually used as a
It uses the Seaside JavaScript generation support, and it's usually used as a
basic building block to do more complex behavior on top.

### Server Evaluation
Expand Down Expand Up @@ -174,7 +174,7 @@ would do to `on trigger`.
Sometimes you need to send additional information to the server (not necessarily
user input). For that you have `with:serverDo:`.

Lets see an example:
Let's see an example:

```smalltalk
button on trigger
Expand All @@ -201,16 +201,16 @@ in the call.

There's also support for performing the AJAX call only when some condition is
met. You can use `with:onlyWhen:serverDo:` and indicate a block that receives a
JSObject representing the parameter from the first argument.
`JSObject` representing the parameter from the first argument.

## Serialization

When using Willow, your application will not normally require a full page
submission. When working with form elements the contents must be serialized in
an AJAX call so the server components have the updated values. Depending on the
an AJAX call, so the server components have the updated values. Depending on the
interactivity level you want in your application you have several options.

Lets see an example:
Let's see an example:

```smalltalk
button on trigger serializeContainerForm
Expand Down Expand Up @@ -248,13 +248,13 @@ So:
- `serializeIt` will serialize the component receiving the on trigger
collaboration (this would normally be used in tandem with some field component
then triggering the change event)
- `serializeWithHiddenInputs` will serialize the component receiving the on
trigger collaboration and the next hidden input (required for some Seaside
- `serializeWithHiddenInputs` will serialize the component receiving the `on trigger`
collaboration and the next hidden input (required for some Seaside
brushes where the resulting HTML includes a hidden input)

In case you need it, there's also support to submit a form: `submitForm:`. Also
In case you need it, there's also support to submit a form: `submitForm:`. Also,
`submitFormStyledAs:` will call the `submit()` function on the corresponding
form (found by id or by matching it's "class").
form (found by id or by matching its "class").

Serialization will occur automatically when triggering certain components.

Expand Down Expand Up @@ -288,7 +288,7 @@ of the component with some updated rendering.

![Rendering](images/Rendering.gif)

Inspecting the response payload of the AJAX call yo would see something like:
Inspecting the response payload of the AJAX call you would see something like:

```javascript
$("#current-time-id12").html("<strong>16:58:33</strong>")
Expand Down Expand Up @@ -317,7 +317,7 @@ function(event) {
```

The browser will show "Searching..." in the container place while the AJAX call
is performed. Once it returns it will be replaced with the contents again, now
is performed. Once it returns it will be replaced with the contents again, now
with the updated rendering.

### Enable/disable
Expand Down
Loading

0 comments on commit a76a0fd

Please sign in to comment.