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

Add initial plugin system #239

Merged
merged 39 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3d28740
Introduce di container and services
vin0401 Apr 24, 2024
ef359ce
Prepare mechanism to include CSS/JS files from bundles
markus-moser Apr 24, 2024
840b583
Apply php-cs-fixer changes
markus-moser Apr 24, 2024
9408f52
Fix wrong exception
markus-moser Apr 24, 2024
84aeeac
Merge remote-tracking branch 'origin/bundle-system' into bundle-system
markus-moser Apr 24, 2024
67a14a3
Make it compatible with PHP 8.1
markus-moser Apr 24, 2024
8cf504a
Apply php-cs-fixer changes
markus-moser Apr 24, 2024
465be76
Merge branch 'bundle-system' of https://github.com/pimcore/studio-ui-…
vin0401 Apr 24, 2024
52a3bc3
Drop usage of webpack encore and make used entrypoint configurable fo…
markus-moser Apr 24, 2024
8db6824
Merge remote-tracking branch 'origin/bundle-system' into bundle-system
markus-moser Apr 24, 2024
aa3ad10
Apply php-cs-fixer changes
markus-moser Apr 24, 2024
27090b4
Cleanup code a bit
markus-moser Apr 24, 2024
b8e13d4
Merge branch 'bundle-system' of https://github.com/pimcore/studio-ui-…
vin0401 Apr 24, 2024
6856553
Simplify naming as the mechanism is now unified and also used for the…
markus-moser Apr 25, 2024
3d43d79
Apply php-cs-fixer changes
markus-moser Apr 25, 2024
71fc1bb
Prototype type and api sharing
vin0401 Apr 26, 2024
2d614a5
Add initial plugin lifecycle
vin0401 Apr 29, 2024
e40f985
Add folder tab manager to service container
vin0401 Apr 29, 2024
59c32ab
Add vendor build
vin0401 Apr 30, 2024
706c4b2
Merge remote-tracking branch 'origin/bundle-system' into 103-plugin-s…
markus-moser Apr 30, 2024
a7e38e6
Refactor entrypoints json handling
markus-moser Apr 30, 2024
37d59ce
Add initial module system
vin0401 May 2, 2024
ad4d0cc
Merge branch '103-plugin-system' of https://github.com/pimcore/studio…
vin0401 May 2, 2024
368dbee
Merge branch '1.x' of https://github.com/pimcore/studio-ui-bundle int…
vin0401 May 6, 2024
7a45686
Add latest build
vin0401 May 6, 2024
0f73f2d
Add initial sdk example
vin0401 May 7, 2024
9427d27
Add peer dependencies for bundles
vin0401 May 8, 2024
4bcf547
Add service for management of icons
vin0401 May 10, 2024
d124f26
Add dll for studio core to reduce plugin size
vin0401 May 10, 2024
430bf9d
Apply php-cs-fixer changes
vin0401 May 10, 2024
7f09485
Remove unused defintion file
vin0401 May 10, 2024
b9510a7
Merge branch '103-plugin-system' of https://github.com/pimcore/studio…
vin0401 May 10, 2024
fd91244
Update paths for test directory
vin0401 May 13, 2024
887030d
Do not track package files
vin0401 May 13, 2024
e60d742
Ignore dist files
vin0401 May 13, 2024
beeb5f8
Track build related files
vin0401 May 13, 2024
9c82a6d
Update frontend build
vin0401 May 13, 2024
a0f2b15
Migrate storybook to latest app state
vin0401 May 13, 2024
6402187
Do not reference core-dll during development
vin0401 May 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ Thumbs.db
/var
/vendor

# Frontend related files
assets/node_modules
assets/dist/build

# code style fixer
.php_cs
Expand Down
22 changes: 21 additions & 1 deletion assets/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
* @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL
*/

import type { Options } from '@swc/core';
import type { StorybookConfig } from "@storybook/react-webpack5";
import path from "path";

const config: StorybookConfig = {
stories: ["../js/**/*.mdx", "../js/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
typescript: {

},
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
Expand All @@ -38,7 +42,7 @@ const config: StorybookConfig = {
webpackFinal: async (config) => {
config.resolve!.alias = {
...config.resolve!.alias,
"@Pimcore": path.resolve(__dirname, "../js/src"),
"@Pimcore": path.resolve(__dirname, "../js/src/core"),
};

// disable whatever is already set to load SVGs
Expand All @@ -65,6 +69,22 @@ const config: StorybookConfig = {
});

return config;
},

// Enable typescript decorators for storybook
swc: (config: Options): Options => {
return {
...config,
jsc: {
...config.jsc,
parser: {
syntax: "typescript",
tsx: true,
dynamicImport: true,
decorators: true,
},
},
};
}
};

Expand Down
33 changes: 23 additions & 10 deletions assets/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@
* @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL
*/

import React from "react";
import '../js/src/bootstrap';
import React, { useEffect, useState } from "react";
import '../js/src/core/bootstrap';
import type { Preview } from "@storybook/react";
import "../css/globals.css";
import { GlobalProvider } from "../js/src/modules/app/global-provider";
import { GlobalProvider } from "../js/src/core/modules/app/global-provider";
import { App } from 'antd'
import { Pimcore } from '../js/src/core/app/public-api'
import { moduleSystem } from "../js/src/core/app/module-system/module-system";

declare global {
interface Window {
Pimcore: typeof Pimcore
}
}

window.Pimcore = Pimcore;
moduleSystem.initModules();

const preview: Preview = {
parameters: {
Expand All @@ -29,13 +40,15 @@ const preview: Preview = {
},

decorators: [
(Story) => (
<GlobalProvider>
<App>
<Story />
</App>
</GlobalProvider>
),
(Story) => {
return (
<GlobalProvider>
<App>
<Story />
</App>
</GlobalProvider>
)
}
],
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
import { type ConfigFile } from '@rtk-query/codegen-openapi'

const config: ConfigFile = {
schemaFile: '../assets/api/docs.jsonopenapi.json',
apiFile: '../src/app/api/pimcore/index.ts',
schemaFile: './docs.jsonopenapi.json',
apiFile: '../js/src/app/api/pimcore/index.ts',
apiImport: 'api',
outputFiles: {
'../src/modules/asset/asset-api-slice.gen.ts': {
'../js/modules/asset/asset-api-slice.gen.ts': {
filterEndpoints: [/asset/i]
},
'../src/modules/app/translations/translations-api-slice.gen.ts': {
'../js/modules/app/translations/translations-api-slice.gen.ts': {
filterEndpoints: [/translation/i]
}
},
Expand Down
1 change: 1 addition & 0 deletions assets/dist/core-dll/core-manifest.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions assets/dist/sdk/entrypoints.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"entrypoints": {
"main": {
"js": [
"/dist/main.js"
]
}
}
}
2 changes: 2 additions & 0 deletions assets/dist/sdk/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading