Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
16 changes: 16 additions & 0 deletions docs/documentation/upgrading/topics/changes/changes-26_0_0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,19 @@ If the table currently contains more than 300.000 entries,
on the console during migration. In this case, the statements must be run manually in the DB after {project_name}'s startup.

Also, the `kc.org` and `hideOnLoginPage` configuration attributes were migrated to the identity provider itself, to allow for more efficient queries when searching for providers. As such, API clients should use the `getOrganizationId/setOrganizationId` and `isHideOnLogin/setHideOnLogin` methods in the `IdentityProviderRepresentation`, and avoid setting these properties using the legacy config attributes that are now deprecated.

= Paths for `common` theme resources have changed

Some of the paths for the `common` resources of the `keycloak` theme have changed, specifically the resources for third-party libraries. Make sure to update your custom themes accordingly:

- `node_modules/patternfly/dist` is now `vendor/patternfly-v3`
- `node_modules/@patternfly/patternfly` is now `vendor/patternfly-v4`
- `node_modules/@patternfly-v5/patternfly` is now `vendor/patternfly-v5`
- `node_modules/rfc4648/lib` is now `vendor/rfc4648`

Additionally, the following resources have been removed from the `common` theme:

- `node_modules/alpinejs`
- `node_modules/jquery`

If you previously used any of the removed resources in your theme, make sure to add them to your own theme resources instead.
34 changes: 2 additions & 32 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packages:
- js/apps/*
- js/libs/*
- themes/src/main/resources/theme/keycloak/common/resources
- themes
1 change: 0 additions & 1 deletion themes/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"dependencies": {
"@patternfly-v5/patternfly": "npm:@patternfly/patternfly@^5.3.1",
"@patternfly/patternfly": "^4.224.5",
"alpinejs": "^3.14.1",
"jquery": "^3.7.1",
"patternfly": "^3.59.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
101 changes: 84 additions & 17 deletions themes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
<packaging>jar</packaging>

<properties>
<dir.common>src/main/resources/theme/keycloak/common/resources</dir.common>
<!-- ignore folders for incremental builds by the maven build cache plugin -->
<maven.build.cache.exclude.value.1>src/main/resources/theme/keycloak/common/resources/node_modules</maven.build.cache.exclude.value.1>
<maven.build.cache.exclude.value.2>src/main/resources/theme/keycloak/common/resources/vendor</maven.build.cache.exclude.value.2>
<maven.build.cache.exclude.value.3>src/main/resources/theme/keycloak.v2/welcome/node_modules</maven.build.cache.exclude.value.3>
<maven.build.cache.exclude.value.4>src/main/resources/theme/keycloak.v2/welcome/resources/vendor</maven.build.cache.exclude.value.4>
<dir.vendor>theme/keycloak/common/resources/vendor</dir.vendor>
</properties>

<dependencies>
Expand All @@ -40,20 +35,92 @@
</resources>

<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/node_modules/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
<workingDirectory>src/main/resources/theme/keycloak/common/resources</workingDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-rfc4648</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/rfc4648</outputDirectory>
<resources>
<resource>
<directory>node_modules/rfc4648/lib</directory>
<includes>
<include>rfc4648.js</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-patternfly-v3</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v3</outputDirectory>
<resources>
<resource>
<directory>node_modules/patternfly/dist</directory>
<includes>
<include>css/patternfly.min.css</include>
<include>css/patternfly-additions.min.css</include>
<include>fonts/**</include>
<include>img/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-patternfly-v4</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v4</outputDirectory>
<resources>
<resource>
<directory>node_modules/@patternfly/patternfly</directory>
<includes>
<include>patternfly.min.css</include>
<include>assets/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-patternfly-v5</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/${dir.vendor}/patternfly-v5</outputDirectory>
<resources>
<resource>
<directory>node_modules/@patternfly-v5/patternfly</directory>
<includes>
<include>patternfly.min.css</include>
<include>patternfly-addons.css</include>
<include>assets/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { nodeResolve } from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import replace from "@rollup/plugin-replace";
import terser from "@rollup/plugin-terser";
import path from "node:path";

const plugins = [
nodeResolve(),
Expand All @@ -16,22 +17,24 @@ const plugins = [
terser(),
];

const targetDir = "target/classes/theme/keycloak/common/resources/vendor";

export default defineConfig([
{
input: [
"node_modules/react/cjs/react.production.min.js",
"node_modules/react/cjs/react-jsx-runtime.production.min.js",
],
output: {
dir: "vendor/react",
dir: path.join(targetDir, "react"),
format: "es",
},
plugins,
},
{
input: "node_modules/react-dom/cjs/react-dom.production.min.js",
output: {
dir: "vendor/react-dom",
dir: path.join(targetDir, "react-dom"),
format: "es",
},
external: ["react"],
Expand Down
2 changes: 1 addition & 1 deletion themes/src/main/resources/theme/base/login/template.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<script type="importmap">
{
"imports": {
"rfc4648": "${url.resourcesCommonPath}/node_modules/rfc4648/lib/rfc4648.js"
"rfc4648": "${url.resourcesCommonPath}/vendor/rfc4648/rfc4648.js"
}
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<script type="importmap">
{
"imports": {
"rfc4648": "${url.resourcesCommonPath}/node_modules/rfc4648/lib/rfc4648.js"
"rfc4648": "${url.resourcesCommonPath}/vendor/rfc4648/rfc4648.js"
}
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ parent=keycloak
import=common/keycloak

styles=css/styles.css
stylesCommon=node_modules/@patternfly-v5/patternfly/patternfly.min.css node_modules/@patternfly-v5/patternfly/patternfly-addons.css
stylesCommon=vendor/patternfly-v5/patternfly.min.css vendor/patternfly-v5/patternfly-addons.css

kcFormGroupClass=pf-v5-c-form__group
kcLabelClass=pf-v5-c-form__label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ parent=base
import=common/keycloak

styles=css/login.css
stylesCommon=node_modules/@patternfly/patternfly/patternfly.min.css node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css lib/pficon/pficon.css
stylesCommon=vendor/patternfly-v4/patternfly.min.css vendor/patternfly-v3/css/patternfly.min.css vendor/patternfly-v3/css/patternfly-additions.min.css lib/pficon/pficon.css

meta=viewport==width=device-width,initial-scale=1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import=common/keycloak

stylesCommon=node_modules/@patternfly-v5/patternfly/patternfly.min.css node_modules/@patternfly-v5/patternfly/patternfly-addons.css
stylesCommon=vendor/patternfly-v5/patternfly.min.css vendor/patternfly-v5/patternfly-addons.css
styles=css/welcome.css

# When set to true, the user will be redirected to the Administration Console if an administrative users already exists.
Expand Down