Skip to content

Commit 0443abb

Browse files
committed
feat: add APPSMITH_HIDE_HELP_BUTTON env var to hide help/support icon
Introduces a runtime config flag that, when enabled, hides the help/support button (the "?" menu containing documentation, chat, send-support-info and what's-new) both on the applications home page and inside the app editor. - ce/configs: thread `hideHelpButton` through INJECTED_CONFIGS, getConfigsFromEnvVars and getAppsmithConfigs (mirrors the existing disableIframeWidgetSandbox pattern) - public/index.html: inject APPSMITH_HIDE_HELP_BUTTON into window.APPSMITH_FEATURE_CONFIGS for runtime (no rebuild) configuration - HomepageHeaderAction / HelpButton: gate render on the flag - EnvVariables.java: register the env var so it is manageable server-side - docker.env.sh, helm values/README/snapshot, jest.config: defaults set to false so existing installs are unaffected Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E72oeKwZBo84Wemo4TXrd2
1 parent 4a30154 commit 0443abb

11 files changed

Lines changed: 26 additions & 4 deletions

File tree

app/client/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ module.exports = {
116116
disableIframeWidgetSandbox: parseConfig(
117117
"__APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX__",
118118
),
119+
hideHelpButton: parseConfig("__APPSMITH_HIDE_HELP_BUTTON__"),
119120
},
120121
},
121122
};

app/client/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@
261261
disableIframeWidgetSandbox: parseConfig(
262262
'{{env "APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX"}}',
263263
),
264+
hideHelpButton: parseConfig('{{env "APPSMITH_HIDE_HELP_BUTTON"}}'),
264265
customerPortalUrl:
265266
parseConfig('{{env "APPSMITH_CUSTOMER_PORTAL_URL"}}') ||
266267
"https://customer.appsmith.com",

app/client/src/ce/configs/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface INJECTED_CONFIGS {
5959
googleRecaptchaSiteKey: string;
6060
supportEmail: string;
6161
disableIframeWidgetSandbox: boolean;
62+
hideHelpButton: boolean;
6263
pricingUrl: string;
6364
customerPortalUrl: string;
6465
}
@@ -132,6 +133,9 @@ export const getConfigsFromEnvVars = (): INJECTED_CONFIGS => {
132133
.APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX
133134
? process.env.APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX.length > 0
134135
: false,
136+
hideHelpButton: process.env.APPSMITH_HIDE_HELP_BUTTON
137+
? process.env.APPSMITH_HIDE_HELP_BUTTON.length > 0
138+
: false,
135139
pricingUrl: process.env.REACT_APP_PRICING_URL || "",
136140
customerPortalUrl: process.env.REACT_APP_CUSTOMER_PORTAL_URL || "",
137141
};
@@ -276,6 +280,10 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => {
276280
ENV_CONFIG.disableIframeWidgetSandbox ||
277281
APPSMITH_FEATURE_CONFIGS?.disableIframeWidgetSandbox ||
278282
false,
283+
hideHelpButton:
284+
ENV_CONFIG.hideHelpButton ||
285+
APPSMITH_FEATURE_CONFIGS?.hideHelpButton ||
286+
false,
279287
pricingUrl:
280288
ENV_CONFIG.pricingUrl || APPSMITH_FEATURE_CONFIGS?.pricingUrl || "",
281289
customerPortalUrl:

app/client/src/ce/configs/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export interface AppsmithUIConfigs {
5858
};
5959
appsmithSupportEmail: string;
6060
disableIframeWidgetSandbox: boolean;
61+
hideHelpButton: boolean;
6162
pricingUrl: string;
6263
customerPortalUrl: string;
6364
}

app/client/src/pages/Editor/HelpButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ import BetterbugsUtil from "utils/Analytics/betterbugs";
4646
import { isAirgapped } from "ee/utils/airgapHelpers";
4747
import { useBetterbugsMetadata } from "utils/hooks/useBetterbugsMetadata";
4848

49-
const { appVersion, betterbugs, cloudHosting } = getAppsmithConfigs();
49+
const { appVersion, betterbugs, cloudHosting, hideHelpButton } =
50+
getAppsmithConfigs();
5051

