Lowdefy 7.1: journey tests seed each database your connections name, and Validate reaches inside containers

1 hour ago

Lowdefy 7.1 is a minor release with one new feature for journey tests and ten fixes. Two of those fixes change what existing form config does, so if your app validates a container or resets a parent object, stay to the end.

Ask about this presentation

Chapters

  1. 0:00Lowdefy 7.1.0
  2. 0:16Data sets: one run database per database
  3. 0:37Validate reaches inside containers
  4. 1:00SetState clears hidden inputs
  5. 1:19Build status reports failed pages
  6. 1:36Two build warnings stop firing on correct config
  7. 1:54Fixes in AgGrid, DateRangeSelector and RatingSlider
  8. 2:14Long recipient addresses no longer stall the server
  9. 2:34Before you upgrade
Show transcript
  1. Lowdefy 7.1 is a minor release with one new feature for journey tests and ten fixes. Two of those fixes change what existing form config does, so if your app validates a container or resets a parent object, stay to the end.

    Slide text
    Lowdefy

    Journey tests seed each database your connections name, and Validate reaches inside containers

    7.1.0 One new feature and ten fixes, two of them to form behavior
  2. Journey data sets load test data into fresh in-memory MongoDB databases. Before 7.1, every connection read one run database, so seeding tickets in two databases got the journey refused. Now each database your connections name gets a run database of its own, and the run drops them all when the journey ends.

    Slide text
    Lowdefy@lowdefy/server-dev

    A journey can now seed tickets in two MongoDB databases at once

    lowdefy.yaml
    connections:
      - id: tickets
        type: MongoDBCollection
        properties:
          databaseUri:
            _secret: MONGODB_URI
          collection: tickets
      - id: crm_tickets
        type: MongoDBCollection
        properties:
          databaseUri:
            _secret: CRM_MONGODB_URI
          collection: tickets
    MONGODB_URI
    its own run database · tickets · 3 fixtures
    CRM_MONGODB_URI
    its own run database · tickets · 2 fixtures
    Same databaseUri and databaseName share one. All are dropped when the journey ends.
  3. Validate now reaches inside containers. In 7.0, Validate with a card's id matched only the card, checked nothing, and succeeded. In 7.1 it validates every input inside the card and stops the action chain when one is invalid. ResetValidation matches the same way, and an id that matches no block logs a console warning.

    Slide text
    Lowdefy@lowdefy/engine

    Validate on a card now validates the inputs inside it

    button events
    onClick:
      - id: validate
        type: Validate
        params: contact_card
    7.0
    Matches the card alone, checks nothing, succeeds
    7.1
    Validates every input inside the card and stops the chain on an invalid one
    ResetValidation matches the same way. An id that matches no block logs a console warning.
  4. Resetting a form with SetState was fixed too. Setting a parent to an empty object, or to null, used to skip inputs hidden at that moment, so they wrote their old values back when they showed again. Now every input under the parent is cleared. Writing an unrelated key still leaves hidden inputs alone.

    Slide text
    Lowdefy@lowdefy/engine

    Resetting a parent with SetState now clears hidden inputs too

    reset a form
    SetState: { contact: {} }
    Visible input under contact Hidden input under contact
    7.0 Cleared Keeps its value and writes it back when shown
    7.1 Cleared Cleared
  5. If an agent drives your dev server, this one is for you. Pages build on first request, after the config build. The build status took its top line from the config build alone, so it read ok while a page failed. Now it reads pages failed, and a failed pages list names them.

    Slide text
    Lowdefy@lowdefy/server-dev · lowdefy

    The dev server's build status stops saying ok while a page fails

    7.0
    lowdefy_build_status
    {
      "build": {
        "status": "ok"
      },
      "pages": {
        "failed": [ … ]
      }
    }
    7.1
    lowdefy_build_status
    {
      "build": {
        "status": "pages_failed",
        "failedPages": [ … ],
        "configStatus": "ok"
      },
      "pages": {
        "failed": [ … ]
      }
    }
  6. Two build warnings stop firing on config that was already correct. The plugin check warning now names only plugins that own a block, action or operator type, and only after your plugins install. And AgGrid columns can name a provided filter, like the date column filter.

    Slide text
    Lowdefy@lowdefy/build · @lowdefy/blocks-aggrid

    Two build warnings stop firing on config that was already correct

    lowdefy build
    Plugin checks for <package> did not run: package not installed.
    columnDefs.N.filter must be type "boolean"
    Now only for plugins that own a block, action or operator type, after plugins install
    filter: agDateColumnFilter and the text and number filters are accepted
  7. AgGrid, DateRangeSelector and RatingSlider each get a fix you can see. Ticked AgGrid checkboxes now show a white tick on the primary colour. A date typed into a DateRangeSelector applies on Enter when the other date is set. And a RatingSlider's colour now reaches its track, handle and dots.

    Slide text
    Lowdefy@lowdefy/blocks-aggrid · @lowdefy/blocks-antd

    AgGrid, DateRangeSelector and RatingSlider each get a fix you can see

    AgGrid
    Ticked checkboxes show a white tick on the primary colour
    DateRangeSelector
    Enter
    A typed date applies the range when the other date is set
    RatingSlider
    color now reaches the track, handle and dots
  8. If your app sends mail through the SMTP or SendGrid connection, take this fix. Recipient addresses were read with regular expressions that slow down with the square of the input length, so a recipient a few hundred kilobytes long could block the server for seconds to minutes. They're now read in linear time, with the same results.

    Slide text
    Lowdefy@lowdefy/connection-smtp · @lowdefy/connection-sendgrid

    A crafted recipient address can no longer stall your server

    Seconds to minutes
    blocked by a recipient a few hundred kilobytes long
    Linear time
    same results, in SMTP and SendGridMail
    SMTP/applyMailFilter.js
    - const domain = getDomain(getBareEmail(entry))
    -   .replace(/\.+$/, '');
    + const domain = trimTrailingDots(
    +   getDomain(getBareEmail(entry)));
  9. The release notes list zero breaking changes. Two fixes do change what running config does, so check for them first. A Validate that names a container now checks its inputs, and can stop a chain it used to pass. A SetState that resets a parent now clears its hidden inputs. Then upgrade for multi-database journey tests and ten fixes.

    Slide text
    Lowdefy7.1.0

    Before you move to 7.1, check two form patterns

    Validate on a container id
    Now checks the inputs inside, and can stop an action chain it used to pass
    SetState on a parent object
    Now clears the hidden inputs under it
    github.com/lowdefy/lowdefy/releases/tag/v7.1.0

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️