Skip to content
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: patch d2-analysis so elements have relevant class-names for push-analytics #1032

Merged
merged 3 commits into from
Jan 29, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand All @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: actions/cache@v2
id: yarn-cache
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: actions/download-artifact@v2
with:
Expand All @@ -94,7 +94,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- name: Publish release to GitHub
run: npx @dhis2/cli-utils release
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Event charts app",
"main": "index.html",
"scripts": {
"postinstall": "patch-package",
"lint": "./node_modules/eslint/bin/eslint.js src `git diff --cached --name-only | grep \\.js$`",
"validate": "npm ls --depth 0",
"prestart": "d2-manifest package.json manifest.webapp",
Expand Down Expand Up @@ -45,6 +46,8 @@
"eslint-plugin-react": "3.3.1",
"img-loader": "^1.2.2",
"json-loader": "^0.5.7",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"sass-loader": "7",
"style-loader": "0.12.3",
"url-loader": "^0.5.7",
Expand Down
44 changes: 44 additions & 0 deletions patches/d2-analysis+33.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/node_modules/d2-analysis/lib/ui/ChartDownloadButtonItems.js b/node_modules/d2-analysis/lib/ui/ChartDownloadButtonItems.js
index 54ec8c6..2100864 100644
--- a/node_modules/d2-analysis/lib/ui/ChartDownloadButtonItems.js
+++ b/node_modules/d2-analysis/lib/ui/ChartDownloadButtonItems.js
@@ -20,6 +20,7 @@ exports.ChartDownloadButtonItems = ChartDownloadButtonItems = function ChartDown
style: 'padding:7px 5px 5px 7px; font-weight:bold'
}, {
text: i18n.image_png + ' (.png)',
+ cls: 'push-analytics-download-as-png-menu-item',
iconCls: 'ns-menu-item-image',
handler: function handler() {
uiManager.submitSvgForm('png', getFilename());
diff --git a/node_modules/d2-analysis/lib/ui/FavoriteButton.js b/node_modules/d2-analysis/lib/ui/FavoriteButton.js
index c08b594..0848e28 100644
--- a/node_modules/d2-analysis/lib/ui/FavoriteButton.js
+++ b/node_modules/d2-analysis/lib/ui/FavoriteButton.js
@@ -27,6 +27,7 @@ exports.FavoriteButton = FavoriteButton = function FavoriteButton(c) {

return Ext.create('Ext.button.Button', {
text: i18n.favorites,
+ cls: 'push-analytics-favorites-dropdown-menu-button',
menu: {},
handler: function handler(b) {
b.menu = Ext.create('Ext.menu.Menu', {
@@ -40,6 +41,7 @@ exports.FavoriteButton = FavoriteButton = function FavoriteButton(c) {

var newItem = Ext.create('Ext.menu.Item', {
text: getTitle(i18n.new_),
+ cls: 'push-analytics-new-events-chart-menu-item',
iconCls: 'ns-menu-item-favorite-new',
disabled: !instanceManager.isStateCurrent(),
handler: function handler() {
diff --git a/node_modules/d2-analysis/lib/ui/Viewport.js b/node_modules/d2-analysis/lib/ui/Viewport.js
index 4381d4c..0647b19 100644
--- a/node_modules/d2-analysis/lib/ui/Viewport.js
+++ b/node_modules/d2-analysis/lib/ui/Viewport.js
@@ -264,6 +264,7 @@ exports.Viewport = Viewport = function Viewport(refs, cmp, config) {

var downloadButton = Ext.create('Ext.button.Button', {
text: i18n.download,
+ cls: 'push-analytics-download-dropdown-menu-button',
disabled: true,
menu: {},
handler: function handler(b) {
Loading
Loading