-
Notifications
You must be signed in to change notification settings - Fork 363
Fix/custom layout build #5672
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
Fix/custom layout build #5672
Conversation
Added prerequisites for adding a custom layout design.
Added notes and tips for adding a custom layout to the login page.
Updated notes and tips for Maven configuration and troubleshooting.
|
Hey @DilshanSenarath , can i have some feedback about this PR plz. should i rewrite all of the instructions in this section |
|
Hi @drsamitha , Can you add a final screenshot of the updated page to the PR? |
| - `npm v8.x` | ||
| - `PNPM v8.x ` | ||
| - `yarn v1.22.x` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you verify that the repository builds successfully with all of these package managers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
identity-apps only works with pnpm.
Can we have a screenshot of a successful build to confirm your changes are working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the responses! I’m honestly not confident about this PR yet and I think this is also not enough for address the issue. Could you please suggest some instructions or a guide to help make the fix?
Also, what if we additionally add two separate scripts for Windows and Linux to the documentation section that automate the confusing copy-pasting and build steps? That should help reduce dependency failure errors, right? For now i use this basic script,
#!/usr/bin/env bash
set -e
if [ $# -ne 2 ]; then
echo "Usage: $0 <IS_HOME_PATH> <IDENTITY_APPS_HOME_PATH>"
exit 1
fi
IS_HOME="$1"
IDENTITY_APPS_HOME="$2"
WEBAPPS="$IS_HOME/repository/deployment/server/webapps"
AUTH_EP="$WEBAPPS/authenticationendpoint"
EXTENSIONS_DIR="$AUTH_EP/extensions/layouts/custom/carbon.super"
ASSETS_DIR="$EXTENSIONS_DIR/assets"
LAYOUT_SRC_DIR="$IDENTITY_APPS_HOME/identity-apps-core/components/login-portal-layouts/layouts"
LAYOUT_BUILD_DIR="$IDENTITY_APPS_HOME/identity-apps-core/components/login-portal-layouts"
LAYOUT_COMPILED_DST="$IDENTITY_APPS_HOME/identity-apps-core/apps/authentication-portal/src/main/webapp/extensions/layouts"
FINAL_DST="$AUTH_EP/extensions/layouts"
echo "==> Creating folder structure under Identity Server..."
mkdir -p "$ASSETS_DIR"
echo "==> Downloading layout files..."
curl -L -o "$EXTENSIONS_DIR/body.html" "https://raw.githubusercontent.com/wso2/docs-is/master/en/identity-server/7.2.0/docs/assets/code-samples/body.html"
curl -L -o "$EXTENSIONS_DIR/styles.css" "https://raw.githubusercontent.com/wso2/docs-is/master/en/identity-server/7.2.0/docs/assets/code-samples/style.css"
curl -L -o "$EXTENSIONS_DIR/script.js" "https://raw.githubusercontent.com/wso2/docs-is/master/en/identity-server/7.2.0/docs/assets/code-samples/script.js"
curl -L -o "$ASSETS_DIR/illustration.svg" "https://raw.githubusercontent.com/wso2/docs-is/master/en/identity-server/7.2.0/docs/assets/code-samples/illustration.svg"
echo "==> Copying custom layout to Identity Apps source tree..."
mkdir -p "$LAYOUT_SRC_DIR"
cp -r "$AUTH_EP/extensions/layouts/custom" "$LAYOUT_SRC_DIR/"
echo "==> Building Identity Apps (this may take a while)..."
cd "$LAYOUT_BUILD_DIR"
mvn clean install -q
echo "==> Copying compiled layout back to Identity Server..."
mkdir -p "$FINAL_DST"
cp -r "$LAYOUT_COMPILED_DST/custom" "$FINAL_DST/"
echo "==> All done!"
echo
echo "Your custom layout has been built and applied to the Identity Server."
echo "If the server was running, restart it before verifying the login page."
echo
echo "Custom layout directory: $FINAL_DST/custom"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you verify that the repository builds successfully with all of these package managers?
Only with the pnpm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
identity-appsonly works withpnpm.Can we have a screenshot of a successful build to confirm your changes are working?
did u mean Screenshots of custom layout builds?
if so, Identity apps successfully build the custom layout pages.
PS - browser messed up the theme

TBH, i cant remember why i have included the other package managers.
|
Docs are updated with the minimal requirements to build custom layouts. |
Purpose
Resolve the issue