diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 046352389..695546cf5 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'pnpm' diff --git a/components/blocks/CarouselFeature.tsx b/components/blocks/CarouselFeature.tsx index f1aef1aa6..7b5e4dd27 100644 --- a/components/blocks/CarouselFeature.tsx +++ b/components/blocks/CarouselFeature.tsx @@ -1,12 +1,10 @@ -import React, { useState, useEffect, useRef } from 'react'; -import Link from 'next/link'; -import type { TinaTemplate } from '@tinacms/cli'; -import { Container } from './Container'; -import GradGlow from '../../public/svg/grad-glow.svg'; +import React, { useEffect, useRef, useState } from 'react'; import { tinaField } from 'tinacms/dist/react'; import { sanitizeLabel } from 'utils/sanitizeLabel'; -import { Actions } from './ActionsButton'; +import GradGlow from '../../public/svg/grad-glow.svg'; import { icons } from '../ui/IconPickerIcons'; +import { Actions } from './ActionsButton'; +import { Container } from './Container'; const CarouselItem = ({ data, @@ -36,66 +34,64 @@ const CarouselItem = ({ (isSmallOrMediumScreen && button); return ( +
onClick(index)} + style={{ textDecoration: 'none', overflow: 'visible' }} + >
onClick(index)} - style={{ textDecoration: 'none', overflow: 'visible' }} + data-tina-field={tinaField(data, 'headline')} + className="flex flex-col" > +
+ {renderMedia && renderMedia(index)} +
+
+ {IconComponent && ( + + )} + {headline && ( +

+ {headline} +

+ )} +
-
- {renderMedia && renderMedia(index)} -
-
- {IconComponent && ( - - )} - {headline && ( -

- {headline} -

- )} -
-
- {textDisplayCondition && ( -

- {text} -

- )} - {buttonDisplayCondition && ( -
- -
- )} -
+ {textDisplayCondition && ( +

+ {text} +

+ )} + {buttonDisplayCondition && ( +
+ +
+ )}
+
); }; @@ -147,7 +143,12 @@ export function CarouselFeatureBlock({ data, index }) { }; useEffect(() => { - if (!isPaused && isLargeScreen && data?.items?.length > 0 && !isUserInteracted) { + if ( + !isPaused && + isLargeScreen && + data?.items?.length > 0 && + !isUserInteracted + ) { startAutoTicking(); } return () => clearInterval(intervalRef.current); diff --git a/components/blocks/Columns.template.ts b/components/blocks/Columns.template.ts index c05edcb20..d03e9adea 100644 --- a/components/blocks/Columns.template.ts +++ b/components/blocks/Columns.template.ts @@ -1,9 +1,9 @@ -import type { TinaTemplate } from 'tinacms' +import type { Template } from 'tinacms' import { actionsButtonTemplate } from './ActionsButton.template' -import { socialTemplate } from './Social.template' import { newsletterTemplate } from './Newsletter.template' +import { socialTemplate } from './Social.template' -export const columnsTemplate: TinaTemplate = { +export const columnsTemplate: Template = { label: 'Columns', name: 'columns', ui: { diff --git a/components/blocks/CompareBox.template.ts b/components/blocks/CompareBox.template.ts index c5deabb28..021b70071 100644 --- a/components/blocks/CompareBox.template.ts +++ b/components/blocks/CompareBox.template.ts @@ -1,6 +1,6 @@ -import type { TinaTemplate } from 'tinacms'; +import type { Template } from 'tinacms'; -export const compareBoxTemplate: TinaTemplate = { +export const compareBoxTemplate: Template = { label: 'Compare Box', name: 'CompareBox', fields: [ @@ -17,7 +17,14 @@ export const compareBoxTemplate: TinaTemplate = { }, fields: [ { name: 'criteria', label: 'Criteria', type: 'string' }, - { name: 'description', label: 'Description', ui: { component: 'textarea' }, type: 'string', description: 'The text inside the description will NOT be displayed anywhere, this is just to elaborate on the criteria itself for our own users.' }, + { + name: 'description', + label: 'Description', + ui: { component: 'textarea' }, + type: 'string', + description: + 'The text inside the description will NOT be displayed anywhere, this is just to elaborate on the criteria itself for our own users.', + }, ], }, { @@ -35,9 +42,26 @@ export const compareBoxTemplate: TinaTemplate = { { name: 'headline', label: 'Headline', type: 'string' }, { name: 'logoColour', label: 'Logo Link (Colour)', type: 'string' }, { name: 'logoWhite', label: 'Logo Link (White)', type: 'string' }, - { name: 'active', label: 'Active', type: 'boolean', description: 'Toggle to highlight which company is BY DEFAULT active' }, - { name: 'isHidden', label: 'Hidden', type: 'boolean', description: 'Toggle will hide the company item from the list of clickable companies - it will also ensure it cannot be turned off.' }, - { name: 'backgroundColor', label: 'Background Color', type: 'string', ui: { component: 'color' }, description: 'Choose a background color for the company' }, + { + name: 'active', + label: 'Active', + type: 'boolean', + description: 'Toggle to highlight which company is BY DEFAULT active', + }, + { + name: 'isHidden', + label: 'Hidden', + type: 'boolean', + description: + 'Toggle will hide the company item from the list of clickable companies - it will also ensure it cannot be turned off.', + }, + { + name: 'backgroundColor', + label: 'Background Color', + type: 'string', + ui: { component: 'color' }, + description: 'Choose a background color for the company', + }, { name: 'criteria1', label: 'Criteria 1', type: 'boolean' }, { name: 'criteria2', label: 'Criteria 2', type: 'boolean' }, { name: 'criteria3', label: 'Criteria 3', type: 'boolean' }, diff --git a/components/blocks/Content.template.ts b/components/blocks/Content.template.ts index 37b1c3708..abd41df30 100644 --- a/components/blocks/Content.template.ts +++ b/components/blocks/Content.template.ts @@ -1,10 +1,10 @@ -import { TinaTemplate } from 'tinacms' +import { Template } from 'tinacms'; -import { newsletterTemplate } from './Newsletter.template' -import { actionsButtonTemplate } from './ActionsButton.template' -import { socialTemplate } from './Social.template' +import { actionsButtonTemplate } from './ActionsButton.template'; +import { newsletterTemplate } from './Newsletter.template'; +import { socialTemplate } from './Social.template'; -export const contentTemplate: TinaTemplate = { +export const contentTemplate: Template = { label: 'Content', name: 'content', ui: { @@ -74,4 +74,4 @@ export const contentTemplate: TinaTemplate = { ], }, ], -} +}; diff --git a/components/blocks/FAQ.template.ts b/components/blocks/FAQ.template.ts index 18d99e18e..80c3f04c4 100644 --- a/components/blocks/FAQ.template.ts +++ b/components/blocks/FAQ.template.ts @@ -1,6 +1,6 @@ -import type { TinaTemplate } from 'tinacms' +import type { Template } from 'tinacms'; -export const faqTemplate: TinaTemplate = { +export const faqTemplate: Template = { label: 'FAQ', name: 'faq', ui: { @@ -54,4 +54,4 @@ export const faqTemplate: TinaTemplate = { ], }, ], -} +}; diff --git a/components/blocks/FeatureGrid.template.ts b/components/blocks/FeatureGrid.template.ts index 29964d3ef..17aaddfd4 100644 --- a/components/blocks/FeatureGrid.template.ts +++ b/components/blocks/FeatureGrid.template.ts @@ -1,8 +1,8 @@ -import type { TinaTemplate } from 'tinacms' -import { actionsButtonTemplate } from './ActionsButton.template' -import { cardTemplate } from './Pricing.template' +import type { Template } from 'tinacms'; +import { actionsButtonTemplate } from './ActionsButton.template'; +import { cardTemplate } from './Pricing.template'; -export const featureGridTemplate: TinaTemplate = { +export const featureGridTemplate: Template = { label: 'Feature Grid', name: 'featureGrid', ui: { @@ -39,4 +39,4 @@ export const featureGridTemplate: TinaTemplate = { ], }, ], -} +}; diff --git a/components/blocks/Flying.template.ts b/components/blocks/Flying.template.ts index 362dc4098..f7ef8434f 100644 --- a/components/blocks/Flying.template.ts +++ b/components/blocks/Flying.template.ts @@ -1,9 +1,9 @@ -import type { Template, TinaTemplate } from 'tinacms' -import { actionsButtonTemplate } from './ActionsButton.template' -import { modalButtonTemplate } from './ModalButton.template' -import { codeButtonTemplate } from './CodeButton.template' +import type { Template } from 'tinacms'; +import { actionsButtonTemplate } from './ActionsButton.template'; +import { codeButtonTemplate } from './CodeButton.template'; +import { modalButtonTemplate } from './ModalButton.template'; -export const flyingTemplate: TinaTemplate = { +export const flyingTemplate: Template = { name: 'flying', label: 'Flying', ui: { @@ -32,4 +32,4 @@ export const flyingTemplate: TinaTemplate = { ], }, ], -} +}; diff --git a/components/blocks/Hero.template.ts b/components/blocks/Hero.template.ts index 05b2bc4f6..2d9189bb5 100644 --- a/components/blocks/Hero.template.ts +++ b/components/blocks/Hero.template.ts @@ -1,9 +1,9 @@ -import type { Template, TinaTemplate } from 'tinacms' -import { actionsButtonTemplate } from './ActionsButton.template' -import { modalButtonTemplate } from './ModalButton.template' -import { codeButtonTemplate } from './CodeButton.template' +import type { Template } from 'tinacms'; +import { actionsButtonTemplate } from './ActionsButton.template'; +import { codeButtonTemplate } from './CodeButton.template'; +import { modalButtonTemplate } from './ModalButton.template'; -export const heroTemplate: TinaTemplate = { +export const heroTemplate: Template = { label: 'Hero', name: 'hero', ui: { @@ -99,4 +99,4 @@ export const heroTemplate: TinaTemplate = { ], }, ], -} +}; diff --git a/components/blocks/LogoGrid.template.ts b/components/blocks/LogoGrid.template.ts index c954fb033..10d4516ea 100644 --- a/components/blocks/LogoGrid.template.ts +++ b/components/blocks/LogoGrid.template.ts @@ -1,6 +1,6 @@ -import type { TinaTemplate } from 'tinacms' +import type { Template } from 'tinacms'; -export const logoGridTemplate: TinaTemplate = { +export const logoGridTemplate: Template = { label: 'Logo Grid', name: 'logoGrid', ui: { @@ -34,11 +34,12 @@ export const logoGridTemplate: TinaTemplate = { name: 'link', label: 'Link', type: 'string', - description: 'The URL to link to when the logo is clicked. Should be either (1) an internal link (e.g. /showcase#unity) or (2) an external link (e.g. https://ndcconferences.com/).', + description: + 'The URL to link to when the logo is clicked. Should be either (1) an internal link (e.g. /showcase#unity) or (2) an external link (e.g. https://ndcconferences.com/).', }, { name: 'logo', label: 'Logo Image', type: 'image' }, { name: 'size', label: 'Size', type: 'number' }, ], }, ], -} +}; diff --git a/components/blocks/Quote.template.ts b/components/blocks/Quote.template.ts index 39f55398a..9feafdb81 100644 --- a/components/blocks/Quote.template.ts +++ b/components/blocks/Quote.template.ts @@ -1,6 +1,6 @@ -import type { TinaTemplate } from 'tinacms' +import type { Template } from 'tinacms'; -export const quoteTemplate: TinaTemplate = { +export const quoteTemplate: Template = { label: 'Quote', name: 'quote', ui: { @@ -10,19 +10,19 @@ export const quoteTemplate: TinaTemplate = { { label: 'Title', name: 'title2', - ui: { component: "textarea" }, + ui: { component: 'textarea' }, type: 'string', }, { label: 'Sub Text', name: 'subtext', - ui: { component: "textarea" }, + ui: { component: 'textarea' }, type: 'string', }, { label: 'logo', name: 'logo', type: 'image', - } + }, ], -} +}; diff --git a/components/blocks/RoadmapGrid.template.ts b/components/blocks/RoadmapGrid.template.ts index 2b4bdfb0d..26ad64a15 100644 --- a/components/blocks/RoadmapGrid.template.ts +++ b/components/blocks/RoadmapGrid.template.ts @@ -1,7 +1,7 @@ -import type { TinaTemplate } from '@tinacms/cli' -import { actionsButtonTemplate } from './ActionsButton.template' +import type { Template } from 'tinacms'; +import { actionsButtonTemplate } from './ActionsButton.template'; -export const roadmapGridTemplate: TinaTemplate = { +export const roadmapGridTemplate: Template = { label: 'Roadmap Grid', name: 'roadmapGrid', ui: { @@ -42,4 +42,4 @@ export const roadmapGridTemplate: TinaTemplate = { ], }, ], -} +}; diff --git a/components/blocks/Showcase.template.ts b/components/blocks/Showcase.template.ts index 575b58d3b..38a882823 100644 --- a/components/blocks/Showcase.template.ts +++ b/components/blocks/Showcase.template.ts @@ -1,6 +1,6 @@ -import type { TinaTemplate } from 'tinacms' +import type { Template } from 'tinacms'; -export const showcaseTemplate: TinaTemplate = { +export const showcaseTemplate: Template = { label: 'Showcase', name: 'showcase', ui: { @@ -35,4 +35,4 @@ export const showcaseTemplate: TinaTemplate = { ], }, ], -} +}; diff --git a/components/blocks/Story.template.ts b/components/blocks/Story.template.ts index b23a1b376..5c03b914f 100644 --- a/components/blocks/Story.template.ts +++ b/components/blocks/Story.template.ts @@ -1,6 +1,6 @@ -import type { TinaTemplate } from 'tinacms' +import type { Template } from 'tinacms'; -export const storyTemplate: TinaTemplate = { +export const storyTemplate: Template = { label: 'Story', name: 'story', fields: [ @@ -10,4 +10,4 @@ export const storyTemplate: TinaTemplate = { type: 'string', }, ], -} +}; diff --git a/content/docs/editing/blocks.mdx b/content/docs/editing/blocks.mdx index b64c41b0c..d04fdb6ab 100644 --- a/content/docs/editing/blocks.mdx +++ b/content/docs/editing/blocks.mdx @@ -1,7 +1,7 @@ --- id: /docs/editing/blocks title: Block-based editing -last_edited: '2024-09-18T01:51:44.261Z' +last_edited: '2024-09-29T14:32:01.268Z' next: content/docs/editing/single-document-collections.mdx previous: content/docs/editing/markdown.mdx --- @@ -24,9 +24,9 @@ We are going to use the [`object` type](/docs/schema/#grouping-properties-within ```typescript import { defineConfig } from 'tinacms' -import type { TinaTemplate } from 'tinacms' +import type { Template } from 'tinacms' -const heroBlock: TinaTemplate = { +const heroBlock: Template = { name: 'hero', label: 'Hero', ui: { @@ -58,7 +58,7 @@ const heroBlock: TinaTemplate = { ], } -const featureBlock: TinaTemplate = { +const featureBlock: Template = { name: 'features', label: 'Features', fields: [ @@ -83,7 +83,7 @@ const featureBlock: TinaTemplate = { ], } -const contentBlock: TinaTemplate = { +const contentBlock: Template = { name: 'content', label: 'Content', ui: { diff --git a/content/whats-new-tinacloud/2024.10.25.mdx b/content/whats-new-tinacloud/2024.10.25.mdx new file mode 100644 index 000000000..dcd052acb --- /dev/null +++ b/content/whats-new-tinacloud/2024.10.25.mdx @@ -0,0 +1,10 @@ +--- +versionNumber: 2024.10.25 +dateReleased: 2024-10-03T23:13:54Z +--- + +## What's Changed +### 🛠️ Fixes +* fix: empty site urls break cors auth by @kldavis4 in https://github.com/tinacms/tinacloud/pull/2326 +* Users now have to manually create accounts on org acceptance by @brookjeynes-ssw in https://github.com/tinacms/tinacloud/pull/2324 +* fix: media sync media root by @kldavis4 in https://github.com/tinacms/tinacloud/pull/2332 diff --git a/content/whats-new-tinacms/v2.2.7.mdx b/content/whats-new-tinacms/v2.2.7.mdx new file mode 100644 index 000000000..e31dc34f2 --- /dev/null +++ b/content/whats-new-tinacms/v2.2.7.mdx @@ -0,0 +1,11 @@ +--- +versionNumber: 2.2.7 +dateReleased: 2024-10-01T07:27:46Z +--- + +### Patch Changes + +- [#4840](https://github.com/tinacms/tinacms/pull/4840) [`113f4db`](https://github.com/tinacms/tinacms/commit/113f4db4b5d5b7d4b95d612eca56f815f41b4f8c) Thanks [@JackDevAU](https://github.com/JackDevAU)! - Attempt to fix `fs` not found issue + +- [#4826](https://github.com/tinacms/tinacms/pull/4826) [`f0994c8`](https://github.com/tinacms/tinacms/commit/f0994c8f49122cd9d784bf47171715c529d2528f) Thanks [@JackDevAU](https://github.com/JackDevAU)! - ♻️ Add index to key +