Skip to content

Commit

Permalink
Merge branch 'main' into slots-base
Browse files Browse the repository at this point in the history
* main:
  Release 18.1.2
  Remove devserver settings for HMR of volto (#6511)
  Release @plone/components 2.2.1
  [components] Fix color picker usability (#6512)
  Fix README in npm by copying it from the root of the monorepo. (#6510)
  Add Accessibility acceptance tests for content-types (#6339)
  Fix linkcheck (#6502)
  Update browserslist (#6501)
  Add new Volto trainings to tutorials (#6499)
  • Loading branch information
sneridagh committed Dec 7, 2024
2 parents f47a8d0 + c803226 commit c32e2c6
Show file tree
Hide file tree
Showing 16 changed files with 172 additions and 22 deletions.
7 changes: 2 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -180,15 +177,15 @@
"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,
}

# 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
# "<project> v<release> documentation".
Expand Down
1 change: 0 additions & 1 deletion docs/source/contributing/language-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
```
Expand Down
17 changes: 17 additions & 0 deletions docs/source/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ myst:

<!-- towncrier release notes start -->

## 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
Expand Down
2 changes: 2 additions & 0 deletions docs/source/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

<!-- towncrier release notes start -->

## 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
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"license": "MIT",
"version": "2.2.0",
"version": "2.2.1",
"repository": {
"type": "git",
"url": "http://github.com/plone/components.git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,22 @@ const meta = {
tags: ['autodocs'],
} satisfies Meta<typeof ColorPicker>;

const ColorPickerStory = (args: any) => {
const [color, setColor] = React.useState(args.defaultValue);

return (
<>
<ColorPicker {...args} value={color} onChange={setColor} />
The color is: {color.toString('hex')}
</>
);
};

export default meta;
type Story = StoryObj<typeof meta>;

export const Default: Story = {
render: (args: any) => <ColorPicker {...args} />,
render: ColorPickerStory,
};

Default.args = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ export function ColorPicker({ label, children, ...props }: ColorPickerProps) {
yChannel="brightness"
/>
<ColorSlider colorSpace="hsb" channel="hue" />
<ColorField label="Hex" />
<ColorField
label="Hex"
onKeyDown={(e) => {
if (e.key === 'Enter') {
e.currentTarget.blur();
}
}}
/>
</>
)}
</Dialog>
Expand Down
2 changes: 1 addition & 1 deletion packages/registry/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# "<project> v<release> documentation".
Expand Down
1 change: 1 addition & 0 deletions packages/registry/news/6502.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`html_use_opensearch` value must not have a trailing slash. Clean up comments. @stevepiercy
4 changes: 3 additions & 1 deletion packages/volto/.release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 17 additions & 0 deletions packages/volto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ myst:

<!-- towncrier release notes start -->

## 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
Expand Down
100 changes: 100 additions & 0 deletions packages/volto/cypress/tests/core/a11y/content.js
Original file line number Diff line number Diff line change
@@ -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();
});
});
1 change: 1 addition & 0 deletions packages/volto/cypress/tests/core/basic/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand Down
3 changes: 1 addition & 2 deletions packages/volto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"license": "MIT",
"version": "18.1.1",
"version": "18.1.2",
"repository": {
"type": "git",
"url": "[email protected]:plone/volto.git"
Expand Down Expand Up @@ -171,7 +171,6 @@
">1%",
"last 4 versions",
"Firefox ESR",
"not ie 11",
"not dead"
],
"engines": {
Expand Down
9 changes: 0 additions & 9 deletions packages/volto/razzle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit c32e2c6

Please sign in to comment.