Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into blockModelV3
Browse files Browse the repository at this point in the history
  • Loading branch information
danalvrz committed Jul 25, 2024
2 parents ec7b301 + 10627df commit 9a00f08
Show file tree
Hide file tree
Showing 24 changed files with 18,469 additions and 13,225 deletions.
29 changes: 25 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
const fs = require('fs');
const projectRootPath = __dirname;
const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry');

let coreLocation;
if (fs.existsSync(`${projectRootPath}/core`))
coreLocation = `${projectRootPath}/core`;
else if (fs.existsSync(`${projectRootPath}/../../core`))
coreLocation = `${projectRootPath}/../../core`;

const registry = new AddonConfigurationRegistry(
`${coreLocation}/packages/volto`,
);

// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
const addonAliases = Object.keys(registry.packages).map((o) => [
o,
registry.packages[o].modulePath,
]);

module.exports = {
extends: './core/packages/volto/.eslintrc',
extends: `${coreLocation}/packages/volto/.eslintrc`,
rules: {
'import/no-unresolved': 1,
},
settings: {
'import/resolver': {
alias: {
map: [
['@plone/volto', './core/packages/volto/src'],
['@plone/volto-slate', './core/packages/volto-slate/src'],
['@plone/registry', './core/packages/registry/src'],
['@plone/volto', `${coreLocation}/packages/volto/src`],
['@plone/volto-slate', `${coreLocation}/packages/volto-slate/src`],
['@plone/registry', `${coreLocation}/packages/registry/src`],
['@kitconcept/volto-light-theme', './packages/volto-light-theme/src'],
...addonAliases,
],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
Expand Down
6 changes: 6 additions & 0 deletions BMv3-ready.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,58 @@

<!-- towncrier release notes start -->

## 5.0.0 (2024-07-02)

### Breaking

- Upgrade to a39, enable new image widget @sneridagh

Breaking:
The new Image widget component is used in the VLT shadowed image component.
The minimum Volto version requirements have changed for this reason.
The new image widget is present in core from these versions on:
- Volto 17.18.0
- Volto 18.0.0-alpha.36

For more information, please take a look at the upgrade guide:
https://github.com/kitconcept/volto-light-theme/blob/main/UPGRADE-GUIDE.md [#405](https://github.com/kitconcept/volto-light-theme/pull/405)

## 4.0.1 (2024-06-28)

### Bugfix

- Fix Invalid html structure in caption component @iRohitSingh [#398](https://github.com/kitconcept/volto-light-theme/pull/398)
- Fix install in Volto 17 @sneridagh [#400](https://github.com/kitconcept/volto-light-theme/pull/400)

### Internal

- Upgrade to Volto 18a37 @sneridagh [#403](https://github.com/kitconcept/volto-light-theme/pull/403)

## 4.0.0 (2024-06-21)

### Breaking

- Fix tabbing order in the top header. It modifies the underlying HTML to move the top header to the bottom, and modifies CSS to adjust. @iRohitSingh @sneridagh [#374](https://github.com/kitconcept/volto-light-theme/pull/374)
- Updated the MobileNavigation component to be more easily customizable.
The component can now handle infinite navigation depth instead of only three levels, if configured to do so.
The Burger Menu can now be easily customized by overriding the new MobileNavigationToggler.jsx file.
@lenadax

Breaking:
- The "hamburger" icon in the mobile navigation now has an additional wrapper that allows for better customization.

If you have overriden the hamburger icon, you should make sure that your customizations still work and adjust otherwise. [#393](https://github.com/kitconcept/volto-light-theme/pull/393)

### Bugfix

- Fix Logo alt-Title @jonaspiterek [#337](https://github.com/kitconcept/volto-light-theme/pull/337)
- fix link in introduction block being smaller than normal text @jonaspiterek [#365](https://github.com/kitconcept/volto-light-theme/pull/365)
- Fix Description block width in Edit and Add mode. @danalvrz [#394](https://github.com/kitconcept/volto-light-theme/pull/394)

### Internal

- Update the setup. Use new images. @sneridagh [#390](https://github.com/kitconcept/volto-light-theme/pull/390)

## 3.3.2 (2024-05-31)

### Bugfix
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY --chown=node package.json /app/package.json.temp
RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store,uid=1000 <<EOT
python3 -c "import json; data = json.load(open('package.json.temp')); deps = data['dependencies']; data['dependencies'].update(deps); json.dump(data, open('package.json', 'w'), indent=2)"
rm package.json.temp
pnpm install
pnpm install && pnpm build:deps
pnpm build
pnpm install --prod
EOT
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ help: ## Show this help
install: ## Installs the add-on in a development environment
pnpm dlx mrs-developer missdev --no-config --fetch-https
pnpm i
pnpm pnpm build:deps
make build-deps

.PHONY: start
start: ## Starts Volto, allowing reloading of the add-on during development
Expand All @@ -46,6 +46,15 @@ start: ## Starts Volto, allowing reloading of the add-on during development
build: ## Build a production bundle for distribution of the project with the add-on
pnpm build

core/packages/registry/dist: core/packages/registry/src
pnpm --filter @plone/registry build

core/packages/components/dist: core/packages/components/src
pnpm --filter @plone/components build

.PHONY: build-deps
build-deps: core/packages/registry/dist core/packages/components/dist ## Build dependencies

.PHONY: i18n
i18n: ## Sync i18n
pnpm --filter $(ADDON_NAME) i18n
Expand Down
56 changes: 38 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,24 @@ They will be noted properly in the changelog.

See a detailed upgrade guide in: https://github.com/kitconcept/volto-light-theme/blob/main/UPGRADE-GUIDE.md

## Development
## Compatibility

| VLT version | Volto version |
|-------------|---------------|
| 3.x.x | >= Volto 17.0.0-alpha.16 |
| 4.x.x | < Volto 17.18.0 |
| 5.x.x | >= Volto 17.18.0 or >=Volto 18.0.0-alpha.36 |

This theme works under Volto 17 alpha 16 onwards.
Compatibility with Volto 16 might be achieved, but it has to be at customization level in the
specific project add-on.
Compatibility with Volto 16 might be achieved, but it has to be at customization level in the specific project add-on.
This is mainly due to the `RenderBlocks` customization that is based in the one in 17 because of the Grid block in core and the autogrouping feature.
See more information about the other dependencies in `peerDependencies` in `package.json`.

## Development

The development of this add-on is done in isolation using a new approach using pnpm workspaces and latest `mrs-developer` and other Volto core improvements.
For this reason, it only works with pnpm and Volto 18 (currently in alpha) but it does not mean that the add-on will only work in 18.

### Requisites
### Development requisites

- Volto 18 (2024-03-21: currently in alpha)
- pnpm as package manager
Expand All @@ -252,19 +259,32 @@ For this reason, it only works with pnpm and Volto 18 (currently in alpha) but i
Run `make help` to list the available commands.

```text
help Show this help
install Installs the dev environment using mrs-developer
i18n Sync i18n
format Format codebase
lint Lint Codebase
test Run unit tests
test-ci Run unit tests in CI
start-backend-docker Starts a Docker-based backend for developing
start-test-acceptance-frontend-dev Start acceptance frontend in dev mode
start-test-acceptance-frontend Start acceptance frontend in prod mode
start-test-acceptance-server Start acceptance server
test-acceptance Start Cypress in interactive mode
test-acceptance-headless Run cypress tests in headless mode for CI
help Show this help
install Installs the add-on in a development environment
start Starts Volto, allowing reloading of the add-on during development
build Build a production bundle for distribution of the project with the add-on
build-deps Build dependencies
i18n Sync i18n
ci-i18n Check if i18n is not synced
format Format codebase
lint Lint, or catch and remove problems, in code base
release Release the add-on on npmjs.org
release-dry-run Dry-run the release of the add-on on npmjs.org
test Run unit tests
ci-test Run unit tests in CI
backend-docker-start Starts a Docker-based backend for development
storybook-start Start Storybook server on port 6006
storybook-build Build Storybook
acceptance-frontend-dev-start Start acceptance frontend in development mode
acceptance-frontend-prod-start Start acceptance frontend in production mode
acceptance-backend-start Start backend acceptance server
ci-acceptance-backend-start Start backend acceptance server in headless mode for CI
acceptance-test Start Cypress in interactive mode
ci-acceptance-test Run cypress tests in headless mode for CI
acceptance-a11y-frontend-prod-start Start a11y acceptance frontend in prod mode
ci-acceptance-a11y-backend-start Start acceptance a11y server in CI mode (no terminal attached)
acceptance-a11y-test Start a11y Cypress in interactive mode
ci-acceptance-a11y-test Run a11y cypress tests in headless mode for CI
```

### Development Environment Setup
Expand Down
27 changes: 24 additions & 3 deletions UPGRADE-GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Upgrade Guide

## volto-light-theme 5.0.0

The requirements for VLT have changed:

| VLT version | Volto version |
|-------------|---------------|
| 3.x.x | >= Volto 17.0.0-alpha.16 |
| 4.x.x | < Volto 17.18.0 |
| 5.x.x | >= Volto 17.18.0 or >=Volto 18.0.0-alpha.36 |

## volto-light-theme 4.0.0

The tabbing order in the top header was fixed for accessibility concerns.
It modifies the underlying HTML to move the top header to the bottom, and modifies CSS to adjust.

The MobileNavigation component was updated to be more easily customizable.
The component can now handle infinite navigation depth instead of only three levels, if configured to do so.
The Burger Menu can now be easily customized by overriding the new MobileNavigationToggler.jsx file.

## volto-light-theme 4.0.0

### Block Model v3
Expand All @@ -17,14 +36,16 @@ Example:
config.settings.backgroundColors = [
{
style: {
'--background-color': 'transparent',
'--background-color': '#fff',
'--font-color': '#000',
},
name: 'transparent',
label: 'Transparent',
name: 'white',
label: 'White',
},
{
style: {
'--background-color': '#ecebeb',
'--font-color': '#000',
},
name: 'grey',
label: 'Grey',
Expand Down
2 changes: 1 addition & 1 deletion mrs.developer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"package": "@plone/volto",
"url": "[email protected]:plone/volto.git",
"https": "https://github.com/plone/volto.git",
"tag": "18.0.0-alpha.33"
"tag": "18.0.0-alpha.39"
},
"volto-button-block": {
"develop": true,
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kitconcept/volto-light-theme-dev",
"version": "0",
"version": "5.0.0",
"description": "Volto Light Theme by kitconcept",
"main": "src/index.js",
"types": "src/types/index.d.ts",
Expand Down Expand Up @@ -34,8 +34,8 @@
"build:deps": "pnpm --parallel --filter @plone/registry --filter @plone/components build",
"i18n": "pnpm --filter @kitconcept/volto-light-theme i18n",
"test": "RAZZLE_JEST_CONFIG=$(pwd)/jest-addon.config.js pnpm --filter @plone/volto test",
"lint": "eslint --max-warnings=0 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "eslint --fix 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"lint": "VOLTOCONFIG=$(pwd)/volto.config.js eslint --max-warnings=0 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "VOLTOCONFIG=$(pwd)/volto.config.js eslint --fix 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"prettier": "prettier --check 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"prettier:fix": "prettier --write 'packages/**/src/**/*.{js,jsx,ts,tsx}' ",
"stylelint": "stylelint 'packages/**/src/**/*.{css,scss,less}' --allow-empty-input",
Expand All @@ -49,12 +49,11 @@
"mrs-developer": "^2.2.0"
},
"dependencies": {
"@plone/volto": "workspace:*",
"@plone/registry": "workspace:*",
"@kitconcept/volto-light-theme": "workspace:*",
"@kitconcept/volto-button-block": "workspace:*",
"@kitconcept/volto-separator-block": "workspace:*",
"@kitconcept/volto-heading-block": "workspace:*"
},
"packageManager": "pnpm@8.15.4"
}
"packageManager": "pnpm@9.4.0"
}
8 changes: 7 additions & 1 deletion packages/volto-light-theme/.release-it.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"plugins": {
"../../core/packages/scripts/prepublish.js": {}
},
"hooks": {
"after:bump": [
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
"pipx run towncrier build --yes --version ${version}",
"cp ../../README.md ./ && cp CHANGELOG.md ../../CHANGELOG.md",
"python3 -c 'import json; data = json.load(open(\"../../package.json\")); data[\"version\"] = ${version}; json.dump(data, open(\"../../package.json\", \"w\"), indent=2)'",
"python3 -c 'import json; data = json.load(open(\"../../package.json\")); data[\"version\"] = \"${version}\"; json.dump(data, open(\"../../package.json\", \"w\"), indent=2)'",
"git add ../../CHANGELOG.md ../../package.json"
],
"after:release": "rm .changelog.draft"
},
"npm": {
"publish": false
},
"git": {
"changelog": "pipx run towncrier build --draft --yes --version 0.0.0",
"requireUpstream": false,
Expand Down
Loading

0 comments on commit 9a00f08

Please sign in to comment.