Changelog for Yancy

1.002     2018-03-18 16:55:11-05:00 America/Chicago

    [Fixed]

    - Fixed some optional tests that were causing Travis build failures
    - Fixed Yancy API returning an error message when an item contained
      a `null` value. Thanks @Akron!

    [Docs]

    - Added documentation on how to use the `run_backend_tests.pl`
      script to run Yancy's integration tests. Thanks @Akron!
    - Added documentation on nullable fields and what to do if the Yancy
      API returns an error about "Expected <type> - Got null." Thanks @Akron!

1.001     2018-03-15 14:55:05-05:00 America/Chicago

    [Fixed]

    - Stop using deprecated `Mojo` base class
    - Improved backend helper documentation with links
    - Fixed links to old config docs to link to new config docs

1.000     2018-03-15 00:21:07-05:00 America/Chicago

    [Added]

    - Added basic filtering to the editor web app
    - Added `x-ignore` to completely remove collections from the API
      (when these collections would otherwise be added by `read_schema`)
    - Allow any unique constraint to be used as the Yancy key for
      a collection. This solves some problems where a table had a unique
      constraint, but no primary key.
    - Added an example application, and some integration tests to go
      with it. More example applications will be built later.

0.023     2018-03-10 18:57:54-06:00 America/Chicago

    [Added]

    - Added a `total_pages` stash to the `list` action of controllers.
      This can be used to build pagination links to move between list
      pages.

    - Added a `filter` stash configuration to the `list` action of
      controllers. This allows for filtering the data in the list.

    - The ID field of a collection can now be any unique field of the
      collection.

    - Added sorting to the editor. Clicking a column heading will sort
      the list by that column.

    [Fixed]

    - Fixed multi-tenant controller
      (Yancy::Controller::Yancy::MultiTenant) to be useful. Previously,
      it tried to make the editor available in a multi-tenant style.
      Now, you can use it to build routes to display content from
      a collection that is owned by a specific user.

    - Fixed page/limit stash values not always appearing in Yancy
      controller actions. Pagination links require that we always know
      the current page, so now Yancy is sure to set the current page if
      it is not already set.

    - Fixed DBIx::Class backend to work with any unique column in
      a table, not just the primary key. For example, this allows Yancy
      to use the `username` column of a `users` table while still
      allowing an `id` column to be the primary key.

    - Fixed MySQL backend returning the wrong ID during create. It was
      always returning a generated ID, even if that ID could not be used
      by Yancy to fetch the data just inserted.

    - The query parameters for the `list` API used by the editor have
      now been prefixed with a `$` to distinguish them. In the future,
      we will be adding filtering to the `list` API, and there cannot be
      collisions with existing meta-parameters.

0.022     2018-03-06 15:56:48-06:00 America/Chicago

    [BREAKING CHANGES]

    These are likely the last breaking changes before version 1.0.

    - The `create` method of all Yancy backends now only returns the ID
      of the newly-created item. This also extends to the API and the
      `yancy.create` helper.

    - The `set` and `delete` methods now return true if there was an
      item found and modified, false otherwise. The API still returns
      the full, modified object, but the `yancy.set` and `yancy.delete`
      methods both return true/false.

    [Added]

    - Added CSRF protection to the Yancy controller. Code in Yancy needs
      to be secure by default.
    - Added logging for validation errors using Yancy helpers.
      Exceptions need to be logged to help track down problems.

0.021     2018-03-02 12:39:14-06:00 America/Chicago

    [BREAKING CHANGES]

    - The `list` method of all Yancy backends now returns a hash with
      keys named `items` and `total`. Previously, the keys were named
      `rows` and `total`. This change makes it more clear what data is
      where, and makes it easier to simply shove all the data into the
      stash.

      The word "rows" implies more of a relational database model than
      Yancy is meant to be.

    [Added]

    - Added `Yancy::Controller::Yancy`, a simple controller for
      boilerplate Create, Retrieve, Update, and Delete (CRUD) operations
      on data. Use these to speed development instead of writing your
      own route handlers.

    [Fixed]

    - Fixed out-of-date screenshots
    - Markdown editor is now responsive for smaller screens

0.020     2018-02-25 14:42:31-06:00 America/Chicago

    [Added]

    - Added a new responsive sidebar menu to the editor. This menu
      performs better on mobile devices.

    [Fixed]

    - Fixed integration test for other backends. This wouldn't have
      prevented installing, but could have hidden bugs in backends.
    - Fixed "add item" button to be more visible when the add item form
      was open. Clicking on the "add item" button will now close the add
      item form.
    - Fixed bad Auth::Basic plugin configuration causing strange errors.
      The configuration is now checked for sanity before continuing.
    - Fixed `auth` layout being too big for the page, causing
      a scrollbar to appear.

    [Docs]

    - Moved standalone app docs to another file. This should
      de-emphasize the standalone app, which is more of a curiosity than
      a useful product.

    [Other]

    - Upgrade to Bootstrap 4.0.0 release. Previously we were using the
      4.0.0 beta version. The stable release version re-adds offset
      classes and other utilities that we need.
    - Moved `controller_class` configuration to `api_controller`, which
      better defines what the class does. The controller class itself is
      now `Yancy::Controller::Yancy::API`, to better describe what it
      does and to free up the `Yancy` name for future development.

      This future development should make the `MultiTenant` controller
      more useful and make developing apps with Yancy even easier.

