Skip to content

Commit

Permalink
feat: allow customization of the dhis2 app icon (#265)
Browse files Browse the repository at this point in the history
* feat: allow customization of the dhis2 app icon

* docs: don't specify what the default icon will be
  • Loading branch information
amcgee authored Jan 16, 2020
1 parent 3f056d1 commit 86f1cd7
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 57 deletions.
16 changes: 8 additions & 8 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 1

update_configs:
- package_manager: "javascript"
directory: "/"
update_schedule: "weekly"
version_requirement_updates: "increase_versions_if_necessary"
- package_manager: "javascript"
directory: "/examples/simple-app"
update_schedule: "weekly"
version_requirement_updates: "increase_versions_if_necessary"
- package_manager: 'javascript'
directory: '/'
update_schedule: 'weekly'
version_requirement_updates: 'increase_versions_if_necessary'
- package_manager: 'javascript'
directory: '/examples/simple-app'
update_schedule: 'weekly'
version_requirement_updates: 'increase_versions_if_necessary'
32 changes: 16 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
language: node_js
node_js:
- lts/*
- lts/*
script:
- yarn build
- yarn build
deploy:
- provider: script
skip_cleanup: true
script:
- npx @dhis2/cli utils release --publish npm
on:
tags: false
branch: master
- provider: script
skip_cleanup: true
script:
- npx @dhis2/cli utils release --publish npm
on:
tags: false
branch: master
env:
global:
- GIT_AUTHOR_NAME=@dhis2-bot
- [email protected]
- GIT_COMMITTER_NAME=@dhis2-bot
- [email protected]
- secure: NqFcKQzLDz7TOwEjjnMJ3YpLvZ8bK79F+a33S/Mi/k9y5Ocs1wmLLdsiROK3MjzGzuF9c6lLFbCQqrluGkSjVZfWpRVAWWNlzCdL62RYR49koxr5f7k0d5CHHYK//+/i9TKklVLc6JX454flp6swRqGsibkpbq6MetnQLjtqknex4pLKNvEEr7LZnnUjA/5xm3p1W04zyvnvpZi5yyrrc7Wycc/O76doqZ4YFs1wBg92z14T37lqERc24c7rJZN4KFwVNeDOEczemm71nLv1fmDdsHNO1d3ERhC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- GIT_AUTHOR_NAME=@dhis2-bot
- [email protected]
- GIT_COMMITTER_NAME=@dhis2-bot
- [email protected]
- secure: NqFcKQzLDz7TOwEjjnMJ3YpLvZ8bK79F+a33S/Mi/k9y5Ocs1wmLLdsiROK3MjzGzuF9c6lLFbCQqrluGkSjVZfWpRVAWWNlzCdL62RYR49koxr5f7k0d5CHHYK//+/i9TKklVLc6JX454flp6swRqGsibkpbq6MetnQLjtqknex4pLKNvEEr7LZnnUjA/5xm3p1W04zyvnvpZi5yyrrc7Wycc/O76doqZ4YFs1wBg92z14T37lqERc24c7rJZN4KFwVNeDOEczemm71nLv1fmDdsHNO1d3ERhCAy0ihPhZRyjtx5f18H4XYZzh48UZvDkozoAlFyE4rDQ2F9AguPbysNXTgTFoEPEsuVcZ55rwY57hBmX3wAa/KINX4WzVxtsnOkEKXkiDAEtdKQmk0Amrpa8A4AABiWXA9ZRLuDyDmob0O4Cx/VpLTKpkHwFGxQzhtNfr8vQsmAlYXg3wFQbLZGJX+fp7NdvMlczfq12SlNFea/BcAJoGGc9NlTq/tCDksA8T6SZsZ0we97Y0sM896cG044WC86bZJ7leXFTjDitTnc+vg0LPpPcH2INHvSPQubGk/Um1qxtrzi1IDHqgHa3MUZcsfcTZl1w61Lo2FC2OBD1nHwieS4vTYAXJtjjCYQcuiQejH9LMYaaKjEfYnaQE1xZ94J3t/s8GC1UM=
- secure: HHKfk5sD8g4ETCkUC225gG/kOvgqD6JSHkYuhQuCQ1AVNUF0V1QD6mL6hJ5Gp6ikscyUpZenbnIPkQ4iHL4VfywAb3bs4jEJMTlGHNDkVSAD2v4pJUeGcdiqC+lbmrWpQM8oigwigl5AGh/Or5Om3QfpOZJLfNcYVYhQH729xYZFFLDFYp3H+FI9wVcLhD0luh9itCXxoNIclPiyb3aiUBJqfd4rQEXC3LKnfWbuHJ4CttI44t+kEaYdlWf75IpWsug/+J88yK80vNF1wpf5u/CIvYbBsuP1/k3NClvyqCl+LCUuu4Xsiu2n4SL+R43zHhi2ekftGOBXqMfd9axifczAZG75sC7dmiQW0YDtN/2tBAWJ4LVfX+/cWzW7UfPY2VfN2/6sg3guQVXr1CsMKXklphx6Ff9l76ymz4ldycE4wS2wL7DluGuMWybZSwxPZeiNBo22LuT38ocY4QZjzbsx4Zs/opRnOrWHavpJJtcGiGSv6QYdgEivQmIf9ZaQPgrL2iffPR6dDY6HpesP4AMYUFWzwY6WJDBOkerstU/ywRupx5Si97edGbOrAJf37vPQcnvzG+ULp2c2uomjU8ZbHkN099LOo5fBxtlTZghWDJBpRSzgDtc3tF+GonoareOnLiZ+0H2TymK39gmb0crC/Iw0Zkd/KtNjmho6ARk=
2 changes: 1 addition & 1 deletion cli/src/lib/generateManifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = (paths, config, publicUrl) => {
},
},
icons: {
'48': 'favicon-48x48.png',
'48': 'dhis2-app-icon.png',
},
developer: config.author,

Expand Down
1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [Dependencies](usage/dependencies)
- [CSS](usage/css)
- [Static Files](usage/static-files)
- [Custom App Icon](usage/app-icon)
- [**Architecture**](architecture)
- [**Troubleshooting**](troubleshooting.md)
-  
Expand Down
18 changes: 9 additions & 9 deletions docs/config/d2-config-js-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ The following configuration properties are supported:

```js
const config = {
name: "my-app",
title: "My Application",
description: "A simple application for doing DHIS2 things",
name: 'my-app',
title: 'My Application',
description: 'A simple application for doing DHIS2 things',

type: "app",
type: 'app',

entryPoints: {
app: "./src/App"
}
};
entryPoints: {
app: './src/App',
},
}

module.exports = config;
module.exports = config
```
32 changes: 16 additions & 16 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ The Application Platform provides common build system, development tools, runtim

The baseline features built-in to any platform application include:

- Build and development tooling ([`@dhis2/cli-app-scripts`](scripts))
- I18n extract/generate
- Manifest generation
- Dependency injection
- Tests infrastructure
- Transpilation & Bundling
- App-shell encapsulation
- Publication & Release
- Application runtime support ([`@dhis2/app-runtime`](https://runtime.dhis2.nu))
- UI Primitives ([@dhis2/ui-core](https://ui-core.dhis2.nu))
- API Data fetching
- Translations
- Configuration
- Server discovery
- Loading & Error handling
- Authentication
- Build and development tooling ([`@dhis2/cli-app-scripts`](scripts))
- I18n extract/generate
- Manifest generation
- Dependency injection
- Tests infrastructure
- Transpilation & Bundling
- App-shell encapsulation
- Publication & Release
- Application runtime support ([`@dhis2/app-runtime`](https://runtime.dhis2.nu))
- UI Primitives ([@dhis2/ui-core](https://ui-core.dhis2.nu))
- API Data fetching
- Translations
- Configuration
- Server discovery
- Loading & Error handling
- Authentication
7 changes: 7 additions & 0 deletions docs/usage/app-icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# App Icon

The App Icon should allow a user to quickly and uniquely identify your application. It will appear in the DHIS2 App Hub and in the list of available applications in the Headerbar of a running DHIS2 instance.

## Specifying a Custom App Icon

To specify a custom App Icon, place the relevant file in the `public` directory and name it `dhis2-app-icon.png`. It must be in PNG format, and should include a transparent background. The recommended size of this image is 48x48 pixels. When no `public/dhis2-app-icon.png` is provided, a default icon will be used.
14 changes: 7 additions & 7 deletions examples/simple-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1143,8 +1143,8 @@
resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18"
integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==

"@dhis2/[email protected].1", "@dhis2/app-adapter@file:../../adapter":
version "3.1.1"
"@dhis2/[email protected].3", "@dhis2/app-adapter@file:../../adapter":
version "3.1.3"
dependencies:
"@dhis2/ui-widgets" "^2.0.4"
moment "^2.24.0"
Expand All @@ -1154,10 +1154,10 @@
resolved "https://registry.yarnpkg.com/@dhis2/app-runtime/-/app-runtime-2.0.4.tgz#9ae202fef3313094aef33a3e38d2c6c5d799c808"
integrity sha512-w5+C/fHSsuF0am5Tpvz53+tigEZzfz9ahkjXH3BiWxGVxwZGtdHjWfso1T5bJRiKhDTgf76TxIsQiC11W20WyA==

"@dhis2/[email protected].1", "@dhis2/app-shell@file:../../shell":
version "3.1.1"
"@dhis2/[email protected].3", "@dhis2/app-shell@file:../../shell":
version "3.1.3"
dependencies:
"@dhis2/app-adapter" "3.1.1"
"@dhis2/app-adapter" "3.1.3"
"@dhis2/app-runtime" "^2.0.4"
"@dhis2/d2-i18n" "^1.0.5"
"@dhis2/ui-core" "^4.6.1"
Expand All @@ -1173,7 +1173,7 @@
typescript "^3.6.3"

"@dhis2/cli-app-scripts@file:../../cli":
version "3.1.1"
version "3.1.3"
dependencies:
"@babel/core" "^7.6.2"
"@babel/plugin-proposal-class-properties" "^7.8.3"
Expand All @@ -1186,7 +1186,7 @@
"@babel/preset-env" "^7.6.2"
"@babel/preset-react" "^7.0.0"
"@babel/preset-typescript" "^7.6.0"
"@dhis2/app-shell" "3.1.1"
"@dhis2/app-shell" "3.1.3"
"@dhis2/cli-helpers-engine" "^1.5.0"
archiver "^3.1.1"
babel-jest "^24.9.0"
Expand Down
Binary file added shell/public/dhis2-app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 86f1cd7

Please sign in to comment.