- 216cfff0c: Add fetch options to generated client
- c8ceba4d8: Fixes an issue where it was impossible to navigate to nested fields (e.g. object fields or list items) when editing the values for a rich-text template when that template was configured to be inline: true
- 04704e3dc: Fix incorrect call to isAuthenticated
- @tinacms/search@1.0.18
- @tinacms/search@1.0.17
- 4202c1028: Add support link in sidebar
- 64f8fa038: This extends the existing
LoginStrategy
type to include a newLoginScreen
option. AgetLoginScreen
function can be set on the AuthProvider to display a custom login screen, rather than showing the modal popups and forcing a redirect or displaying the default username and password form. This will hopefully simplify the process of creating custom auth providers and handling user authentication when self-hosting. - 548fe6d96: Fixes #4356
- 50b20f809: Fix issue where the link form would not render.
- Updated dependencies [64f8fa038]
- @tinacms/schema-tools@1.4.15
- @tinacms/search@1.0.16
- @tinacms/mdx@1.3.23
- 9e1a22a53: Fix media store auth functions
- @tinacms/search@1.0.15
-
a65ca13f2: ## TinaCMS Self hosted Updates
- Deprecated:
onPut
,onDelete
, andlevel
arguments increateDatabase
. - Added:
databaseAdapter
to replacelevel
. - Added:
gitProvider
to substituteonPut
andonDelete
. - New Package:
tinacms-gitprovider-github
, exporting theGitHubProvider
class. - Interface Addition:
gitProvider
added to@tinacms/graphql
. - Addition: Generated database client.
import { createDatabase, createLocalDatabase } from '@tinacms/datalayer' import { MongodbLevel } from 'mongodb-level' import { GitHubProvider } from 'tinacms-gitprovider-github' const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === 'true' export default isLocal ? createLocalDatabase() : createDatabase({ gitProvider: new GitHubProvider({ branch: process.env.GITHUB_BRANCH, owner: process.env.GITHUB_OWNER, repo: process.env.GITHUB_REPO, token: process.env.GITHUB_PERSONAL_ACCESS_TOKEN, }), databaseAdapter: new MongodbLevel<string, Record<string, any>>({ collectionName: 'tinacms', dbName: 'tinacms', mongoUri: process.env.MONGODB_URI, }), namespace: process.env.GITHUB_BRANCH, })
- GitHubProvider Usage: Replace
onPut
andonDelete
withgitProvider
, using the providedGitHubProvider
for GitHub.
const gitProvider = new GitHubProvider({ branch: process.env.GITHUB_BRANCH, owner: process.env.GITHUB_OWNER, repo: process.env.GITHUB_REPO, token: process.env.GITHUB_PERSONAL_ACCESS_TOKEN, })
- Custom Git Provider: Implement the
GitProvider
interface for different git providers.
If you are not using Github as your git provider, you can implement the
GitProvider
interface to use your own git provider.class CustomGitProvider implements GitProvider async onPut(key: string, value: string) // ... async onDelete(key: string) // ... const gitProvider = new CustomGitProvider();
- Renaming in Code: Change
level
todatabaseAdapter
for clarity.
createDatabase({ - level: new MongodbLevel<string, Record<string, any>>(...), + databaseAdapter: new MongodbLevel<string, Record<string, any>>(...), })
- Usage: Implement a local database with the
createLocalDatabase
function.
import { createLocalDatabase } from '@tinacms/datalayer' createLocalDatabase(port)
- Updated
database.{ts,js}
File:
import { createDatabase, createLocalDatabase, GitHubProvider } from '@tinacms/datalayer'; import { MongodbLevel } from 'mongodb-level'; const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === 'true'; export default isLocal ? createLocalDatabase() : createDatabase({ gitProvider: new GitHubProvider(...), databaseAdapter: new MongodbLevel<string, Record<string, any>>(...), });
- New:
authProvider
indefineConfig
. - Class:
AbstractAuthProvider
for extending new auth providers. - Clerk Auth Provider: New provider added.
- Renaming:
admin.auth
toadmin.authHooks
. - Deprecation:
admin.auth
.
- Transition: From auth functions to
authProvider
class.
- Previous API:
defineConfig({ admin: { auth: { login() {}, logout() {}, //... }, }, //... })
- New API:
import { AbstractAuthProvider } from 'tinacms' class CustomAuthProvider extends AbstractAuthProvider { login() {} logout() {} //... } defineConfig({ authProvider: new CustomAuthProvider(), //... })
-
New: TinaNodeBackend is exported from
@tinacms/datalayer
. This is used to host the TinaCMS backend in a single function. -
New:
LocalBackendAuthProvider
is exported from@tinacms/datalayer
. This is used to host the TinaCMS backend locally. -
New:
AuthJsBackendAuthProvider
is exported fromtinacms-authjs
. This is used to host the TinaCMS backend with AuthJS.
Now, instead of hosting the in /tina/api/gql.ts file, the entire TinaCMS backend (including auth) will be hosted in a single backend function.
/api/tina/[...routes].{ts,js}
import { TinaNodeBackend, LocalBackendAuthProvider } from '@tinacms/datalayer' import { TinaAuthJSOptions, AuthJsBackendAuthProvider } from 'tinacms-authjs' import databaseClient from '../../../tina/__generated__/databaseClient' const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === 'true' const handler = TinaNodeBackend({ authProvider: isLocal ? LocalBackendAuthProvider() : AuthJsBackendAuthProvider({ authOptions: TinaAuthJSOptions({ databaseClient: databaseClient, secret: process.env.NEXTAUTH_SECRET, }), }), databaseClient, }) export default (req, res) => { // Modify the request here if you need to return handler(req, res) }
These changes are put in place to make self hosted TinaCMS easier to use and more flexible.
Please check out the docs for more information on self hosted TinaCMS.
- Deprecated:
-
Updated dependencies [a65ca13f2]
- @tinacms/schema-tools@1.4.14
- @tinacms/mdx@1.3.22
- @tinacms/search@1.0.14
- @tinacms/sharedctx@1.0.2
- 131b4dc55: Fix button styling issue when using Firefox
- 93bfc804a: Fix issue where _template value was provided when creating a document from the editorial workflow
- 1fc2c4a99: Fix media manager to pass back error when upload_url fails due to existing file
- 693cf5bd6: Improve types for tables, add support for column alignment
- afd1c7c97: Fix issue where Saved Changes indicator is not updated after a successful submit on a form
- a937aabf0: Add support for build.basePath to be an environment variable
- 661239b2a: update final form to fix peer deps issues
- 630ab9436: No longer treat user touch event as pending change for rich-text fields
- Updated dependencies [693cf5bd6]
- @tinacms/mdx@1.3.21
- @tinacms/search@1.0.13
-
b6fbab887: Add support for basic markdown tables.
// tina/config.ts import `tinaTableTemplate` from `tinacms` // add it to the rich-text template { type: 'rich-text', label: 'Body', name: '_body', templates: [ tinaTableTemplate ///
Customize the
th
andtd
fields in the<TinaMarkdown>
component:<TinaMarkdown content={props.body} components={{ th: (props) => <th className="bg-gray-100 font-bold" {...props} />, td: (props) => <td className="bg-gray-100" {...props} />, }} />
To control the rendering for `
-
4ae43fdde: UX improvements for editor link plugin
-
aec44a7dc: Allow backend/client to include partial queries
-
Updated dependencies [b6fbab887]
-
Updated dependencies [939147364]
-
Updated dependencies [6861b5e01]
-
Updated dependencies [aec44a7dc]
- @tinacms/mdx@1.3.20
- @tinacms/search@1.0.12
- @tinacms/schema-tools@1.4.13
- 177002715: Fix/media thumbnail
- e69a3ef81: fix: Fix active form on nested group when value is empty
- c925786ef: Fix issue with undo/redo in rich-text editor
- 9f01550dd: Fix issue where deeply nested mdx fields were not picking up the correct template"
- @tinacms/search@1.0.11
- 7e4de0b2a: Improvements to error handling with auth
- 1144af060: Improve error messaging when onPut / onDelete hooks throw errors
- Updated dependencies [7e4de0b2a]
- Updated dependencies [099bf5646]
- Updated dependencies [c92de7b1d]
- @tinacms/schema-tools@1.4.12
- @tinacms/search@1.0.10
-
1563ce5b2: Update the router function to work asynchronously. This means that a user can now fetch data or perform other async operations in the router function.
Example:
router: async ({ document }) => { const res = await client.queries.post({ relativePath: document._sys.relativePath, }) return `/posts/${res.data.slug}` },
-
e83ba8855: Update generated client to work in an edge runtime
-
Updated dependencies [1563ce5b2]
- @tinacms/schema-tools@1.4.11
- @tinacms/search@1.0.9
-
9c27087fb: Show filter/search inputs on collections with templates instead of fields
-
65d0a701f: Show search input even when collection contains only non-filterable fields
-
133e97d5b: Update the before submit types to not pass the finalForm form since it is contained in the TinaForm
-
f02b4368b: Adds a second parameter to the slugify function that passes the current collection and template.
-
37cf8bd40: Updated so a user can add an absolute path to the filename
Before all files where created reletive to the users current folder and we gave an error if the filename started with a
/
.Now we check if the filename starts with a
/
and if it does we use that as the absolute path to the file.Demo: https://www.loom.com/share/5256114d1ce648eda69881e33f8f6bd4?sid=3eafb588-c4da-49eb-ace2-d6b02313e14c
-
ad22e0950: Consolidate tailwind usage
-
8db979b9f: Add support for "static" setting in Tina media, which preprocesses the available media files and disables uploads and deletions of media from the CMS.
-
7991e097e: Add a
beforeSubmit
hook function on a collection.ui. This give users the ability to run a function before the form is submitted.If the function returns values those values will be used will be submitted instead of the form values.
If the function returns a falsy value the original form values will be submitted.
// tina/config.{ts.js} export default defineConfig({ schema: { collections: [ { ui: { // Example of beforeSubmit beforeSubmit: async ({ values }) => { return { ...values, lastUpdated: new Date().toISOString(), } }, //... }, //... }, //... ], }, //... })
-
30c7eac58: Do not show tina cloud link when self hosting
-
121bd9fc4: Absorb @tinacms/toolkit into tinacms
fix: Use clean page-sizes on media manager (to make pagination more obvious)
Fix issue with uploading media in a folder with tina cloud
-
Updated dependencies [133e97d5b]
-
Updated dependencies [f02b4368b]
-
Updated dependencies [7991e097e]
- @tinacms/schema-tools@1.4.10
- @tinacms/search@1.0.8
- @tinacms/sharedctx@1.0.2
- bc812441b: Use .mjs extension for ES modules
- Updated dependencies [bc812441b]
- @tinacms/schema-tools@1.4.9
- @tinacms/sharedctx@1.0.2
- @tinacms/toolkit@1.7.13
- @tinacms/search@1.0.7
- 1889422b0: Fix issue where deeply nested rich-text fields weren't selectable
- Updated dependencies [1889422b0]
- Updated dependencies [ad6a166a6]
- @tinacms/toolkit@1.7.12
- @tinacms/search@1.0.6
- Updated dependencies [019920a35]
- @tinacms/schema-tools@1.4.8
- @tinacms/search@1.0.5
- @tinacms/toolkit@1.7.11
- f1e8828c8: fix: resort prop overrides to allow for style & className merging of list items
- 304e23318: - Update pull request title to include the branch name
- Slugify brach name when typing in the title
- Updated dependencies [f1e8828c8]
- Updated dependencies [304e23318]
- Updated dependencies [a5d986477]
- @tinacms/toolkit@1.7.10
- 495108725: Disable tina cloud specific calls when using custom content api
- b0eba5d49: Upgrade prism react renderer, allow for theming
- Updated dependencies [d73d03f8f]
- Updated dependencies [745e30708]
- Updated dependencies [495108725]
- Updated dependencies [7d6e6ff3d]
- Updated dependencies [808d5cc6c]
- @tinacms/toolkit@1.7.9
- @tinacms/search@1.0.4
- Updated dependencies [f6efd498e]
- @tinacms/toolkit@1.7.8
- c7fa6ddc0: Add dev-tools export to make it easy to see Tina data when building a page
- 6e192cc38: Improve type signature for tinaField so potentially null fields don't show a Typescript error
- 5aaae9902: Clear the search state when switching between collections
- Updated dependencies [fe13b4ed9]
- Updated dependencies [812df6ace]
- Updated dependencies [8710dec4b]
- @tinacms/schema-tools@1.4.7
- @tinacms/search@1.0.3
- @tinacms/toolkit@1.7.7
- Updated dependencies [ee9acb5e5]
- Updated dependencies [a94e123b6]
- @tinacms/search@1.0.2
- @tinacms/schema-tools@1.4.6
- @tinacms/toolkit@1.7.6
- c385b5615: Initial implementation of search functionality
- d2ddfa5a6: Remove type: module from TinaCMS package
- 9489d5d47: Add
{type: "module"}
to tinacms package - Updated dependencies [c385b5615]
- @tinacms/schema-tools@1.4.5
- @tinacms/toolkit@1.7.5
- @tinacms/search@1.0.1
- Updated dependencies [cc621f665]
- @tinacms/toolkit@1.7.4
- 385c8a865: Update Media Manager to sync media from Cloud dashboard
- ccd928bc3: Fix to decode the folder name from the url
- Updated dependencies [70c74bb55]
- Updated dependencies [385c8a865]
- Updated dependencies [1aea2c6a4]
- @tinacms/toolkit@1.7.3
-
5a6018916: Add support for "quick editing". By adding the
[data-tina-field]
attribute to your elements, editors can click to see the correct form and field focused in the sidebar.This work closely resembles the "Active Feild Indicator" feature. Which will be phased in out place of this in the future. Note that the attribute name is different,
[data-tinafield]
is the value for the "Active Field Indicator" while[data-tina-field]
is the new attribute.The
tinaField
helper function should now only be used with the[data-tina-field]
attibute.Adds experimental support for Vercel previews, the
useVisualEditing
hook from@tinacms/vercel-previews
can be used to activate edit mode and listen for Vercel edit events. -
Updated dependencies [63dd98904]
-
Updated dependencies [b3d98d159]
-
Updated dependencies [7f95c1ce5]
- @tinacms/toolkit@1.7.2
- Updated dependencies [beb179279]
- @tinacms/schema-tools@1.4.4
- f6e2ec5e9: fix issue with single document naviation
- 3532d07f3: fix issue where a user was unable to create a document with templates
- 6d1465fd8: Fix auto navigate logic in GetCollection to only be active for Documents and not Folders
- e7f4c0a96: Fix issue where sortFields are undefined
- ff8673515: Trim whitespace from readonly token to ignore any accidental whitespace from cut and paste
- 790b1e1ae: Fix issue where contextual editing was not working for singleton collection
- eba7e5e5e: Simplify formify logic
- Updated dependencies [eba7e5e5e]
- @tinacms/toolkit@1.7.1
- eeedcfd30: Adds folder support in the admin. See this PR for more info and a demo.
- 675c4cfde: Fixes this type issue
- 40dd5b7ef: Show a simple message to editors to alert them to the fact that sorting by a non-required field can exclude some documents. The message will only appear when an editor actually runs a sort using a non-required field. The original issue issue is visible in this video: https://www.loom.com/share/244853da315e4f959ebf371d662192dd
- 0f90e9520: Fix routing issues with the folder update.
- Back button goes back to the folder you were in
- Admin navigation works as expected
- d9d773a24: feat: Add ability to duplicate documents
- 63454fa1e: Fix: do not set Authorization header if token not present
- Updated dependencies [f14f59a96]
- Updated dependencies [eeedcfd30]
- Updated dependencies [804639965]
- @tinacms/schema-tools@1.4.3
- @tinacms/toolkit@1.7.0
- 709b6f2ec: Fix template menu UI, image delete button
- Updated dependencies [709b6f2ec]
- @tinacms/toolkit@1.6.4
- 75d5ed359: Add html tag back into rich-text response
- 7c750e370: Fix the initialization of sort order in collection list when previous desc sort order in local storage
- Updated dependencies [2a32a0b99]
- Updated dependencies [6f491f38c]
- @tinacms/toolkit@1.6.3
- 1370ebae6: Update branching refresh logic to not refresh when a new branch is created. Instead it will be added to the list of branches in memory
- Updated dependencies [1370ebae6]
- @tinacms/toolkit@1.6.2
-
0626ba381: If you have a collection with
ui: { allowedActions: { create: false, delete: false, } },
and it only contains one document. Instead of navigating to the collection list page it will navigate to the document edit page.
-
Updated dependencies [a70204500]
- @tinacms/schema-tools@1.4.2
- 9a8074889: Consolidate payload transform logic
- d0c4801b7: cancel index polling when component is unmounted
- Updated dependencies [9a8074889]
- Updated dependencies [d0c4801b7]
- Updated dependencies [c48326846]
- @tinacms/schema-tools@1.4.1
- @tinacms/toolkit@1.6.1
- 76c984bcc: Use new API endpoint in content api reqests
- 202cd714d: Internal updates to the CLI
- Updated dependencies [084a39d2c]
- Updated dependencies [76c984bcc]
- Updated dependencies [5809796cf]
- Updated dependencies [785748400]
- Updated dependencies [54aac9017]
- @tinacms/toolkit@1.6.0
- @tinacms/schema-tools@1.4.0
- @tinacms/sharedctx@1.0.1
- Updated dependencies [973e83f1f]
- Updated dependencies [d1cf65999]
- @tinacms/toolkit@1.5.2
- @tinacms/schema-tools@1.3.4
- Updated dependencies [f07d8f165]
- @tinacms/toolkit@1.5.1
- Updated dependencies [ee4543ea5]
- Updated dependencies [817b10b8a]
- Updated dependencies [743246851]
- @tinacms/toolkit@1.5.0
- @tinacms/schema-tools@1.3.3
- @tinacms/sharedctx@1.0.1
- 4cd5cd4f7: Refactor: Remove previewSrc from imageAPI
- 964a6985b: Remove warning about TinaProvider
- 9c277e179: fix: make rich text errors scrollable
- 8d5c923c7: fix: When current branch doesn't exist, handle error more gracefully
- Updated dependencies [be3eac32f]
- Updated dependencies [4cd5cd4f7]
- Updated dependencies [9cf869d40]
- Updated dependencies [0a5297800]
- Updated dependencies [9c277e179]
- Updated dependencies [7a3e86ba1]
- Updated dependencies [8d5c923c7]
- Updated dependencies [353899de1]
- Updated dependencies [01b858e41]
- Updated dependencies [0b7687424]
- @tinacms/toolkit@1.4.0
- @tinacms/schema-tools@1.3.3
- @tinacms/sharedctx@1.0.1
-
0e6093a8d: Fixes branch switcher accessed from the branch banner, adds indexing status to branch list, improves UI clarity.
-
9d38f4b78: Only redirect to preview if the user is using a router.
See this video for more details.
-
b984f1a7c: Fixes the error when a user clears the date filter input
-
071b8fe59: remove schema info log when schema in up to date
-
c97ffc20d: Add schema checks to ensure the local and server schema are the same.
-
Updated dependencies [0e6093a8d]
-
Updated dependencies [892b4e39e]
-
Updated dependencies [c97ffc20d]
- @tinacms/toolkit@1.3.4
- @tinacms/schema-tools@1.3.2
- bb7f00db1: Fix issue where collections would not refresh if you chose the "None" filter after selecting a filter
- 42536f6e2: Groups filter inputs in a form so pressing 'enter' will filter the collection list
- 5d024e4f1: Add branch banner to sidebar and admin
- Updated dependencies [f1f3938d9]
- Updated dependencies [e732906b6]
- Updated dependencies [5d024e4f1]
- @tinacms/toolkit@1.3.3
- @tinacms/schema-tools@1.3.1
- efd56e769: Replace Store with AbstractLevel in Database. Update CLI to allow user to configure Database.
- efd56e769: Remove license headers
- 50f86caed: Adds filtering to the admin IU
- Updated dependencies [efd56e769]
- Updated dependencies [efd56e769]
- Updated dependencies [50f86caed]
- @tinacms/schema-tools@1.3.0
- @tinacms/sharedctx@1.0.1
- @tinacms/toolkit@1.3.2
- Updated dependencies [09e716538]
- @tinacms/toolkit@1.3.1
- Updated dependencies [84fe97ca7]
- Updated dependencies [b4facb6ca]
- Updated dependencies [e7c404bcf]
- Updated dependencies [e8776aa59]
- Updated dependencies [e019a200a]
- @tinacms/schema-tools@1.2.1
- @tinacms/toolkit@1.3.0
- Updated dependencies [c627ebe92]
- Updated dependencies [7d41435df]
- Updated dependencies [3165f397d]
- Updated dependencies [ef7c4043a]
- Updated dependencies [b2952a298]
- @tinacms/toolkit@1.2.1
- @tinacms/schema-tools@1.2.0
- @tinacms/sharedctx@1.0.0
- cd82190fb: Adding warning for billing
- Updated dependencies [7554ea362]
- Updated dependencies [a8c2f674b]
- Updated dependencies [cd82190fb]
- Updated dependencies [4ebc44068]
- @tinacms/schema-tools@1.1.0
- @tinacms/toolkit@1.2.0
- 7495f032b: Added
onLogout
hook function and a logout redirect page in the admin - 64599e300: Enable custom component for lic in TinaMarkdown
- de693ea17: remove network request for redundant collection fetch
- Updated dependencies [7495f032b]
- Updated dependencies [de37c9eff]
- Updated dependencies [de693ea17]
- @tinacms/schema-tools@1.0.3
- @tinacms/toolkit@1.1.1
- 11b32f712: Enable custom component for text in TinaMarkdown
-
c1ac4bf10: Added a
onLogin
Callback function that is called when the user logs in.EX:
import { defineConfig } from 'tinacms' export default defineConfig({ admin: { auth: { onLogin: () => { console.log('On Log in!') }, }, }, /// ... })
-
Updated dependencies [5a1e6faaf]
-
Updated dependencies [c91bc0fc9]
-
Updated dependencies [7c1425a82]
-
Updated dependencies [c1ac4bf10]
- @tinacms/toolkit@1.1.0
- @tinacms/schema-tools@1.0.2
- 93234705a: Better user experience when the document creation fails due to existing filename
- Updated dependencies [8a92941bb]
- Updated dependencies [08e02ec21]
- Updated dependencies [03d83633b]
- Updated dependencies [93234705a]
- Updated dependencies [55ab9c26c]
- @tinacms/toolkit@1.0.1
- @tinacms/schema-tools@1.0.1
-
958d10c82: Tina 1.0 Release
Make sure you have updated to th "iframe" path: https://tina.io/blog/upgrading-to-iframe/
- Updated dependencies [958d10c82]
- @tinacms/schema-tools@1.0.0
- @tinacms/sharedctx@1.0.0
- @tinacms/toolkit@1.0.0
-
a5d6722c7: Adds the ability to hide the delete and create buttons.
EX,
export default defineConfig({ collections: [ { label: 'Global', name: 'global', path: 'content/global', ui: { global: true, allowedActions: { create: false, delete: false, }, }, format: 'json', fields: [ //... ], }, ], })
-
Updated dependencies [a5d6722c7]
- @tinacms/schema-tools@0.2.2
- 6c93834a2: Update config and schema types
- b12957885: Nest
defaultItem
under UI - Updated dependencies [6c93834a2]
- @tinacms/schema-tools@0.2.1
- 774abcf9c: -
staticConfig
becomesdefineConfig
defineConfig
becomesdefineLegacyConfig
- Deprecate
config
property in the schema
- 2e0a98d61: Improve types on TinaMarkdown
- f7d3cf532: Add useEditState hook
- c3f307f46: Add deprecation warnings on pre-iframe apis
- 0ead00fa8: Fix warning about missing "encoding" dependency
- 8f28bfbd5: Fix the option labels
- Updated dependencies [774abcf9c]
- Updated dependencies [245a65dfe]
- Updated dependencies [7dda334e5]
- @tinacms/schema-tools@0.2.0
- @tinacms/toolkit@0.58.5
- Updated dependencies [6ce6085e8]
- @tinacms/toolkit@0.58.4
- Updated dependencies [48de42bc0]
- @tinacms/toolkit@0.58.3
- 97f0b6472: Add raw editor support for static mode. Use
~
for preview path. - Updated dependencies [194123d26]
- @tinacms/toolkit@0.58.2
- c4f9607ce: Add validation to schema
- Updated dependencies [c4f9607ce]
- @tinacms/schema-tools@0.1.9
- 31a2fefed: Fix text truncation in list and modal
- 009fe3180: Re-export helper utilities from @tinacms/schema-tools
- Updated dependencies [31a2fefed]
- @tinacms/toolkit@0.58.1
- @tinacms/schema-tools@0.1.8
- @tinacms/sharedctx@0.1.3
- 2422e505d: Removed styled-components as a dependency in tinacms. Removed deprecated react-toolbar in @tinacms/toolkit.
- Updated dependencies [2422e505d]
- Updated dependencies [431d73980]
- @tinacms/toolkit@0.58.0
- @tinacms/schema-tools@0.1.8
- @tinacms/sharedctx@0.1.3
- Updated dependencies [005e1d699]
- Updated dependencies [46bc9c4e5]
- @tinacms/schema-tools@0.1.8
- @tinacms/toolkit@0.57.12
- 0c8c571d5: Custom filename field component, fix text field classes
- Updated dependencies [b1a357f60]
- Updated dependencies [0c8c571d5]
- @tinacms/schema-tools@0.1.7
- @tinacms/toolkit@0.57.11
- c6e3bd321: Fix issue where slugify function breaks templates
- Updated dependencies [c6e3bd321]
- Updated dependencies [a60d96862]
- @tinacms/schema-tools@0.1.6
- @tinacms/toolkit@0.57.10
- ea4a8e1b0: Fixed issue where filename would not always update.
-
183249b11: - deprecate:
defaultValue
- add
defaultItem
to the collection (as a function or an object)
defaultItem: () => { const m = new Date() return { title: 'New Page', test: 'This is a default value of the test field', filename: `new-page-${ m.getUTCFullYear() + '-' + (m.getUTCMonth() + 1) + '-' + m.getUTCDate() }`, } },
- Allow
datetime
field to be undefined or empty
- add
-
8060d0949: Provide filename customization API.
name: 'posts', path: 'content/posts', ui: { filename: { slugify: (values) => mySlugifyFunc(values), disabled: true // other field props like `label`, `component`, `parse` can still be used too } },
If one is using
isTitle
a default slugify function is added that slugifys the title. -
Updated dependencies [183249b11]
-
Updated dependencies [8060d0949]
- @tinacms/schema-tools@0.1.5
- @tinacms/toolkit@0.57.9
- Updated dependencies [eeab510d9]
- @tinacms/toolkit@0.57.8
- Updated dependencies [4dc971b95]
- @tinacms/toolkit@0.57.7
- Updated dependencies [566386f30]
- @tinacms/toolkit@0.57.6
- 0513ae416: Increase defualt file limit from 10 to 50
- 64c40e6fc: change hardcoded content api url to be dynamic
- f3439ea35: Replace loading message and hide forms while loading.
- 48032e2ba: Use tinaio url config override in the client
- 112b7271d: fix vulnerabilities
- 8688dbff9: Add links to Tina Cloud project setting from sidebar
- Updated dependencies [4b9a2252f]
- Updated dependencies [f581f263d]
- Updated dependencies [4e0a609cd]
- Updated dependencies [fd90b7f49]
- Updated dependencies [7ae1b0697]
- Updated dependencies [ee354c708]
- Updated dependencies [f3439ea35]
- Updated dependencies [48032e2ba]
- Updated dependencies [112b7271d]
- Updated dependencies [4efe31214]
- Updated dependencies [8688dbff9]
- @tinacms/toolkit@0.57.5
- @tinacms/schema-tools@0.1.4
- @tinacms/sharedctx@0.1.3
-
9183157c4: This allows us to use a leaner
define
function for the standalone config. Right now we're balancing a lot on thedefineSchema/defineConfig
types and have a few overlapping things likeclient
, which accepts both an optional object withreferenceDepth
config as well as the autogenerated http client.One thing it does that's a bit different is it uses the
apiUrl
from the client generation function and sends it through as a global constant to the Vite app, this avoids the need for the generatedclient
. -
4adf12619: Add support for experimental iframe mode
-
Updated dependencies [9183157c4]
-
Updated dependencies [4adf12619]
-
Updated dependencies [f8b89379c]
- @tinacms/schema-tools@0.1.3
- @tinacms/toolkit@0.57.4
- Updated dependencies [777b1e08a]
- @tinacms/schema-tools@0.1.2
-
bf89a3720: allow boolean fields in admin collection list sort control
-
fd4d8c8ff: Add
router
property on collections. This replaces the need for using the RouteMapper plugin.... name: 'post', path: 'posts', ui: { router: ({ document }) => { // eg. post items can be previewed at posts/hello-world return `/posts/${document._sys.filename}`; }, }, ...
Add
global
property on collections. This replaces the need forformifyCallback
in most cases... name: 'post', path: 'posts', ui: { global: true }, ...
-
e650bc571: User interface for synchronization log event display
-
Updated dependencies [59ff1bb10]
-
Updated dependencies [232ae6d52]
-
Updated dependencies [1dd9d01e2]
-
Updated dependencies [fd4d8c8ff]
-
Updated dependencies [54dd48115]
-
Updated dependencies [e650bc571]
-
Updated dependencies [9e5da3103]
- @tinacms/schema-tools@0.1.1
- @tinacms/toolkit@0.57.3
- 5029265ed: Fixes an issue where collections which used
templates
would error on the admin list page due to the recent addition of filters. Filters will only work for collections withfields
at this time - 2b60a7bd8: Fix handling of formify for template collections when
...on Document
is used
- 0ad8075aa: Errors are now blocking modals.
- Updated dependencies [0ad8075aa]
- @tinacms/toolkit@0.57.2
- b369d7238: Update dependencies to fix vulnerabilities in external packages.
- 541605aa8: Fix list page breaking for templates on collection
- 2182dc2a6: Allow paths to start with numeric characters
- Updated dependencies [b369d7238]
- @tinacms/toolkit@0.57.1
- 9ea28113e: Fixes an issue where
collections
withtemplates
weren't generating forms in the sidebar
-
7b0dda55e: Updates to the
rich-text
component as well the shape of therich-text
field response from the API- Adds support for isTitle on MDX elements
- Fixes issues related to nested marks
- Uses monaco editor for code blocks
- Improves styling of nested list items
- Improves handling of rich-text during reset
- No longer errors on unrecognized JSX/html, instead falls back to print
No component provided for <compnonent name>
- No longer errors on markdown parsing errors, instead falls back to rendering markdown as a string, customizable via the TinaMarkdown component (invalid_markdown prop)
- Prepares rich-text component for raw mode - where you can edit the raw markdown directly in the Tina form. This will be available in future release.
-
8183b638c: ## Adds a new "Static" build option.
This new option will build tina into a static
index.html
file. This will allow someone to use tina without having react as a dependency.- Add a
.tina/config.{js,ts,tsx,jsx}
with the default export of define config.
// .tina/config.ts import schema from './schema' export default defineConfig({ schema: schema, //.. Everything from define config in `schema.ts` //.. Everything from `schema.config` })
- Add Build config
.tina/config.ts export default defineConfig({ build: { outputFolder: "admin", publicFolder: "public", }, //... other config })
- Go to
http://localhost:3000/admin/index.html
and view the admin
- Add a
-
Updated dependencies [7b0dda55e]
-
Updated dependencies [8183b638c]
- @tinacms/schema-tools@0.1.0
- @tinacms/toolkit@0.57.0
- @tinacms/sharedctx@0.1.2
- 028e10686: Adding sorting in the CMS
- Updated dependencies [028e10686]
- @tinacms/toolkit@0.56.37
- 329b72e7a: fix types in createClient
- ef94f2b59: BREAKING CHANGE: Deprecate dated defineConfig use:
- clientId & branch should instead be passed to defineSchema.
- defineConfig now needs to take in the client. See tina.io for upgrade details: https://tina.io/blog/tina-v-0.69.0
- 7334ec5be: Client now throws an error when a non 200 status code is returned.
- Updated dependencies [870a32f18]
- Updated dependencies [090a5b995]
- Updated dependencies [660247b6b]
- @tinacms/schema-tools@0.0.9
- @tinacms/toolkit@0.56.36
- b0dfc6205: Fixed bug where objects where not being copied
- Updated dependencies [b0dfc6205]
- @tinacms/schema-tools@0.0.8
- 7d87eb6b7: Add
loadCustomStore
to top schema config - 67e291e56: Add support for ES modules
- f3c6b0f36: Fix an issue where changes to a field weren't reflected on the page when typing quickly
- 7a45e4e12: Added a media sync button that adds new media to tina-cloud. This button only appears when you are not in local mode and have the new media store enable
- Updated dependencies [7d87eb6b7]
- Updated dependencies [67e291e56]
- Updated dependencies [7a45e4e12]
- Updated dependencies [ae23e9ad6]
- Updated dependencies [489be9cb1]
- @tinacms/schema-tools@0.0.7
- @tinacms/sharedctx@0.1.2
- @tinacms/toolkit@0.56.35
- 42af73648: Adds more useful error messages from internalClient
- Updated dependencies [ea9c190e8]
- @tinacms/toolkit@0.56.34
- d95b73974: Fix collection list page delete modal
- 7b77fe1b5: Add a default TinaMediaStore for repo-based media
- Updated dependencies [2ef5a1f33]
- Updated dependencies [fb73fb355]
- Updated dependencies [7b77fe1b5]
- Updated dependencies [99a13024d]
- @tinacms/toolkit@0.56.33
- @tinacms/schema-tools@0.0.6
- @tinacms/sharedctx@0.1.1
All notable changes to tinacms/packages/tinacms
will be documented in this file.
Note: For root tinacms changes, please refer to the CHANGELOG.md specific to root tinacms
.
- 1f7d3ca3d: Use custom wrapper class for tailwind type plugin
- cceef726e: Fix login ui issue
- Updated dependencies [1f7d3ca3d]
- Updated dependencies [f6cb634c2]
- Updated dependencies [6c17f0160]
- Updated dependencies [cceef726e]
- @tinacms/toolkit@0.56.32
- @tinacms/schema-tools@0.0.5
- @tinacms/sharedctx@0.1.1
- 999f0895a: Set font family on heading elements
- 41be5e7fc: Fixes subitem links to use breadcrumbs
- Updated dependencies [999f0895a]
- @tinacms/toolkit@0.56.31
- aaaa5bb09: Added pagination to the CMS
- e06dbb3ca: Adds
waitForDB
cmd to cli - Updated dependencies [aaaa5bb09]
- @tinacms/toolkit@0.56.30
- 2cc206b1a: Improve mobile nav behaviour
- 8998df207: fix: update tina client with the current branch from local storage
- Updated dependencies [58a7a00f7]
- Updated dependencies [2cc206b1a]
- Updated dependencies [aaadefd2d]
- @tinacms/toolkit@0.56.29
- 646cad8da: Adds support for using the generated client on the frontend
- f857616f6: Rename sdk to queries
- 6e2ed31a2: Added
isTitle
property to the schema that allows the title to be displayed in the CMS - Updated dependencies [a196198bd]
- Updated dependencies [57a4a3789]
- Updated dependencies [6e2ed31a2]
- Updated dependencies [ba1499029]
- @tinacms/toolkit@0.56.28
- @tinacms/schema-tools@0.0.4
- 7372f90ca: Adds a new client that can be used on the backend and frontend.
- Updated dependencies [d4f98d0fc]
- Updated dependencies [7e2272442]
- @tinacms/toolkit@0.56.27
- 8b7ee346a: - Display label instead of name for mdx dropdown af306fa
- Fix issue where reset triggered chagnes to the wrong rich-text field 03f6191
- Fix issue where null children in a code block threw an error e454bce
- Updated dependencies [f6f56bcc0]
- Updated dependencies [59d33a74a]
- Updated dependencies [8b7ee346a]
- Updated dependencies [acb38bf9f]
- @tinacms/toolkit@0.56.26
- Updated dependencies [e90647da3]
- @tinacms/toolkit@0.56.25
- 41d666f9a: Styles list page overflow menu, removes unused prop
- e5a1152f2: Fix issue where pages that didnt use
useTina
would get a loading spinner that hangs - Updated dependencies [41d666f9a]
- @tinacms/toolkit@0.56.24
-
6a6f137ae: # Simplify GraphQL API
Previously the
.tina/schema.ts
was only used by the Tina CLI to generate the GraphQL API. However it's now required as a prop to<TinaCMS>
. This allows you to provide runtime logic in theui
property of field definitions. See the documentation on "Extending Tina" for examples.# old { getPostDocument(relativePath: $relativePath) { ... } } # new { post(relativePath: $relativePath) { ... } }
The use of the term
connection
is due to our adherence the the relay cursor spec. We may offer a simplified list field in a future release# old { getPostList { ... } } # new { postConnection { ... } }
# old { getCollection(collection: "post") {...} } { getCollections {...} } # new { collection(collection: "post") {...} } { collections {...} }
The
data
property was previously where all field definitions could be found. This has been moved on level up:# old { getPostDocument(relativePath: $relativePath) { data { title } } } # new { post(relativePath: $relativePath) { title } }
# old { getPostDocument(relativePath: $relativePath) { data { author { ... on AuthorDocument { data { name } } } } } } # new { post(relativePath: $relativePath) { author { ... on Author { name } } } }
Aside from
id
, other metadata is now underscored:# old { getPostDocument(relativePath: $relativePath) { sys { relativePath } values } } # new { post(relativePath: $relativePath) { _sys { relativePath } _values } }
This is identical to
_values
form
was used internally to generate forms for the given document, however that's now handled by providing yourschema
to<TinaCMS>
.It's no longer possible to query all documents at once, you can query for collection documents via the
collection
query:{ collection { documents { edges { node {...} } } } }
- Updated dependencies [6a6f137ae]
- @tinacms/toolkit@0.56.23
- 168f6cc6e: Update delete modal header
- 2a6060138: Fix url parsing issue when a branch name contained a
/
- 3af3d6787: Fix issues with finding the template for multitemplate collections
- Updated dependencies [bf5fe0074]
- @tinacms/toolkit@0.56.22
- Updated dependencies [d37562999]
- @tinacms/toolkit@0.56.21
- 40afac061: updated @headlessui/react
- Updated dependencies [40afac061]
- @tinacms/toolkit@0.56.20
- 921709a7e: Adds validation to the schema instead of only using typescript types
- 3e2d9e43a: Adds new GraphQL
deleteDocument
mutation and logic - Updated dependencies [921709a7e]
- @tinacms/schema-tools@0.0.3
-
86651039b: Updates to the way forms are generated in contextual editing. This lays the groundwork for future updates but doesn't offer new behavior yet. It does come with a small breaking change:
[BREAKING]: The
id
of forms is now the actual documentpath
. Previously this was the name of the GraphQL query node (eg.getPostDocument
). If you're using theformifyCallback
prop to create global forms, you'll probably need to update the callback to check for the appropriate id.Eg.
formConfig.id === 'getSiteNavsDocument'
should be something likeformConfig.id === 'content/navs/mynav.md'
If you're experiencing any issues with contextual editing, you can disable this flag for now by specifying
cms.flags.set('use-unstable-formify', false)
.
-
39a8c4f7d: Fix issue with unstableFormify where
Document
interface fields were not being formified properly -
ec28a129b: Update to tina admin to use the frontend schema
-
a28b787c5: With the rich-text editor, inserting a soft-break (
shift+enter
), this will now result in a<br>
tag being inserted. Note that this will save the markdown with a backslash to indicate line break (instead of multiple empty spaces):123 Abc St\ Charlottetown, PEI
-
93363dfc2: Prevent error on reset when nested blocks have changed in unstable formify hook
-
abf25c673: The schema can now to used on the frontend (optional for now but will be the main path moving forward).
If you gone though the
tinacms init
process there should be a file called.tina/components/TinaProvider
. In that file you can import the schema fromschema.ts
and add it to the TinaCMS wrapper component.import TinaCMS from 'tinacms' import schema, { tinaConfig } from '../schema.ts' // Importing the TinaProvider directly into your page will cause Tina to be added to the production bundle. // Instead, import the tina/provider/index default export to have it dynamially imported in edit-moode /** * * @private Do not import this directly, please import the dynamic provider instead */ const TinaProvider = ({ children }) => { return ( <TinaCMS {...tinaConfig} schema={schema}> {children} </TinaCMS> ) } export default TinaProvider
-
591640db0: Fixes a bug with
breadcrumbs
to account for subfolders (instead of just thefilename
) and allows Documents to be created and updated within subfolders.Before this fix,
breadcrumbs
was only thebasename
of the file minus theextension
. Somy-folder-a/my-folder-b/my-file.md
would havebreadcrumbs
of['my-file']
. With this change,breadcrumbs
will be['my-folder-a','my-folder-b','my-file']
(leaving out thecontent/<collection>
). -
875779ac6: Don't attempt to formify nodes which don't have data fields (ie. ...on Node)
-
e8b0de1f7: Add
parentTypename
to fields to allow us to disambiguate between fields which have the same field names but different types. Example, an event from field name ofblocks.0.title
could belong to aCta
block or aHero
block, both of which have atitle
field. -
Updated dependencies [429d8e93e]
-
Updated dependencies [6c517b5da]
-
Updated dependencies [e81cf8867]
-
Updated dependencies [abf25c673]
-
Updated dependencies [801f39f62]
-
Updated dependencies [0e270d878]
-
Updated dependencies [e8b0de1f7]
- @tinacms/sharedctx@0.1.1
- @tinacms/toolkit@0.56.19
- @tinacms/schema-tools@0.0.2
-
91d5a6073: Allow "." in file names
-
11d55f441: Add experimental useGraphQLForms hook
-
f41bd62ea: Ensure client-side Tina code only runs on the browser. Without this check, we'd see a server/client mismatch like:
warning.js:33 Warning: Expected server HTML to contain a matching <div> in <body>.
-
Updated dependencies [e9a0c82cf]
-
Updated dependencies [d4fdeaa9f]
-
Updated dependencies [ed85f2594]
-
Updated dependencies [d86e515ba]
-
Updated dependencies [db0dab1d4]
- @tinacms/toolkit@0.56.18
- 4923a2d66: Checks isAuthenticated() before making requests to the GraphQL client
- Updated dependencies [106549814]
- Updated dependencies [4923a2d66]
- Updated dependencies [a07ff39bb]
- @tinacms/toolkit@0.56.17
- bfada9a09: Used success messaging when creating/updating a Document in the CMS
- becff2a0b: Adds define schema to the
tinacms
package (instead of@tinacms/cli
. This is done in preparation of the extending tina work) - ae1a5a58f: Sets
tina-admin
to default totrue
- 3ed4c8727: Add flag for experimental new formify logic
- 5535a9970: Switches to using HashRouter for Admin
- 3ff1de06a: Upgrade to Tailwind 3
- fbdb7be01: Adds a defineConfig function to allow type hints for the tinacms config
- 24f8b057f: Handles errors better in the CMS
- Updated dependencies [ae1a5a58f]
- Updated dependencies [5535a9970]
- Updated dependencies [3ff1de06a]
- Updated dependencies [022ccd389]
- Updated dependencies [24f8b057f]
- @tinacms/toolkit@0.56.16
- @tinacms/sharedctx@0.1.0
- 43c834565: Adds an activity indicator throughout Admin
- 53a4550db: Allows RouteMapping to be dynamically imported
- 731451bee: Adjust the JWT token refresh logic to refresh tokens before they expire.
- e102d7438: Updated auth modal to use toolkit button components
- Updated dependencies [43c834565]
- @tinacms/toolkit@0.56.15
- cc5c8431d: Remove console.log
- Updated dependencies [af9f6c2c2]
- Updated dependencies [2e14cda5e]
- Updated dependencies [3d4c52a19]
- @tinacms/toolkit@0.56.14
- Updated dependencies [e41b709ce]
- @tinacms/toolkit@0.56.13
- 102628c7f: Fixes admin page wrapper scrolling
- 55cb0c5ec: Updates the relativePath field for clarity
- 9e77273d2: use collection name as fallback for label
- Updated dependencies [8c18edd5c]
- Updated dependencies [0773f6486]
- Updated dependencies [d8cd60f65]
- Updated dependencies [9e77273d2]
- Updated dependencies [63a74aece]
- @tinacms/toolkit@0.56.12
- 3bba1817d: Integrates Chrome Components with TinaAdmin
- Updated dependencies [3bba1817d]
- Updated dependencies [415c03d25]
- @tinacms/toolkit@0.56.11
- @tinacms/sharedctx@0.1.0
- d6f46a9f9: fix: When passing in queries into the root TinaCMS container, don't overwrite the data prop on an empty query
- Updated dependencies [37286858e]
- @tinacms/toolkit@0.56.10
- 0c4456c11: fix: Send update to useTina hook on the initial isLoading change
- a9b385b01: Fix mutation string for document creation
- 68284198a: fix: use user-specific document creator callback
- ccf4dcbd4: chore: Export low-level data provider from "tinacms", for the playground and other sandboz environments
- f2431c031: Fix type for code_block TinaMarkdown element
- 792f47251: useTina hook for page-level form registration
- 6a50a1368: Updates the look and feel of the Tina Sidebar
- 239382619: Introduces TinaAdminApi and consolidates types
- Updated dependencies [8ad8f03fd]
- Updated dependencies [6a50a1368]
- Updated dependencies [792f47251]
- @tinacms/toolkit@0.56.9
- @tinacms/sharedctx@0.1.0
- Updated dependencies [7006b38ea]
- @tinacms/toolkit@0.56.8
- 28010a026: Adds tailwind styles to Admin Layout
- Updated dependencies [e8ca82899]
- @tinacms/toolkit@0.56.7
-
4a3990c7e: Cloudinary media store now serves images over
https
by default. This can now be configured though the handler provided.To revert to the old behavior:
export default createMediaHandler( { // ... }, { useHttps: false, } )
The default for
useHttps
istrue
-
3897ec5d9: Replace
branch
,clientId
,isLocalClient
props with singleapiURL
. When working locally, this should behttp://localhost:4001/graphql
. For Tina Cloud, usehttps://content.tinajs.io/content/<my-client-id>/github/<my-branch>
// _app.tsx // ... <TinaCMS apiURL={process.env.NEXT_PUBLIC_TINA_API_URL} {...pageProps}> {(livePageProps) => <Component {...livePageProps} />} </TinaCMS>
DEPRECATION NOTICE:
branch
,clientId
,isLocalClient
props will be deprecated in the future
- 96e4a77e2: Fixed types
- b5c22503a: Changes messaging on login page for TinaAdmin when in local-mode
- Updated dependencies [60f939f34]
- @tinacms/toolkit@0.56.6
- 70da62fe8: deprecated the use of
getStaticPropsForTina
- 0afa75df1: 2342 - [TinaAdmin] Truncates the
filename
column for the Document List View - 7dafce89d: Fixed issue where content creator was invalid
- 3de8c6165: Enabled branch creation in branch switcher
- fee183f8f: add "switch to default branch" recover option to error boundary
- 5c070a83f: feat: Add UI banner for when in localMode
- Updated dependencies [ddf81a4fd]
- Updated dependencies [20260a82d]
- Updated dependencies [0370147fb]
- Updated dependencies [3de8c6165]
- Updated dependencies [2eaad97bf]
- Updated dependencies [5c070a83f]
- @tinacms/toolkit@0.56.5
- Updated dependencies [2c7718636]
- @tinacms/toolkit@0.56.4
- 229feda1d: add .nvmrc file for setting preferred node version
- 4adaf15af: Fix types which weren't included in previous patch
- 816271d03: Ensure login/logout pages work when admin flag is disabled
- Updated dependencies [4700d7ae4]
- @tinacms/toolkit@0.56.3
- 75974d0a4: Updates the tina cloud client to do id_token & access_token refreshes when needed
- 88c209b45: Throw when Tina Cloud responds with non 200 code
- dcdf1ecf0: Updates
react-router
tov6
forTinaAdmin
- 47d126029: Fix support of objects in a list for MDX templates
- Updated dependencies [bc4699d2b]
- @tinacms/toolkit@0.56.2
- ed9d48abc: Swaps starter's old admin for the new one
- f6876d30f: Alter empty sidebar message to be more specific to auto-generating logic
- Updated dependencies [f6876d30f]
- Updated dependencies [92268fc85]
- @tinacms/toolkit@0.56.1
- df3030990: Add basic branch switcher
- 9ecceb59f: Always include
collection
for TinaAdmincreateDocument()
andupdateDocument()
- Updated dependencies [df3030990]
- @tinacms/toolkit@0.56.0
- e6995cfcb: Adds README for TinaAdmin
- 60729f60c: Adds a
reference
field - 19e02829f: Add ability to control plugin layout for global plugins from formify
- Updated dependencies [60729f60c]
- @tinacms/toolkit@0.55.4
- d1ed404ba: Add support for auto-generated SDK for type-safe data fetching
- 138ceb8c4: Clean up dependencies
- 0417e3750: Adds RouteMapperPlugin and FormMetaPlugin
- Updated dependencies [138ceb8c4]
- Updated dependencies [0417e3750]
- Updated dependencies [d9f37ea7e]
- @tinacms/toolkit@0.55.3
- 4b7795612: Adds support for collection.templates to TinaAdmin
- a39ddc611: update media store to load only when in edit mode
- 1096fe3e4: Ensure forms unmount properly when
useGraphQLForms
unmounts
- Updated dependencies [2724c48c0]
- @tinacms/toolkit@0.55.2
- 7849c1233: Fix styles on panel
- 9c0d48e09: Fix console errors for mdx editor
- Updated dependencies [9c0d48e09]
- @tinacms/toolkit@0.55.1
- b99baebf1: Add rich-text editor based on mdx, bump React dependency requirement to 16.14
- 891623c7c: Adds support for List and Update to TinaAdmin
- d5e3adf37: Adds support for Log In & Log Out to TinaAdmin
- Updated dependencies [b99baebf1]
- @tinacms/toolkit@0.55.0
- 67df49220: Allow dashes in filenames for content creator
- Updated dependencies [b961c7417]
- @tinacms/toolkit@0.54.1
- 84a86358f: Fix bug which reset the form onChange for GraphQL forms
- a05aa61bd: Fix issue where forms weren't being removed when the page unmounted
- @tinacms/toolkit@0.54.0
- c6e2dd69a: Updated Wrapper component so that it can be build without loading the media store
- 3f9cad860: A warning message is added to warn the user if they are using a staticRequest at run time.
-
2908f8176: Fixes an issue where nested reference fields weren't updated properly when their values changed.
-
08ef183a0: Allow tina.io URLs to be supplied as a a prop:
<TinaEditProvider editMode={ <TinaCMS branch="main" clientId={NEXT_PUBLIC_TINA_CLIENT_ID} tinaioConfig={{ baseUrl: "some-base.io" }} //...
Or just the identity/content URLs:
<TinaEditProvider editMode={ <TinaCMS branch="main" clientId={NEXT_PUBLIC_TINA_CLIENT_ID} tinaioConfig={{ identityApiUrl: "https://some-base.io" // AND/OR contentApiUrl: "https://content.some-base.io" }} //...
-
Updated dependencies [9213d5608]
-
Updated dependencies [b59f23295]
-
Updated dependencies [a419056b6]
-
Updated dependencies [ded8dfbee]
-
Updated dependencies [5df9fe543]
-
Updated dependencies [9d68b058f]
-
Updated dependencies [91cebe5bc]
- @tinacms/toolkit@0.54.0
- Updated dependencies [7b149a4e7]
- Updated dependencies [906d72c50]
- @tinacms/toolkit@0.53.0
- 9b27192fe: Build packages with new scripting, which includes preliminary support for ES modules.
- Updated dependencies [9b27192fe]
- @tinacms/toolkit@0.52.3
- d0e896561: Provide better error boundary message and visual affordances to user in .
- 27c1fd382: Adds a close button to the Tina Cloud auth model so a user is not suck in edit mode.
- Updated dependencies [6b1cbf916]
- @tinacms/toolkit@0.52.2
- Updated dependencies [4de977f63]
- @tinacms/toolkit@0.52.1
- d1ef2545f: Ensure
undefined
values aren't passed back from getStaticPropsForTina
- Updated dependencies [b4f5e973f]
- @tinacms/toolkit@0.52.0
- 3af2c075c: Loading state now resets in useGraphqlForms
- 515fc3ffd: Don't treat cloud client with missing client-id as local client
- Updated dependencies [634524925]
- @tinacms/toolkit@0.51.0
- 1b8bb5d0f: fix: don't throw error on missing client id
- f863d8be8: Fixes an issue where new documents returned a 404 when on a hosted deployement. Instead,
getStaticPropsForTina
will catch and return an empty object for the data key. This allows us to replace it with real data client-side.
- 8a20437c: Expose a createGlobalForm function in formifyCallback that creates a screen plugin
- d31df43d: Handles situations where
currentFields
is not an Array - 271a72d7: Use collection label (defined in schema.ts) as form label
- 6dfbfed0: Added variables to useGraphqlForms dependencies in order to update data when variables change
- Updated dependencies [e074d555]
- @tinacms/toolkit@0.50.1
- 3f05aad1: Fix race condition where
values
was taking longer to update in React state, making the data syncing run too early - 76e3a8a7: Properly uses formifyCallback and documentCreatorCallback
-
7f3c8c1a: # 🔧 Changes coming to TinaCMS ⚙️
👋 You may have noticed we've been hard at-work lately building out a more opinionated approach to TinaCMS. To that end, we've settled around a few key points we'd like to announce. To see the work in progress, check out the main branch, which will become the primary branch soon.
By nature, Tina relies heavily on React context, and the dependency mismatches from over-modularizing our toolkit has led to many bugs related to missing context. To fix this, we'll be consolidating nearly every package in the @tinacms scope to a single package called
@tinacms/toolkit
We'll also be rolling out esm support as it's now much easier to address build improvements
The
tinacms
package now comes baked-in with APIs for working with the TinaCMS GraphQL API. Because@tinacms/toolkit
now encompasses everything you'd need to build your own CMS integration, we're repurposing thetinacms
package to more accurately reflect the "batteries-included" approach.If you haven't been introduced, the GraphQL API is a Git-backed CMS which we'll be leaning into more in the future. With a generous free tier and direct syncing with Github its something we're really excited to push forward. Sign up for free here Note: tinacms still exports the same APIs, but we'll gradually start moving the backend-agnostic tools to @tinacms/toolkit.
The tina-graphql-gateway repo will be absorbed into this one. If you've been working with our GraphQL APIs you'll need to follow our migration guide.
We've had success with Yarn 2 and PNP in other monorepos, if you're a contributor you'll notice some updates to the DX, which should hopefully result in a smoother experience.
The
@tinacms/toolkit
isn't going anywhere. And if you're using packages likereact-tinacms-strapi
or react-tinacms-github
with success, that won't change much, they'll just be powered by@tinacms/toolkit
under the hood.We'll be bumping all packages to
0.50.0
to reflect the changes. If you're using @tincams scoped packages those won't receive the upgrade. Unscoped packages likereact-tinacms-editor
will be upgraded, and should be bumped to 0.50.0 as well. When we move to1.0.0
we'll be pushing internal APIs to@tinacms/toolkit
, so that's the long-term location ofWe'll continue to make security patches, however major bug fixes will likely not see any updates. Keep in mind that
@tinacms/toolkit
will continue to be developed.
-
434d61d4: Use the default import from 'tinacms' to set up the Tina context:
// pages/_app.js import TinaCMS from 'tinacms' const App = ({ Component, pageProps }) => { return ( <TinaCMS // Required: The query from your `getStaticProps` request query={pageProps.query} // Required: The variables from your `getStaticProps` request variables={pageProps.variables} // Variables used in your query // Required: The data from your `getStaticProps` request data={pageProps.data} // Optional: Set to true when working with the local API isLocalClient={true} // Optional: When using Tina Cloud, specify the git branch branch="main" // Optional: Your identifier when connecting to Tina Cloud clientId="<some-id-from-tina-cloud>" // Optional: A callback for altering the CMS object if needed cmsCallback={(cms) => {}} // Optional: A callback for altering the form generation if needed formifyCallback={(args) => {}} // Optional: A callback for altering the document creator plugin documentCreatorCallback={(args) => {}} > {(livePageProps) => <Component {...livePageProps} />} </TinaCMS> ) } export default App
To load TinaCMS dynamically, use the EditState context:
// pages/_app.js import dynamic from 'next/dynamic' import { TinaEditProvider } from 'tinacms/dist/edit-state' const TinaCMS = dynamic(() => import('tinacms'), { ssr: false }) const App({ Component, pageProps }) { return ( <> <TinaEditProvider editMode={ <TinaCMS {...pageProps}> {livePageProps => <Component {...livePageProps} />} </TinaCMS> } > <Component {...pageProps} /> </TinaEditProvider> </> ) } export default App
-
Updated dependencies [7f3c8c1a]
- @tinacms/toolkit@0.44.0
-
ab4e388b: Updates where LoadingDots is imported from
-
7351d92f: # Define schema changes
We're going to be leaning on a more primitive concept of how types are defined with Tina, and in doing so will be introducing some breaking changes to the way schemas are defined. Read the detailed RFC discussion for more on this topic, specifically the latter portions of the discussion.
You can now provide
fields
instead oftemplates
for your collection, doing so will result in a more straightforward schema definition:{ collections: [ { name: 'post', label: 'Post', path: 'content/posts', fields: [ { name: 'title', label: 'Title', type: 'string', // read on below to learn more about _type_ changes }, ], // defining `fields` and `templates` would result in a compilation error }, ] }
Why?
Previously, a collection could define multiple templates, the ambiguity introduced with this feature meant that your documents needed a
_template
field on them so we'd know which one they belonged to. It also mean having to disambiguate your queries in graphql:getPostDocument(relativePage: $relativePath) { data { ...on Article_Doc_Data { title } } }
Going forward, if you use
fields
on a collection, you can omit the_template
key and simplify your query:getPostDocument(relativePage: $relativePath) { data { title } }
Types will look a little bit different, and are meant to reflect the lowest form of the shape they can represent. Moving forward, the
ui
field will represent the UI portion of what you might expect. For a blog post "description" field, you'd define it like this:{ type: "string", label: "Description", name: "description", }
By default
string
will use thetext
field, but you can change that by specifying thecomponent
:{ type: "string", label: "Description", name: "description", ui: { component: "textarea" } }
For the most part, the UI properties are added to the field and adhere to the existing capabilities of Tina's core field plugins. But there's nothing stopping you from providing your own components -- just be sure to register those with the CMS object on the frontend:
{ type: "string", label: "Description", name: "description", ui: { component: "myMapField" someAdditionalMapConfig: 'some-value' } }
Register your
myMapField
with Tina:cms.fields.add({ name: 'myMapField', Component: MapPicker, })
Every property in the
defineSchema
API must be serlializable. Meaning functions will not work. For example, there's no way to define avalidate
orparse
function at this level. However, you can either use the formify API to get access to the Tina form, or provide your own logic by specifying a plugin of your choice:{ type: "string", label: "Description", name: "description", ui: { component: "myText" } }
And then when you register the plugin, provide your custom logic here:
import { TextFieldPlugin } from 'tinacms' // ... cms.fields.add({ ...TextFieldPlugin, // spread existing text plugin name: 'myText', validate: (value) => { someValidationLogic(value) }, })
Why?
The reality is that under the hood this has made no difference to the backend, so we're removing it as a point of friction. Instead,
type
is the true definition of the field's shape, whileui
can be used for customizing the look and behavior of the field's UI.When working with GraphQL, there are 2 reasons a property may not be present.
- The data is not a required property. That is to say, if I have a blog post document, and "category" is an optional field, we'll need to make sure we factor that into how we render our page:
const MyPage = (props) => { return ( <> <h2>{props.getPostDocument.data.title}</h2> <MyCategoryComponent> {props.getPostDocument.data?.category} </MyCategoryComponent> </> ) }
- The query did not ask for that field:
{ getPostDocument { data { title } } }
But with Tina, there's a 3rd scenario: the document may be in an invalid state. Meaning, we could mark the field as
required
and query for the appropriate field, and still not have the expected shape of data. Due to the contextual nature of Tina, it's very common to be in an intermediate state, where your data is incomplete simply because you're still working on it. Most APIs would throw an error when a document is in an invalid state. Or, more likely, you couldn't even request it.Previously an listable field which wasn't defined in the document was treated as an emptry array. So for example:
--- title: 'Hello, World' categories: - sports - movies ---
The responsee would be
categories: ['sports', 'movies']
. If you omit the items, but kept the empty array:--- title: 'Hello, World' categories: [] ---
The responsee would be
categories: []
. If you omit the field entirely:--- title: 'Hello, World' ---
The response will be
categories: null
. Previously this would have been[]
, which was incorrect.It's possible for Tina's editing capabilities to introduce an invalid state during edits to list items. Imagine the scenario where you are iterating through an array of objects, and each object has a categories array on it we'd like to render:
const MyPage = (props) => { return props.blocks.map((block) => { return ( <> <h2>{block.categories.split(',')}</h2> </> ) }) }
For a new item,
categories
will be null, so we'll get an error. This only happens when you're editing your page with Tina, so it's not a production-facing issue.Previously, we had a
list
field, which allowed you to supply afield
property. Instead, every primitive type can be represented as a list:{ type: "string", label: "Categories", name: "categories", list: true }
Additionally, enumerable lists and selects are inferred from the
options
property. The following example is represented by aselect
field:{ type: "string", label: "Categories", name: "categories", options: ["fitness", "movies", "music"] }
While this, is a
checkbox
field{ type: "string", label: "Categories", name: "categories" list: true, options: ["fitness", "movies", "music"] }
Note we may introduce an
enum
type, but haven't discussed it thoroughlyTina currently represents the concept of an object in two ways: a
group
(andgroup-list
), which is a uniform collection of fields; andblocks
, which is a polymporphic collection. Moving forward, we'll be introducing a more comporehensive type, which envelopes the behavior of bothgroup
andblocks
, and since every field can be alist
, this also makesgroup-list
redundant.Note: we've previously assumed that
blocks
usage would always be as an array. We'll be keeping that assumption with theblocks
type for compatibility, butobject
will allow for non-array polymorphic objects.An
object
type takes either afields
ortemplates
property (just like thecollections
definition). If you supplyfields
, you'll end up with what is essentially agroup
item. And if you saylist: true
, you'll have what used to be agroup-list
definition.Likewise, if you supply a
templates
field andlist: true
, you'll get the same API asblocks
. However you can also saylist: false
(or omit it entirely), and you'll have a polymorphic object which is not an array.This is identical to the current
blocks
definition:{ type: "object", label: "Page Sections", name: "pageSections", list: true, templates: [{ label: "Hero", name: "hero", fields: [{ label: "Title", name: "title", type: "string" }] }] }
And here is one for
group
:{ type: "object", label: "Hero", name: "hero", fields: [{ label: "Title", name: "title", type: "string" }] }
You can now request
dataJSON
for the entire data object as a single query key. This is great for more tedius queries like theme files where including each item in the result is cumbersome.Note there is no typescript help for this feature for now
getThemeDocument(relativePath: $relativePath) { dataJSON }
{ "getThemeDocument": { "dataJSON": { "every": "field", "in": { "the": "document" }, "is": "returned" } } }
Previously, lists would return a simple array of items:
{ getPostsList { id } }
Which would result in:
{ "data": { "getPostsList": [ { "id": "content/posts/voteForPedro.md" } ] } }
In the new API, you'll need to step through
edges
&nodes
:{ getPostsList { edges { node { id } } } }
{ "data": { "getPostsList": { "edges": [ { "node": { "id": "content/posts/voteForPedro.md" } } ] } } }
Why?
The GraphQL connection spec opens up a more future-proof structure, allowing us to put more information in to the connection itself like how many results have been returned, and how to request the next page of data.
Read a detailed explanation of how the connection spec provides a richer set of capabilities.
Note: sorting and filtering is still not supported for list queries.
There is instead an
isBody
boolean which can be added to anystring
fieldWhy?
Since markdown files sort of have an implicit "body" to them, we were automatically populating a field which represented the body of your markdown file. This wasn't that useful, and kind of annoying. Instead, just attach
isBody
to the field which you want to represent your markdown "body":{ collections: [{ name: "post", label: "Post", path: "content/posts", fields: [ { name: "title", label: "Title", type: "string" } { name: "myBody", label: "My Body", type: "string", component: 'textarea', isBody: true } ] }] }
This would result in a form field called
My Body
getting saved to the body of your markdown file (if you're using markdown):--- title: Hello, World! --- This is the body of the file, it's edited through the "My Body" field in your form.
Instead of a
collection
property, you must now define acollections
field, which is an array:{ type: "reference", label: "Author", name: "author", collections: ["author"] }
{ getPostDocument(relativePath: "hello.md") { data { title author { ...on Author_Document { name } ...on Post_Document { title } } } }
Old API:
--- --- myBlocks: - template: hero title: Hello ---
New API:
--- --- myBlocks: - \_template: hero title: Hello ---
They now include the proper namespace to prevent naming collisions and no longer require
_Doc_Data
suffix. All generated__typename
properties are going to be slightly different. We weren't fully namespacing fields so it wasn't possible to guarantee that no collisions would occur. The pain felt here will likely be most seen when querying and filtering through blocks. This ensures the stability of this type in the future{ getPageDocument(relativePath: "home.md") { data { title myBlocks { ...on Page_Hero_Data { # previously this would have been Hero_Data # ... } } } }
- d42e2bcf: Adds number, datetime, and boolean fields back into primitive field generators
- 95244e14: Early return for query nodes which can't be formified
- Updated dependencies [7351d92f]
- tina-graphql-helpers@0.1.2
- 96ee3eb1: Revisited useDocumentCreatorPlugin to improve the UX
- Bump packages to reflect new changest capabilities
- Updated dependencies [undefined]
- tina-graphql-helpers@0.1.1
- Updated dependencies [undefined]
- tina-graphql-helpers@0.1.0