diff --git a/docs/source/conf.py b/docs/source/conf.py index 2080b93576..4c010d58b4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -90,11 +90,8 @@ # Ignore github.com pages with anchors r"https://github.com/.*#.*", # Ignore other specific anchors - # r"https://chromewebstore.google.com/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi", # TODO retest with latest Sphinx when upgrading theme. chromewebstore recently changed its URL and has "too many redirects". - # r"https://chromewebstore.google.com/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd", # TODO retest with latest Sphinx when upgrading theme. chromewebstore recently changed its URL and has "too many redirects". r"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors#Identifying_the_issue", r"https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0", - # r"https://stackoverflow.com", # volto and documentation # TODO retest with latest Sphinx. ] linkcheck_anchors = True linkcheck_timeout = 5 @@ -180,7 +177,7 @@ "path_to_docs": "docs", "repository_branch": "main", "repository_url": "https://github.com/plone/volto", - "search_bar_text": "Search", # TODO: Confirm usage of search_bar_text in plone-sphinx-theme + "search_bar_text": "Search", "use_edit_page_button": True, "use_issues_button": True, "use_repository_button": True, @@ -188,7 +185,7 @@ # Announce that we have an opensearch plugin # https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_use_opensearch -html_use_opensearch = "https://6.docs.plone.org" # TODO: Confirm usage of opensearch in theme +html_use_opensearch = "https://6.docs.plone.org" # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/docs/source/contributing/language-features.md b/docs/source/contributing/language-features.md index 7102420229..979fed7793 100644 --- a/docs/source/contributing/language-features.md +++ b/docs/source/contributing/language-features.md @@ -41,7 +41,6 @@ You can adjust this file according to the environments you want to target. ">1%", "last 4 versions", "Firefox ESR", - "not ie 11", "not dead" ], ``` diff --git a/docs/source/release-notes/index.md b/docs/source/release-notes/index.md index 040f15972a..791e5af741 100644 --- a/docs/source/release-notes/index.md +++ b/docs/source/release-notes/index.md @@ -17,6 +17,23 @@ myst: +## 18.1.2 (2024-12-05) + +### Bugfix + +- Remove `not ie 11` from browserslist configuration, because it is now included in `not dead`. @stevepiercy [#6501](https://github.com/plone/volto/issues/6501) +- Fix warnings related to `snapshot.managedPaths` on startup. @davisagli [#6511](https://github.com/plone/volto/issues/6511) + +### Internal + +- Add Accessibility acceptance tests for content types. @ana-oprea @ichim-david [#6339](https://github.com/plone/volto/issues/6339) +- Fixed the `README.md` for Volto core when releasing to npm registry: copy it from the root of the monorepo on release. @sneridagh [#6510](https://github.com/plone/volto/issues/6510) + +### Documentation + +- Add new Volto trainings to tutorials. @stevepiercy [#6499](https://github.com/plone/volto/issues/6499) +- `html_use_opensearch` value must not have a trailing slash. Clean up comments. @stevepiercy [#6502](https://github.com/plone/volto/issues/6502) + ## 18.1.1 (2024-11-21) ### Bugfix diff --git a/docs/source/tutorials/index.md b/docs/source/tutorials/index.md index adde4f061b..4a1ce15a4e 100644 --- a/docs/source/tutorials/index.md +++ b/docs/source/tutorials/index.md @@ -18,6 +18,8 @@ On the [Plone Training website](https://training.plone.org), you'll find Volto-d - [Mastering Plone 6 Development](https://training.plone.org/mastering-plone/) The comprehensive training on Plone 6 with best practice tips for developers and integrators. +- [Customizing Volto Light Theme](https://training.plone.org/customizing-volto-light-theme/index.html) +- [Volto Customization for JavaScript Beginners](https://training.plone.org/volto-customization/index.html) - [Volto Hands-On](https://training.plone.org/voltohandson/index.html) - [Volto Add-ons Development](https://training.plone.org/voltoaddons/index.html) - [Effective Volto](https://training.plone.org/effective-volto/index.html) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 8b6360ff57..451fc012b6 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -8,6 +8,12 @@ +## 2.2.1 (2024-12-05) + +### Bugfix + +- Fix color picker usability. @sneridagh [#6512](https://github.com/plone/volto/issues/6512) + ## 2.2.0 (2024-11-21) ### Feature diff --git a/packages/components/package.json b/packages/components/package.json index 18004f5337..2e45ce640a 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -8,7 +8,7 @@ } ], "license": "MIT", - "version": "2.2.0", + "version": "2.2.1", "repository": { "type": "git", "url": "http://github.com/plone/components.git" diff --git a/packages/components/src/components/ColorPicker/ColorPicker.stories.tsx b/packages/components/src/components/ColorPicker/ColorPicker.stories.tsx index 1f94cc3a6c..686b2dd859 100644 --- a/packages/components/src/components/ColorPicker/ColorPicker.stories.tsx +++ b/packages/components/src/components/ColorPicker/ColorPicker.stories.tsx @@ -14,11 +14,22 @@ const meta = { tags: ['autodocs'], } satisfies Meta; +const ColorPickerStory = (args: any) => { + const [color, setColor] = React.useState(args.defaultValue); + + return ( + <> + + The color is: {color.toString('hex')} + + ); +}; + export default meta; type Story = StoryObj; export const Default: Story = { - render: (args: any) => , + render: ColorPickerStory, }; Default.args = { diff --git a/packages/components/src/components/ColorPicker/ColorPicker.tsx b/packages/components/src/components/ColorPicker/ColorPicker.tsx index 4bedc19b43..f8bed1f0bd 100644 --- a/packages/components/src/components/ColorPicker/ColorPicker.tsx +++ b/packages/components/src/components/ColorPicker/ColorPicker.tsx @@ -35,7 +35,14 @@ export function ColorPicker({ label, children, ...props }: ColorPickerProps) { yChannel="brightness" /> - + { + if (e.key === 'Enter') { + e.currentTarget.blur(); + } + }} + /> )} diff --git a/packages/registry/docs/conf.py b/packages/registry/docs/conf.py index 796fc4b620..fa39be8168 100644 --- a/packages/registry/docs/conf.py +++ b/packages/registry/docs/conf.py @@ -177,7 +177,7 @@ # Announce that we have an opensearch plugin # https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_use_opensearch -html_use_opensearch = "https://plone-registry.readthedocs.io/" # TODO: Confirm usage of opensearch in theme +html_use_opensearch = "https://plone-registry.readthedocs.io" # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/packages/registry/news/6502.documentation b/packages/registry/news/6502.documentation new file mode 100644 index 0000000000..d46a5b6816 --- /dev/null +++ b/packages/registry/news/6502.documentation @@ -0,0 +1 @@ +`html_use_opensearch` value must not have a trailing slash. Clean up comments. @stevepiercy diff --git a/packages/volto/.release-it.json b/packages/volto/.release-it.json index 28780df7e4..0395373591 100644 --- a/packages/volto/.release-it.json +++ b/packages/volto/.release-it.json @@ -5,7 +5,9 @@ "hooks": { "before:bump": ["pnpm i18n", "pnpm build:types", "git add types"], "after:bump": [ - "pipx run towncrier build --draft --yes --version ${version} > .changelog.draft && pipx run towncrier build --yes --version ${version}", + "pipx run towncrier build --draft --yes --version ${version} > .changelog.draft", + "pipx run towncrier build --yes --version ${version}", + "cp ../../README.md ./", "make release-notes-copy-to-docs" ], "after:release": "rm .changelog.draft" diff --git a/packages/volto/CHANGELOG.md b/packages/volto/CHANGELOG.md index 040f15972a..791e5af741 100644 --- a/packages/volto/CHANGELOG.md +++ b/packages/volto/CHANGELOG.md @@ -17,6 +17,23 @@ myst: +## 18.1.2 (2024-12-05) + +### Bugfix + +- Remove `not ie 11` from browserslist configuration, because it is now included in `not dead`. @stevepiercy [#6501](https://github.com/plone/volto/issues/6501) +- Fix warnings related to `snapshot.managedPaths` on startup. @davisagli [#6511](https://github.com/plone/volto/issues/6511) + +### Internal + +- Add Accessibility acceptance tests for content types. @ana-oprea @ichim-david [#6339](https://github.com/plone/volto/issues/6339) +- Fixed the `README.md` for Volto core when releasing to npm registry: copy it from the root of the monorepo on release. @sneridagh [#6510](https://github.com/plone/volto/issues/6510) + +### Documentation + +- Add new Volto trainings to tutorials. @stevepiercy [#6499](https://github.com/plone/volto/issues/6499) +- `html_use_opensearch` value must not have a trailing slash. Clean up comments. @stevepiercy [#6502](https://github.com/plone/volto/issues/6502) + ## 18.1.1 (2024-11-21) ### Bugfix diff --git a/packages/volto/cypress/tests/core/a11y/content.js b/packages/volto/cypress/tests/core/a11y/content.js new file mode 100644 index 0000000000..c266399a4b --- /dev/null +++ b/packages/volto/cypress/tests/core/a11y/content.js @@ -0,0 +1,100 @@ +describe('Accessibility Tests Content Types', () => { + beforeEach(() => { + cy.autologin(); + cy.visit('/'); + cy.injectAxe(); // make sure axe is available on the page + }); + + it('Event tested for a11y axe violations', () => { + cy.get('#toolbar-add').click(); + cy.get('#toolbar-add-event').click(); + cy.get('.documentFirstHeading').type('Test Event Content Type'); + + cy.get('#toolbar-save').click(); + + cy.wait(1000); + cy.get('.ics-download').contains('Download Event').focus(); + cy.checkA11y(); + }); + + it('File tested for a11y axe violations', () => { + cy.get('#toolbar-add').click(); + cy.get('#toolbar-add-file').click(); + cy.get('#field-title').type('Test File Content Type'); + cy.get('#field-description').type( + 'A11y cypress test for File content type', + ); + + cy.get('input[id="field-file"]').attachFile('file.pdf', { + subjectType: 'input', + }); + + cy.get('#toolbar-save').focus().click(); + + cy.wait(1000); + cy.contains('file.pdf').focus(); + cy.checkA11y(); + }); + + it('Image tested for a11y axe violations', () => { + cy.get('#toolbar-add').click(); + cy.get('#toolbar-add-image').click(); + cy.get('#field-title').type('Test Image Content Type'); + cy.get('#field-description').type('Image description'); + cy.fixture('image.png', 'base64') + .then((fc) => { + return Cypress.Blob.base64StringToBlob(fc); + }) + .then((fileContent) => { + cy.get('input#field-image').attachFile( + { fileContent, fileName: 'image.png', mimeType: 'image/png' }, + { subjectType: 'input' }, + ); + cy.get('#field-image-image').parent().parent().contains('image.png'); + }); + cy.get('#toolbar-save').click(); + + cy.wait(1000); + cy.get('#view img').should('have.attr', 'alt', 'Test Image Content Type'); + cy.checkA11y(); + }); + + it('Link tested for a11y axe violations', () => { + cy.get('#toolbar-add').click(); + cy.get('#toolbar-add-link').click(); + cy.get('#field-title').type('Test Link Content Type'); + cy.get('#field-description').type( + 'A11y cypress test for Link content type', + ); + cy.get('#field-remoteUrl').type('https://google.com'); + cy.get('#toolbar-save').click(); + + cy.wait(1000); + cy.get('a.external') + .should('have.attr', 'href', 'https://google.com') + .focus(); + cy.checkA11y(); + }); + + it('News Item tested for a11y axe violations', () => { + cy.get('#toolbar-add').click(); + cy.get('#toolbar-add-news-item').click(); + cy.get('.documentFirstHeading').type('Test News Content Type'); + cy.get('#field-description').type('test summary'); + cy.get('#field-subjects').type('test'); + cy.get('#toolbar-save').click(); + + cy.wait(1000); + cy.checkA11y(); + }); + + it('Page tested for a11y axe violations', () => { + cy.get('#toolbar-add').click(); + cy.get('#toolbar-add-document').click(); + cy.get('.documentFirstHeading').type('My Page'); + cy.get('#toolbar-save').click(); + + cy.wait(1000); + cy.checkA11y(); + }); +}); diff --git a/packages/volto/cypress/tests/core/basic/metadata.js b/packages/volto/cypress/tests/core/basic/metadata.js index 6d5b414aad..7c7924cd1e 100644 --- a/packages/volto/cypress/tests/core/basic/metadata.js +++ b/packages/volto/cypress/tests/core/basic/metadata.js @@ -41,6 +41,7 @@ describe('Add Content Tests', () => { }); it('After removing value of widget the focus should be removed from the field', () => { + cy.wait(2000); cy.get('#field-creators').type('aaa'); cy.get('#field-creators') .type('aaa{Enter}') diff --git a/packages/volto/package.json b/packages/volto/package.json index 78baf16759..dbca426284 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -9,7 +9,7 @@ } ], "license": "MIT", - "version": "18.1.1", + "version": "18.1.2", "repository": { "type": "git", "url": "git@github.com:plone/volto.git" @@ -171,7 +171,6 @@ ">1%", "last 4 versions", "Firefox ESR", - "not ie 11", "not dead" ], "engines": { diff --git a/packages/volto/razzle.config.js b/packages/volto/razzle.config.js index a37df657ac..5ab88cb132 100644 --- a/packages/volto/razzle.config.js +++ b/packages/volto/razzle.config.js @@ -414,15 +414,6 @@ const defaultModify = ({ ] : []; - if (config.devServer) { - config.devServer.static.watch.ignored = /node_modules\/(?!@plone\/volto)/; - config.snapshot = { - managedPaths: [ - /^(.+?[\\/]node_modules[\\/](?!(@plone[\\/]volto))(@.+?[\\/])?.+?)[\\/]/, - ], - }; - } - return config; };