5152
const HelpFooter = styled.div`
5253
display: flex;
@@ -227,6 +228,8 @@ function HelpButton() {
227228
bootPylon(user);
228229
}, [user?.email, user?.emailVerificationHash, user?.name, user?.username]);
229230

231+
if (hideHelpButton) return null;
232+
230233
return (
231234
<Menu
232235
onOpenChange={(open) => {

app/client/src/pages/common/SearchBar/HomepageHeaderAction.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const HomepageHeaderAction = ({
7373
);
7474
const isHomePage = useRouteMatch("/applications")?.isExact;
7575
const isAirgappedInstance = isAirgapped();
76-
const { appVersion } = getAppsmithConfigs();
76+
const { appVersion, hideHelpButton } = getAppsmithConfigs();
7777
const howMuchTimeBefore = howMuchTimeBeforeText(appVersion.releaseDate);
7878
const [showIntercomConsent, setShowIntercomConsent] = useState(false);
7979
const isAiAgentInstanceEnabled = useSelector(getIsAiAgentInstanceEnabled);
@@ -104,7 +104,7 @@ const HomepageHeaderAction = ({
104104
/>
105105
</Tooltip>
106106
)}
107-
{!isAirgappedInstance && (
107+
{!isAirgappedInstance && !hideHelpButton && (
108108
<Menu
109109
onOpenChange={(open) => {
110110
if (open) {

app/server/appsmith-server/src/main/java/com/appsmith/server/constants/EnvVariables.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public enum EnvVariables {
2525
APPSMITH_CUSTOM_DOMAIN,
2626
APPSMITH_ALLOWED_FRAME_ANCESTORS,
2727
APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX,
28+
APPSMITH_HIDE_HELP_BUTTON,
2829
APPSMITH_NEW_RELIC_ACCOUNT_ENABLE,
2930
APPSMITH_VERBOSE_LOGGING_ENABLED
3031
}

deploy/docker/fs/opt/appsmith/templates/docker.env.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,8 @@ APPSMITH_ALLOWED_FRAME_ANCESTORS="'self' *"
8686
8787
APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX=false
8888
89+
# Set this to true to hide the help/support button (the "?" menu with documentation,
90+
# chat and support options) on the home page and in the app editor.
91+
APPSMITH_HIDE_HELP_BUTTON=false
92+
8993
EOF

deploy/helm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ for prerequisites, step-by-step setup, and platform-specific instructions (EKS,
1616
| Key | Type | Default | Description |
1717
|-----|------|---------|-------------|
1818
| secretName | string | `""` | Name of an existing Secret for APPSMITH_* env vars (empty = chart creates one) |
19-
| applicationConfig | object | `{"APPSMITH_CLIENT_LOG_LEVEL":"","APPSMITH_CUSTOM_DOMAIN":"","APPSMITH_DB_URL":"","APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX":"false","APPSMITH_DISABLE_TELEMETRY":"","APPSMITH_ENCRYPTION_PASSWORD":"","APPSMITH_ENCRYPTION_SALT":"","APPSMITH_FORM_LOGIN_DISABLED":"","APPSMITH_KEYCLOAK_DB_DRIVER":"","APPSMITH_KEYCLOAK_DB_PASSWORD":"","APPSMITH_KEYCLOAK_DB_URL":"","APPSMITH_KEYCLOAK_DB_USERNAME":"","APPSMITH_LICENSE_KEY":"","APPSMITH_MAIL_ENABLED":"","APPSMITH_MAIL_FROM":"","APPSMITH_MAIL_HOST":"","APPSMITH_MAIL_PASSWORD":"","APPSMITH_MAIL_PORT":"","APPSMITH_MAIL_SMTP_AUTH":"","APPSMITH_MAIL_SMTP_TLS_ENABLED":"","APPSMITH_MAIL_USERNAME":"","APPSMITH_OAUTH2_GITHUB_CLIENT_ID":"","APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET":"","APPSMITH_OAUTH2_GOOGLE_CLIENT_ID":"","APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET":"","APPSMITH_RECAPTCHA_ENABLED":"","APPSMITH_RECAPTCHA_SECRET_KEY":"","APPSMITH_RECAPTCHA_SITE_KEY":"","APPSMITH_REDIS_URL":"","APPSMITH_REPLY_TO":"","APPSMITH_SIGNUP_DISABLED":""}` | Map of APPSMITH_* environment variables for the application container |
19+
| applicationConfig | object | `{"APPSMITH_CLIENT_LOG_LEVEL":"","APPSMITH_CUSTOM_DOMAIN":"","APPSMITH_DB_URL":"","APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX":"false","APPSMITH_DISABLE_TELEMETRY":"","APPSMITH_ENCRYPTION_PASSWORD":"","APPSMITH_ENCRYPTION_SALT":"","APPSMITH_FORM_LOGIN_DISABLED":"","APPSMITH_HIDE_HELP_BUTTON":"false","APPSMITH_KEYCLOAK_DB_DRIVER":"","APPSMITH_KEYCLOAK_DB_PASSWORD":"","APPSMITH_KEYCLOAK_DB_URL":"","APPSMITH_KEYCLOAK_DB_USERNAME":"","APPSMITH_LICENSE_KEY":"","APPSMITH_MAIL_ENABLED":"","APPSMITH_MAIL_FROM":"","APPSMITH_MAIL_HOST":"","APPSMITH_MAIL_PASSWORD":"","APPSMITH_MAIL_PORT":"","APPSMITH_MAIL_SMTP_AUTH":"","APPSMITH_MAIL_SMTP_TLS_ENABLED":"","APPSMITH_MAIL_USERNAME":"","APPSMITH_OAUTH2_GITHUB_CLIENT_ID":"","APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET":"","APPSMITH_OAUTH2_GOOGLE_CLIENT_ID":"","APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET":"","APPSMITH_RECAPTCHA_ENABLED":"","APPSMITH_RECAPTCHA_SECRET_KEY":"","APPSMITH_RECAPTCHA_SITE_KEY":"","APPSMITH_REDIS_URL":"","APPSMITH_REPLY_TO":"","APPSMITH_SIGNUP_DISABLED":""}` | Map of APPSMITH_* environment variables for the application container |
2020
| image | object | `{"pullPolicy":"IfNotPresent","pullSecrets":"","registry":"index.docker.io","repository":"appsmith/appsmith-ee","tag":"latest"}` | Appsmith container image configuration |
2121
| _image | object | `{}` | DEPRECATED: use image instead. Backwards-compatible override merged on top of image. |
2222

deploy/helm/tests/__snapshot__/defaults_snapshot_test.yaml.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
APPSMITH_DB_URL: |
1515
mongodb+srv://root:password@appsmith-mongodb.NAMESPACE.svc.cluster.local/appsmith?retryWrites=true&authSource=admin&ssl=false
1616
APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX: "false"
17+
APPSMITH_HIDE_HELP_BUTTON: "false"
1718
APPSMITH_KEYCLOAK_DB_DRIVER: postgresql
1819
APPSMITH_KEYCLOAK_DB_PASSWORD: password
1920
APPSMITH_KEYCLOAK_DB_URL: RELEASE-NAME-postgresql.NAMESPACE.svc.cluster.local:5432/keycloak

0 commit comments

Comments
 (0)