Skip to content

PNW-2564 - merge with master #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from 15 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.

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

## [3.6.3](https://github.com/decaporg/decap-cms/compare/[email protected]@3.6.3) (2025-05-15)

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

## [3.6.2](https://github.com/decaporg/decap-cms/compare/[email protected]@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/[email protected]@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/[email protected]@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/[email protected]@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.3",
"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.2",
"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
22 changes: 22 additions & 0 deletions packages/decap-cms-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
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/[email protected]@3.6.2) (2025-05-15)

### Bug Fixes

- **#7371:** Duplicate Localized Content When Duplicating Entries with i18n Enabled ([#7372](https://github.com/decaporg/decap-cms/issues/7372)) ([c5b1dfe](https://github.com/decaporg/decap-cms/commit/c5b1dfe50ae34230c735d58dd1df475fa17ee578)), closes [#7371](https://github.com/decaporg/decap-cms/issues/7371)
- **nested-i18n:** pass newPath only when customPath differs from current path ([#7418](https://github.com/decaporg/decap-cms/issues/7418)) ([86d41d7](https://github.com/decaporg/decap-cms/commit/86d41d79b20583041570bce30b46835a36bcecf2))

## [3.6.1](https://github.com/decaporg/decap-cms/compare/[email protected]@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/[email protected]@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/[email protected]@3.5.0) (2024-11-12)

### Bug Fixes
Expand Down
1 change: 1 addition & 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
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.2",
"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
1 change: 1 addition & 0 deletions packages/decap-cms-core/src/actions/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ export function draftDuplicateEntry(entry: EntryMap) {
type: DRAFT_CREATE_DUPLICATE_FROM_ENTRY,
payload: createEntry(entry.get('collection'), '', '', {
data: entry.get('data'),
i18n: entry.get('i18n'),
mediaFiles: entry.get('mediaFiles').toJS(),
}),
};
Expand Down
Loading
Loading