Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #28 from JordanMartinez/development
Browse files Browse the repository at this point in the history
Make next minor release: v2.1.0
  • Loading branch information
JordanMartinez authored Jul 2, 2019
2 parents b7ef7fa + 93f40fd commit 51da4e3
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 170 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ install:
# helpful as to how to do that
- npm i -g npm
# Also update NPM
- npm i -g [email protected] [email protected].3 parcel
- npm i -g [email protected] [email protected].5 parcel
# ^ Installing PureScript 0.13.0 hopefully now works

# Print version numbers
Expand Down
6 changes: 3 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

[![Build Status](https://travis-ci.com/JordanMartinez/learn-halogen.svg?branch=latestRelease)](https://travis-ci.com/JordanMartinez/learn-halogen)

Learn [`purescript-halogen`](https://github.com/slamdata/purescript-halogen), (`v5.0.0-rc.4`) from a bottom-up approach
Learn [`purescript-halogen`](https://github.com/slamdata/purescript-halogen), (`v5.0.0-rc.5`) from a bottom-up approach

## Requirements

Before learning Halogen via this project, you will need to install the following. (If you don't have them already installed, see my purescript learning repo's [Install Guide](https://github.com/JordanMartinez/purescript-jordans-reference/blob/latestRelease/00-Getting-Started/02-Install-Guide.md)
- purescript (v0.13.0)
- spago (v0.8.3.0)
- spago (v0.8.5.0)
- parcel (v1.12.3)

Or, to install them in one line
```bash
npm i -g [email protected] [email protected].3 parcel
npm i -g [email protected] [email protected].5 parcel
```

## Target Audience
Expand Down
6 changes: 3 additions & 3 deletions packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ let additions =
-}

let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190602/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190626/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190602/src/packages.dhall sha256:5da1578dd297709265715a92eda5f42989dce92e121fcc889cff669a3b997c3d
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.0-20190626/src/packages.dhall sha256:9905f07c9c3bd62fb3205e2108515811a89d55cff24f4341652f61ddacfcf148

let overrides =
{ halogen =
upstream.halogen // { version = "v5.0.0-rc.4" }
upstream.halogen // { version = "v5.0.0-rc.5" }
, halogen-vdom =
upstream.halogen-vdom // { version = "v6.1.0" }
}
Expand Down
4 changes: 3 additions & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name =
{ sources =
[ "src/**/*.purs", "test/**/*.purs" ]
, name =
"my-project"
, dependencies =
[ "console"
Expand Down
5 changes: 5 additions & 0 deletions src/03-Parent-Child-Relationships/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ In simple terms, Halogen models their communication in this way:

![Parent-Child-Relationship--Communication.svg](../../assets/visuals/Parent-Child-Relationship--Communication.svg)

Note: queries, when evaluated, run a monadic computation that outputs a `Maybe a` rather than `a`. This single type models three possibilities:
1. The child is not a part of the DOM (it was never rendered or it was rendered and then disposed of), so `Nothing` is returned.
2. The child is a part of the DOM, but some error occurred. In such a case, `Nothing` will be returned.
3. The child is a part of the DOM and the query was successful. In such a case, `Just a` will be returned.

### Child to Parent Communication

The corresponding files for this section: `Message-Only`
Expand Down
6 changes: 4 additions & 2 deletions src/04-Lifecycle/01-Lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ component =

## Top-Level Component Bug

While finalizers normally run, in `v5.0.0-rc.4`, they won't run when the component in question is the top-level component. See https://github.com/slamdata/purescript-halogen/issues/602
The below bug was fixed in `v5.0.0-rc.5`

As a result, the child component and parent component examples below, which are both top-level components, won't run their finalizers.
~While finalizers normally run, in `v5.0.0-rc.4`, they won't run when the component in question is the top-level component. See [Halogen issue #602](https://github.com/slamdata/purescript-halogen/issues/602)~

~As a result, the child component and parent component examples below, which are both top-level components, won't run their finalizers.~

## Compiling Instructions

Expand Down
5 changes: 5 additions & 0 deletions src/06-Driver/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ main =
tellResult <- io.query $ H.tell $ TellChildSomething 4
```

Note: sending queries into the root component, when evaluated, will run a monadic computation that outputs a `Maybe a` rather than `a`. This single type models three possibilities:
1. The root component was a part of the DOM, and one later called `halogenIO.dispose` (covered later in this file). In such a case, the root component is no longer a part of the DOM, so `Nothing` is returned.
2. The root component is a part of the DOM, but some error occurred when evaluating the query. In such a case, `Nothing` will be returned.
3. The root component is a part of the DOM and the query was successful. In such a case, `Just a` will be returned.

### Subscribing to Messages Raised by the Top-Level Component

Section's corresponding files: `Subscribing-to-Messages`
Expand Down
6 changes: 6 additions & 0 deletions src/09-Where-Do-We-Go-From-Here.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@
- projects for handling routing:
- [purescript-routing-duplex](https://github.com/natefaubion/purescript-routing-duplex)
- [purescript-boomboom](https://github.com/paluh/purescript-boomboom)

## Component Templates Files for Other Libraries

Note: these files are the initial ones I created after learning how to use the below libraries. I have not refined them since creating them, so some things may be missing. They also lack comments that explain what does what and how to best use them.
- [`halogen-select`](https://github.com/JordanMartinez/purescript-halogen-select/commit/209a11194012753d99cedf9202077e2b2c2c728f)
- [`halogen-formles`](https://github.com/JordanMartinez/purescript-halogen-formless/commit/47f8ad7ca1c1eadec6223c9004d43ec38dc762a8)
Loading

0 comments on commit 51da4e3

Please sign in to comment.