Nibble

0.17.0

What changed in Nibble 0.17.0.

Every release, taken from CHANGELOG.md

← Every release

Nibble 0.17.0

What’s new

  • Updates shows ten releases at a time, with Load more for the next ten, which light up for a moment as they arrive. The list of releases is read a page at a time, and only as far as the release a site runs.
  • A paginated query can scroll. paginate: { scroll: true } makes each page append to the last, for Inertia’s InfiniteScroll.
  • Publishing a dated entry with no publish date publishes it now. The date is stamped at that moment, as it already was for undated collections, instead of refusing until one is typed in.
  • Publish changes can skip its message. The arrow beside the button offers Ask for a message or Publish straight away, remembered per person like the choice after saving.
  • An entry can leave search. Every entry of a searched collection has an Include in search toggle in its sidebar, on unless someone turns it off; a page written as a file says search: false in its front matter. A blueprint with its own search field keeps it, and gets no toggle.
  • A search query can narrow by collection. where: { collection: docs } (or in: a list, or $params.section) on a search: source searches part of an index, so one index serves a site-wide search and a docs-only one.
  • A query can ask for a record’s parent, its title and address, so a search result can say which section it sits in. It is looked up only when fields names it.
  • A new site lints and formats what it owns. npm run lint runs ESLint over its themes and the screens it ejected, including the rule that a theme imports only @nibble, @theme, relative paths and its own dependencies; npm run format and npm run format:check run Prettier in Nibble’s style.
  • Every email has a heading, and a button when there is something to do. Invitations, password resets, form submissions and notifications are rewritten for the person reading them, and drawn in one layout that styles plain HTML. A site restyles them all with its own app/views/layouts/mailer.html.erb; the Emails guide lists what each one uses. A form submission says to reply only when a reply reaches the visitor.

What’s fixed

  • Search snippets read as text, not Markdown: **, links and image syntax no longer show around the match.
  • A page written as a file is indexed once. Its words were stored twice, which ranked it above an entry saying the same thing.
  • A view that asks for parent type-checks. The generated types picked it from the record, which has no such key, so site/types.d.ts failed to compile; it is typed as ParentSummary now.
  • A theme from nibble:generate:theme passes the format check, starting with its theme.yml.
  • nibble:check no longer reports a sidebar taxonomy or the search toggle as removed. Both are kept on an entry beside its blueprint, and the check only knew the blueprint’s own fields.
  • The generated types follow the theme a development server renders, written as it starts, so an editor checks a theme against its own schema rather than whichever theme wrote the types last.
  • A site’s .gitignore keeps out vendor/nibble/Gemfile.lock, which some editors write beside Nibble’s Gemfile. Upgrade: accept the .gitignore the upgrade offers.

Changed

One change waits for load_defaults: "0.17.0":

  • An index is made of the collections and taxonomies that name it, with search: <index> in their own files. search.yml keeps each index’s settings, such as fields; its collections and taxonomies lists are no longer read, and bin/rails nibble:check reports one that is still there. Taxonomies accept search: from this release.

Upgrade: to lint an existing site, copy eslint.config.js and prettier.config.js from vendor/nibble/templates/ into the site’s root, and the lint, format and format:check scripts from vendor/nibble/templates/package.json.erb into its package.json. The search index gains a column, so this release recreates it, and nibble:prepare rebuilds it on the deploy that follows. Before raising load_defaults to "0.17.0", give every collection and taxonomy listed in your search.yml a search: <index> key of its own, and remove the lists.