Skip to content
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

[PLIP 6321] Remove Semantic UI from CMSUI #6522

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist
docs
node_modules
packages/registry/lib
build
8 changes: 8 additions & 0 deletions PLIPs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Plone Improvement Proposals (PLIPs)

For details of the PLIP process, read the following.

- [Plone Improvement Proposals (PLIPs)](https://6.docs.plone.org/contributing/core/plips.html)
- [PLIP review](https://6.docs.plone.org/contributing/core/plip-review.html)

You can also [browse the current list of open PLIPs for Volto](https://github.com/plone/volto/labels/03%20type%3A%20feature%20(plip)).
11 changes: 11 additions & 0 deletions packages/cmsui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
extends: [
'plugin:react/jsx-runtime', // We only want this for non-library code (eg. volto add-ons)
],
},
],
};
29 changes: 29 additions & 0 deletions packages/cmsui/.release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"plugins": {
"../scripts/prepublish.js": {}
},
"hooks": {
"after:bump": [
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
"pipx run towncrier build --yes --version ${version}"
],
"after:release": "rm .changelog.draft"
},
"npm": {
"publish": false
},
"git": {
"commitArgs": ["--no-verify"],
"changelog": "pipx run towncrier build --draft --yes --version 0.0.0",
"requireUpstream": false,
"requireCleanWorkingDir": false,
"commitMessage": "Release @plone/cmsui ${version}",
"tagName": "plone-cmsui-${version}",
"tagAnnotation": "Release @plone/cmsui ${version}"
},
"github": {
"release": true,
"releaseName": "@plone/cmsui ${version}",
"releaseNotes": "cat .changelog.draft"
}
}
21 changes: 21 additions & 0 deletions packages/cmsui/.storybook/Logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions packages/cmsui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import type { StorybookConfig } from '@storybook/react-vite';
import { mergeConfig } from 'vite';

const config: StorybookConfig = {
// For some reason the property does not allow negation
// https://github.com/storybookjs/storybook/issues/11181#issuecomment-1535288804
stories: [
'../components/**/*.mdx',
'../components/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
typescript: {
reactDocgen: 'react-docgen-typescript',
reactDocgenTypescriptOptions: {
compilerOptions: {
allowSyntheticDefaultImports: false,
esModuleInterop: false,
},
propFilter: () => true,
},
},
async viteFinal(config) {
return mergeConfig(config, {
build: {
minify: false,
},
});
},
};
export default config;
6 changes: 6 additions & 0 deletions packages/cmsui/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api';
import theme from './theme';

addons.setConfig({
theme,
});
3 changes: 3 additions & 0 deletions packages/cmsui/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script>
window.global = window;
</script>
24 changes: 24 additions & 0 deletions packages/cmsui/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import './storybook-base.css';
import '@plone/components/dist/basic.css';
import '../main.css';
import config from '@plone/registry';
import installSlots from '../config';
import installBlocks from '@plone/blocks';

config.set('slots', {});
config.set('utilities', {});
installSlots(config);
installBlocks(config);

export const parameters = {
backgrounds: {
default: 'light',
},
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
19 changes: 19 additions & 0 deletions packages/cmsui/.storybook/storybook-base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Base styles */
:root {
--basic-font-family: system-ui;
--basic-font-size: 16px;
background: var(--background-color);
font-family: var(--basic-font-family);
font-size: var(--basic-font-size);
line-height: 1.5;
}

.sbdocs.sbdocs-content {
p {
font-size: 16px;
}
}

#storybook-root {
width: 100vw;
}
10 changes: 10 additions & 0 deletions packages/cmsui/.storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { create } from '@storybook/theming/create';
import logo from './Logo.svg';

export default create({
base: 'light',
brandTitle: '@plone/components StoryBook',
brandUrl: 'https://plone-components.netlify.app/',
brandImage: logo,
brandTarget: '_self',
});
14 changes: 14 additions & 0 deletions packages/cmsui/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": ["stylelint-config-idiomatic-order"],
"plugins": ["stylelint-prettier"],
"overrides": [
{
"files": ["**/*.scss"],
"customSyntax": "postcss-scss"
}
],
"rules": {
"prettier/prettier": true,
"order/properties-alphabetical-order": null
}
}
11 changes: 11 additions & 0 deletions packages/cmsui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# @plone/cmsui Release Notes

<!-- Do *NOT* add new change log entries to this file.
Instead create a file in the news directory.
For helpful instructions, see:
https://6.docs.plone.org/contributing/index.html#change-log-entry
-->

<!-- towncrier release notes start -->

## 1.0.0 (unreleased)
8 changes: 8 additions & 0 deletions packages/cmsui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# `@plone/cmsui`

This package provides default structural slots for Plone 7 and the API-first story.

> [!WARNING]
> This package or app is experimental.
> The community offers no support whatsoever for it.
> Breaking changes may occur without notice.
Loading
Loading