Tinacms Versions Save

A fully open-source headless CMS that supports Markdown and Visual Editing

v0.43.3

2 years ago

0.43.3 (2021-07-23)

Bug Fixes

  • @tinacms/form-builder: Removes onKeyPress from FormBuilder (f0e456b)

v0.43.2

2 years ago

0.43.2 (2021-07-20)

Bug Fixes

  • react-tinacms-editor,react-tinacms-inline: Fixes deps (d60eb84)

v0.43.1

2 years ago

0.43.1 (2021-07-13)

Bug Fixes

  • react-tinacms-github: Makes form-builder a peerDependency (0e2174c)

v0.43.0

2 years ago

0.43.0 (2021-07-12)

Bug Fixes

  • react-tinacms-editor: fixing FocusRingOptions import path (7096add)
  • react-tinacmseditor: fixing FocusRingOptions import path (6c231e3)

Features

  • react-tinacms-inline: InlineBlocks children (00d5804)
  • tinacms: customize list error message by throwing a MediaListError (5aff1da)

v0.42.1

2 years ago

0.42.1 (2021-06-28)

Features

  • Unifies FormOptions across all useForm(...) variations (ff3c058)
  • @tinacms/form-builder,@tinacms/react-forms: Combines FormView and FormBuilder (8b1e194)
  • @tinacms/git-client: Migrate GitMediaStore to cursor-based pagination (8d2146c)
  • react-tinacms-github: Migrate GithubMediaStore to cursor-based pagination (5163fad)
  • react-tinacms-strapi: Migrate StrapiMediaStore to cursor-based pagination (646151f)
  • tinacms: configure media mgr page size via mediaOptions.pageSize (5d7890f)
  • tinacms: remove pluggable pagination (846b516)
  • tinacms: use cursor-based pagination in media manager (7a94b97)

Changes to MediaStore API

This release includes some changes to the MediaStore API that could cause existing implementations to generate errors. If you're using one of our first-party implementations (such as GithubMediaStore or StrapiMediaStore), you shouldn't need to do anything other than upgrade those respective packages to the latest release. If you created your own MediaStore implementation, you will need to make some small changes.

Cursor-Based Pagination

The media library is switching to a different pagination format. The previous version used numbered pages, and had the list method pass a numerical limit and offset back-and-forth to the UI. This style of pagination is not compatible with certain Digital Asset Managers and other API-based data storage providers, which instead return a batch of results along with a "cursor" value that can be used to retrieve the next batch of results in sequence. This is a less-opinionated style of pagination, and any existing setups using the old approach should be easy to migrate by making some changes to their list method. Take a look at the GithubMediaStore commit that migrates it to the new API, and continue reading below for details on the how and why.

1. MediaStore#list should only return items and nextOffset

The only metadata (data in addition to the list of media items) that your list method needs to return is nextOffset. This will represent the cursor position that the next set of records should be retrieved from, and will be passed back into your list method as its offset value when a user clicks Next in the UI to browse further in. Assuming your current list method is API-accurate, you will have a few return values to remove:

return {
    items: items.map(contentToMedia).slice(offset, offset + limit),
-   offset,
-   limit,
    nextOffset: nextOffset(offset, limit, items.length),
-   totalCount: items.length,
}

2. TypeScript: Coerce MediaListOptions.offset to number

The offset value sent to your list function via the options object is now typed as string | number, as some APIs may use alphanumeric keys to represent your browsing position in the collection. If you're using TypeScript and performing arithmetic with the offset value, you should expect to see an error here. Because the offset value passed to your list method is going to be a value that was returned by your list method at some point, it is safe to coerce the offset value to number as long as your nextOffset return value is also a number.

- const offset = options?.offset ?? 0
+ const offset = (options?.offset as number) ?? 0

We could also solve this with generics, but felt that would be heavy-handed for this case. Let us know if you feel differently!

v0.41.1

2 years ago

0.41.1 (2021-06-11)

Bug Fixes

  • bug: disables form save button if field fails validation (e829ffa)

v0.41.0

2 years ago

0.41.0 (2021-05-17)

Bug Fixes

  • @tinacms/fields: Better handling for default formats (af3496d)

Features

  • Updates default format to be more standards compliant (3617ea6)
  • @tinacms/fields: Adds date field to default plugins (8ac27d1)

v0.40.1

2 years ago

0.40.1 (2021-05-05)

Bug Fixes

  • @tinacms/react-sidebar: disable "create" button while waiting for submit response (1acc297)

v0.40.0

3 years ago

0.40.0 (2021-04-19)

Bug Fixes

  • alert container click blocking (4d3f8ed)
  • Changes 30px to 1.5rem (63e7f71)
  • Check for $GH_TOKEN when releasing (c8c8fc9)
  • @tinacms/fields: Fixes width for list selects (2d0f991)
  • do not recreate FormPortal on a ref value change (7fade9a)
  • Docs & Nuke.sh (da36b61)
  • switched to style prop to set zIndex (3376dcd)
  • the same mistake with MenuPortal (94690b3)

Features

v0.39.0

3 years ago

0.39.0 (2021-03-30)

Bug Fixes

  • close on click outside (462e09f)
  • dangerfile: Updates dangerfile (7badcb5)
  • copyright (e4323c2), closes #1778
  • copyright (c916b63), closes #1778
  • @tinacms/fields: Fix Radio Final Form Warning (03cf71b)
  • modal x button cancels changes (258d190)
  • @tinacms/react-sidebar: Allows initialValues for ContentCreator Plugins (7562809)
  • next-tinacms-markdown: Fixes fileRelativePath for useMarkdownForm (6ce43fc)
  • react-tinacms-github: fix missing unique "key" prop in modal actions (475bafa)
  • tinacms: Fixes pagination for MediaStore (5e51cbe)
  • inline group click event bug (15c8675)

Features

  • inline block search (3080eac)
  • react-tinacms-github: Add WatchableFormValues argument to useGithubFileForm, useGithubJsonForm, useGithubMarkdownForm (51ce6f3)
  • tinacms: export independent components for CMS provider and UI (c8bd31e)