Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
NODE_OPTIONS: --max-old-space-size=4096
TZ: Europe/Amsterdam
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' && failure()
with:
name: cypress-results
Expand Down
44 changes: 20 additions & 24 deletions cypress/e2e/editorial_workflow_spec_test_backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,16 @@ describe('Test Backend Editorial Workflow', () => {
login();

inSidebar(() => cy.contains('a', 'Pages').click());
inSidebar(() => cy.contains('a', 'Directory'));
inSidebar(() => cy.contains('a', /^Directory$/));
inGrid(() => cy.contains('a', 'Root Page'));
inGrid(() => cy.contains('a', 'Directory'));

inSidebar(() => cy.contains('a', 'Directory').click());
inSidebar(() => cy.contains('a', /^Directory$/).click());

inGrid(() => cy.contains('a', 'Sub Directory'));
inGrid(() => cy.contains('a', 'Another Sub Directory'));
inSidebar(() => cy.contains('a', /^Sub Directory$/));
inSidebar(() => cy.contains('a', 'Another Sub Directory'));

inSidebar(() => cy.contains('a', 'Sub Directory').click());
inGrid(() => cy.contains('a', 'Nested Directory'));
inSidebar(() => cy.contains('a', /^Sub Directory$/).click());
inSidebar(() => cy.contains('a', 'Nested Directory'));
cy.url().should(
'eq',
'http://localhost:8080/#/collections/pages/filter/directory/sub-directory',
Expand All @@ -233,21 +232,17 @@ describe('Test Backend Editorial Workflow', () => {
login();

inSidebar(() => cy.contains('a', 'Pages').click());
inSidebar(() => cy.contains('a', 'Directory').click());
inGrid(() => cy.contains('a', 'Another Sub Directory').click());

cy.url().should(
'eq',
'http://localhost:8080/#/collections/pages/entries/directory/another-sub-directory/index',
);
inSidebar(() => cy.contains('a', /^Directory$/).click());
inSidebar(() => cy.contains('a', 'Another Sub Directory').click());
inGrid(() => cy.contains('a', 'Another Sub Directory'));
});

it(`can create a new entry with custom path`, () => {
login();

inSidebar(() => cy.contains('a', 'Pages').click());
inSidebar(() => cy.contains('a', 'Directory').click());
inSidebar(() => cy.contains('a', 'Sub Directory').click());
inSidebar(() => cy.contains('a', /^Directory$/).click());
inSidebar(() => cy.contains('a', /^Sub Directory$/).click());
cy.contains('a', 'New Page').click();

cy.get('[id^="path-field"]').should('have.value', 'directory/sub-directory');
Expand All @@ -262,18 +257,18 @@ describe('Test Backend Editorial Workflow', () => {
publishEntryInEditor(publishTypes.publishNow);
exitEditor();

inGrid(() => cy.contains('a', 'New Path Title'));
inSidebar(() => cy.contains('a', 'Directory').click());
inSidebar(() => cy.contains('a', 'Directory').click());
inSidebar(() => cy.contains('a', 'New Path Title'));
inSidebar(() => cy.contains('a', /^Directory$/).click());
inSidebar(() => cy.contains('a', /^Directory$/).click());
inGrid(() => cy.contains('a', 'New Path Title').should('not.exist'));
});

it(`can't create an entry with an existing path`, () => {
login();

inSidebar(() => cy.contains('a', 'Pages').click());
inSidebar(() => cy.contains('a', 'Directory').click());
inSidebar(() => cy.contains('a', 'Sub Directory').click());
inSidebar(() => cy.contains('a', /^Directory$/).click());
inSidebar(() => cy.contains('a', /^Sub Directory$/).click());

cy.contains('a', 'New Page').click();
cy.get('[id^="title-field"]').type('New Path Title');
Expand All @@ -292,7 +287,8 @@ describe('Test Backend Editorial Workflow', () => {
login();

inSidebar(() => cy.contains('a', 'Pages').click());
inGrid(() => cy.contains('a', 'Directory').click());
inSidebar(() => cy.contains('a', /^Directory$/).click());
inGrid(() => cy.contains('a', /^Directory$/).click());

cy.get('[id^="path-field"]').should('have.value', 'directory');
cy.get('[id^="path-field"]').clear();
Expand All @@ -310,7 +306,7 @@ describe('Test Backend Editorial Workflow', () => {

inSidebar(() => cy.contains('a', 'New Directory').click());

inGrid(() => cy.contains('a', 'Sub Directory'));
inGrid(() => cy.contains('a', 'Another Sub Directory'));
inSidebar(() => cy.contains('a', /^Sub Directory$/));
inSidebar(() => cy.contains('a', 'Another Sub Directory'));
});
});
6 changes: 5 additions & 1 deletion dev-test/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ collections: # A list of collections the CMS should be able to edit
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
summary: '{{title}} -- {{year}}/{{month}}/{{day}}'
create: true # Allow users to create new documents in this collection
editor:
visualEditing: true
view_filters:
- label: Posts With Index
field: title
Expand Down Expand Up @@ -61,6 +63,8 @@ collections: # A list of collections the CMS should be able to edit
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
summary: '{{title}} -- {{year}}/{{month}}/{{day}}'
create: true # Allow users to create new documents in this collection
editor:
visualEditing: true
fields: # The fields each document in this collection have
- { label: 'Title', name: 'title', widget: 'string', tagname: 'h1' }
- { label: 'Body', name: 'body', widget: 'markdown', hint: 'Main content goes here.' }
Expand Down Expand Up @@ -272,7 +276,7 @@ collections: # A list of collections the CMS should be able to edit
label_singular: 'Page'
folder: _pages
create: true
nested: { depth: 100 }
nested: { depth: 100, subfolders: false }
fields:
- label: Title
name: title
Expand Down
36 changes: 21 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions packages/decap-cms-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.6.2](https://github.com/decaporg/decap-cms/compare/decap-cms-app@3.6.1...decap-cms-app@3.6.2) (2025-02-13)

**Note:** Version bump only for package decap-cms-app

## [3.6.1](https://github.com/decaporg/decap-cms/compare/decap-cms-app@3.6.0...decap-cms-app@3.6.1) (2025-01-30)

**Note:** Version bump only for package decap-cms-app

# [3.6.0](https://github.com/decaporg/decap-cms/compare/decap-cms-app@3.5.0...decap-cms-app@3.6.0) (2025-01-29)

**Note:** Version bump only for package decap-cms-app

# [3.5.0](https://github.com/decaporg/decap-cms/compare/decap-cms-app@3.4.0...decap-cms-app@3.5.0) (2025-01-15)

### Bug Fixes
Expand Down
12 changes: 6 additions & 6 deletions packages/decap-cms-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "decap-cms-app",
"description": "An extensible, open source, Git-based, React CMS for static sites. Reusable congiuration with React as peer.",
"version": "3.5.0",
"version": "3.6.2",
"homepage": "https://www.decapcms.org",
"repository": "https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-app",
"bugs": "https://github.com/decaporg/decap-cms/issues",
Expand Down Expand Up @@ -40,10 +40,10 @@
"decap-cms-backend-gitlab": "^3.2.2",
"decap-cms-backend-proxy": "^3.1.4",
"decap-cms-backend-test": "^3.1.3",
"decap-cms-core": "^3.5.0",
"decap-cms-core": "^3.6.1",
"decap-cms-editor-component-image": "^3.1.3",
"decap-cms-lib-auth": "^3.0.5",
"decap-cms-lib-util": "^3.1.0",
"decap-cms-lib-util": "^3.2.0",
"decap-cms-lib-widgets": "^3.1.0",
"decap-cms-locales": "^3.3.0",
"decap-cms-ui-default": "^3.1.4",
Expand All @@ -53,11 +53,11 @@
"decap-cms-widget-datetime": "^3.2.3",
"decap-cms-widget-file": "^3.1.3",
"decap-cms-widget-image": "^3.1.3",
"decap-cms-widget-list": "^3.2.2",
"decap-cms-widget-list": "^3.3.0",
"decap-cms-widget-map": "^3.1.4",
"decap-cms-widget-markdown": "^3.2.0",
"decap-cms-widget-markdown": "^3.3.0",
"decap-cms-widget-number": "^3.1.3",
"decap-cms-widget-object": "^3.2.0",
"decap-cms-widget-object": "^3.3.1",
"decap-cms-widget-relation": "^3.3.2",
"decap-cms-widget-select": "^3.2.2",
"decap-cms-widget-string": "^3.1.3",
Expand Down
15 changes: 15 additions & 0 deletions packages/decap-cms-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.6.1](https://github.com/decaporg/decap-cms/compare/decap-cms-core@3.6.0...decap-cms-core@3.6.1) (2025-02-13)

**Note:** Version bump only for package decap-cms-core

# [3.6.0](https://github.com/decaporg/decap-cms/compare/decap-cms-core@3.5.0...decap-cms-core@3.6.0) (2025-01-29)

### Bug Fixes

- **widgetsFor:** return widgets for variable type lists ([#7296](https://github.com/decaporg/decap-cms/issues/7296)) ([9be2693](https://github.com/decaporg/decap-cms/commit/9be2693d1b35bf56c7ef05bdece6c24a21ba7567)), closes [/github.com/decaporg/decap-cms/issues/2307#issuecomment-638326225](https://github.com//github.com/decaporg/decap-cms/issues/2307/issues/issuecomment-638326225)

### Features

- **nested collections:** allow non-index files ([#7359](https://github.com/decaporg/decap-cms/issues/7359)) ([47a2f70](https://github.com/decaporg/decap-cms/commit/47a2f70ef788ae8e61bbbc0ac21e00d68d0029d0)), closes [#4972](https://github.com/decaporg/decap-cms/issues/4972)
- visual editing (click-to-edit) ([#7374](https://github.com/decaporg/decap-cms/issues/7374)) ([989c2dd](https://github.com/decaporg/decap-cms/commit/989c2dd6ed80f69b572b8b73c4e37b5106ae04fb))

# [3.5.0](https://github.com/decaporg/decap-cms/compare/decap-cms-core@3.4.2...decap-cms-core@3.5.0) (2024-11-12)

### Bug Fixes
Expand Down
9 changes: 9 additions & 0 deletions packages/decap-cms-core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ declare module 'decap-cms-core' {
publish?: boolean;
nested?: {
depth: number;
subfolders?: boolean;
};
meta?: { path?: { label: string; widget: string; index_file: string } };

Expand Down Expand Up @@ -515,12 +516,20 @@ declare module 'decap-cms-core' {
handler: ({
entry,
author,
context,
}: {
entry: Map<string, any>;
author: { login: string; name: string };
context?: HookContext;
}) => any;
}

export interface HookContext {
publishStack?: boolean;
actions?: Record<string, Function>;
[key: string]: any;
}

export type CmsEventListenerOptions = any; // TODO: type properly

export type CmsLocalePhrases = any; // TODO: type properly
Expand Down
3 changes: 2 additions & 1 deletion packages/decap-cms-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "decap-cms-core",
"description": "Decap CMS core application, see decap-cms package for the main distribution.",
"version": "3.5.0",
"version": "3.6.1",
"repository": "https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-core",
"bugs": "https://github.com/decaporg/decap-cms/issues",
"module": "dist/esm/index.js",
Expand All @@ -26,6 +26,7 @@
"dependencies": {
"@iarna/toml": "2.2.5",
"@reduxjs/toolkit": "^1.9.1",
"@vercel/stega": "^0.1.2",
"ajv": "8.12.0",
"ajv-errors": "^3.0.0",
"ajv-keywords": "^5.0.0",
Expand Down
Loading
Loading