0.019     2018-02-23 23:25:57-06:00 America/Chicago

    [Added]

    - Added a layout template for auth plugin. This layout template
      doesn't have confusing links like "Yancy" and "Back to
      Application".
    - Added error message when login fails

    [Fixed]

    - Fixed missing documentation for title/description fields in
      collections. Thanks @lindleyw! [Github #11]
    - Fixed documentation for auth plugin: The code examples were
      completely broken.
    - Fixed login form losing the return to URL if there was a login
      failure.
    - Fixed editor displaying no content when URL points to
      a non-existent page
    - Fixed "Back to Application" link being collapsed behind a menu
      button on small screens
    - Fixed collection title not being used in the collection navigation
      list
    - Improved responsiveness of editor application: Now the collection
      list takes up more space on smaller screens to avoid wrapping of
      collection names.

0.018     2018-02-21 18:10:29-06:00 America/Chicago

    [Added]

    - Added `plugin` helper to easily load Yancy plugins
    - Added `auth->route` helper to Yancy::Plugin::Auth::Basic to allow
      adding more routes that require authentication.

    [Fixed]

    - Fixed displaying login form requiring authentication if auth
      covered the entire site
    - Fixed wrong tables being found when reading MySQL or Postgres
      database schemas. These database systems allow multiple schemas in
      a single database instance, so we need to make sure we're reading
      from the right schema.
    - Fixed the SQLite backend docs using invalid SQL syntax. Thanks
      @Akron [Github #10]
    - Fixed test module (Yancy::Backend::Test) being installed with rest
      of project

    [Other]

    - Run all tests under all backends using Travis. All supported
      backends are running all Yancy tests instead of just their
      individual backend tests. This should help to ensure that every
      backend has the same behavior and functionality.

0.017     2018-02-17 22:25:32-06:00 America/Chicago

    [Added]

    - Added `route` configuration to allow Auth plugin to protect more
      than just the Yancy editor. Now it can protect the entire site.

    [Fixed]

    - Fixed paginator looking bad when more than a few dozen pages
      existed. Now only 9 pages are shown at maximum.
    - Fixed login failed not having the correct, 400 HTTP status code
    - Fixed login form to return to previous page. This will be
      important when the login form is used for more than just the Yancy
      editor.

0.016     2018-02-16 22:33:21-06:00 America/Chicago

    [Added]

    - `read_schema` now properly adds `x-order` to show the form fields
      in the same order as defined in the table schema.
    - Added templated list columns. Useful information can be shown more
      compactly in the list view.
    - Added `x-view-url` and `x-view-item-url` to provide links to view
      information in the editor.

    [Fixed]

    - Fixed pagination showing blank pages

0.015     2018-02-12 12:52:32-06:00 America/Chicago

    [Added]

    - Allow `null` as a value for optional fields. Now we can specify
      optional fields as `type: [ "<type>", null ]` and these fields are
      correctly parsed from the existing schema.

      This fixes validation errors where data could be inserted into the
      database but not read back out because the JSON::Validator
      correctly asserted that the data was not allowed to be `null`.

    [Fixed]

    - Fix error when collection in URL is invalid. This seemed to cause
      very strange errors throughout the application.

0.014     2018-02-09 14:50:26-06:00 America/Chicago

    [Added]

    - Added "textarea" field format for multiline text fields
    - Added friendly error message when no collections configured
    - Added `x-order` field configuration to control the order of fields
      in the edit form

    [Fixed]

    - Fixed "Yancy" and "Back to Application" links in Yancy UI to point
      to useful locations. Thanks @lindleyw!

0.013     2018-02-07 23:21:49-06:00 America/Chicago

    [Added]

    - Added display of `title` and `description` for collections
      and fields

    [Fixed]

    - Fixed problem with tests not running on Perls < 5.24. Thanks
      @lindleyw! [Github #9]

0.012     2018-01-29 12:37:52-06:00 America/Chicago

    [Fixed]

    - Backends now give friendly errors when their prereqs are unmet
    - Fixed automatically generating schema not working when no
      properties were configured manually
    - Create new item form no longer shows read-only fields. This
      prevents us seeing blank ID fields which we can't fill in
    - Fix validation error when not filling-in a field with a default
      value.

    [Added]

    - Added `ENUM` type detection for all backends:
        - MySQL has a built-in `ENUM` type
        - DBIx::Class has `extras` column property which has a `list`
          array
        - Postgres has custom types which can provide `ENUM`
        - SQLite has `CHECK` constrains which can provide `ENUM`-like
          features with `<col> CHECK ( <col> IN ( <values> ) )`

0.011     2018-01-13 12:46:24-06:00 America/Chicago

    [Fixed]

    - Removed dependency on Module::Loader in favor of Mojo::Loader
    - Removed accidental import of File::Share

0.010     2018-01-12 16:53:16-06:00 America/Chicago

    - Yancy now works on Perl versions down to 5.10 (just like
      Mojolicious).
    - Yancy now bundles its required CSS and JavaScript to make it
      easier to use Yancy when not connected to the Internet.

    [Added]

    - Yancy can now share a database object with the rest of your app by
      passing in a hashref for the C<backend>. See Mojolicious::Plugin::Yancy.

0.009     2018-01-07 16:33:16-06:00 America/Chicago

    [Added]

    - Added `read_schema` method to all backends. This reads the
      database tables in the backend and produces an OpenAPI schema
      ready to be used for configuration.

    - Added `read_schema` configuration key. If true, Yancy will read
      the backend schema and merge it in with your configuration. This
      allows for less repetition when building a Yancy application.

      This exposes _all_ of your data to Yancy, so you should only do
      this when you have added appropriate authentication and
      authorization to prevent malicious use.

    - Added `x-hidden` collection configuration to hide collections from
      the Yancy web app. This does not prevent API use, but does prevent
      data from being shown before it is ready.

0.008     2017-12-17 18:17:56-06:00 America/Chicago

    [Fixed]

    - Fixed tests failing due to outdated Mojolicious::Plugin::OpenAPI.
      Thanks @eserte! [Github #4]
    - Fixed POD formatting error due to having UTF-8 characters without
      declaring the right encoding. Thanks @manwar! [Github #5]

0.007     2017-12-16 18:16:22-06:00 America/Chicago

    [Added]

    - Added `controller_class` configuration to Plugin. Now you can make
      your own controller to customize things like authorization.
    - Added `config` helper to access the configuration for Yancy in
      custom controllers or plugins
    - Added MultiTenant controller which only shows content that is
      owned by the current user.

    [Fixed]

    - Fixed some problems that would cause the Sqlite backend to not
      work. Thanks @wlindley! [Github #3]
    - Fixed the plugin and standalone apps to use the same URL scheme by
      default. This makes the documentation less confusing.
    - The `yancy.set` and `yancy.create` helpers now validate the data
      and run it through any filters. These helpers are the key to
      making your own routes that work with data configured in Yancy.

0.006     2017-12-15 11:06:59-06:00 America/Chicago

    [Added]

    - Added backend support for SQLite (thanks @wlindley!) [Github #2]
    - Added Basic auth plugin for a simple, database-backed
      authentication scheme.
    - Added documentation about how to override Yancy templates to
      produce your own look-and-feel

    [Fixed]

    - Fixed some POD errors reported by CPANTS (thanks @manwar!) [Github
      #1]

0.005     2017-12-12 15:45:14-06:00 America/Chicago

    [Added]

    - Added footer with Yancy version and link to Github
    - Added `plugins` configuration to standalone app
    - Added UI feedback after saving/adding items and error messages on
      failure
    - Added `order_by` to backends and API. Now we can sort the results
      we get from the collection.
    - Added Markdown editor for fields containing Markdown (`"format":
      "markdown"`)
    - Added field filters (`x-filter`) to allow for hashing of passwords
    - Added auto-index templates to the standalone app. This allows for
      building a single template for `/<collection>/<id>`.
    - Added search query to list backend method

    [Fixed]

    - Fixed forms not displaying if an `example` was not added to the
      collection
    - Fixed no list columns displaying without `x-list-columns`. Now
      there are some default column names that will show up in the list.
    - Fixed missing documentation for:
        - Yancy::Backend
        - Plugin helpers

0.004     2017-12-05 14:50:02-06:00 America/Chicago

    [Fixed]

    - Fixed DBIx::Class backend test failing without SQL::Translator.
      Now it skips the test without that required module.

    [Docs]

    - Added more docs to the test files to help new developers

0.003     2017-12-05 13:16:44-06:00 America/Chicago

    [Fixed]

    - Raised minimum Mojolicious version to 7.15 (which adds
      Mojo::File). Thanks CPAN Testers!

0.002     2017-12-02 20:46:56-06:00 America/Chicago

    [Fixed]

    - Fixed app trying to save readonly properties. The OpenAPI spec
      prevents this, but that means we get an error and our data isn't
      saved correctly.

    - Fixed invalid spec URL. The spec only worked accidentally, which
      was weird...

    [Added]

    - Added screenshot to documentation

0.001     2017-12-02 18:49:56-06:00 America/Chicago

    - Initial release

    [Added]

    - Basic OpenAPI spec generation
    - Database editing web application
    - Auto-generated form to edit database content
    - Simple built-in CMS
    - Mojolicious plugin to add Yancy to your Mojolicious app
    - Database backends for MySQL, Postgres, and DBIx::Class

