Self-hosted: setting for the URL the app icon (logo) opens

Open
#5,846 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Start with src/main/webapp/js/diagramly/App.js and App.prototype.appIconClicked, where the issue identifies the current fallback links and existing GitLab setting. Trace how configuration values reach the app and how the Docker entrypoint exposes settings. Done means the device, browser, and no-file cases use the configured fallback URL when set, preserve current defaults when unset, and have coverage for both behaviors.

Written by the indexing model from the issue text.

Description

enhancement
Summary

In a self-hosted draw.io (Docker image jgraph/drawio), clicking the draw.io logo in the top-left corner opens https://www.drawio.com/ when no file is open, and https://get.draw.io/ when the file is saved to the device. For an internal deployment we want it to open our own instance, i.e. DRAWIO_BASE_URL. There is no setting for this.

Where

src/main/webapp/js/diagramly/App.js, App.prototype.appIconClicked (v31.4.5):

else if (mode == App.MODE_DEVICE)
{
this.openLink('https://get.draw.io/');
}
else
{
this.openLink('https://www.drawio.com/');
}

The same function already uses a setting for GitLab (DRAWIO_GITLAB_URL), and file/cloud cases open the file's own location, which is fine.

Request

A configuration option for the fallback link, for example a DRAWIO_CONFIG key or a window.DRAWIO_* variable (e.g. DRAWIO_APP_ICON_URL) that the Docker entrypoint can set from an env var. It would be used for the device/browser/no-file cases and default to today's behaviour when unset.

Workaround we use today

A snippet appended to js/PostConfig.js at container start that wraps App.prototype.appIconClicked and opens window.DRAWIO_BASE_URL for those cases. It works, but it depends on internal function names and can silently break on upgrade, so we'd prefer a supported setting.

Environment
  • jgraph/drawio:31.4.5 Docker image, served from our own domain, DRAWIO_BASE_URL set
Dominant language
JavaScript
Stars
9.4k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jgraph/drawio

All issues in jgraph/drawio

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.