From 054f61ee67384e1fb1cbe8890361568d00f1665f Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Fri, 15 Sep 2023 14:50:23 +0200 Subject: [PATCH 1/5] chore: add slack success message for release (#436) Send alert to the analytics-bot slack channel if release is successful. Also, both the success and failure bot messages will include the app version in the message. --- .github/workflows/dhis2-verify-app.yml | 57 +++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dhis2-verify-app.yml b/.github/workflows/dhis2-verify-app.yml index fd7d1f406..83c8a38fb 100644 --- a/.github/workflows/dhis2-verify-app.yml +++ b/.github/workflows/dhis2-verify-app.yml @@ -127,11 +127,66 @@ jobs: !cancelled() && github.ref == 'refs/heads/master' steps: + - name: Checkout code + uses: actions/checkout@master + + - name: Extract version + id: extract_version + uses: Saionaro/extract-package-version@v1.2.1 + - name: Send failure message to analytics-internal-bot slack channel id: slack uses: slackapi/slack-github-action@v1.23.0 with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} - slack-message: ':small_red_triangle_down: Line-listing-app release ' + payload: | + { + "text": ":small_red_triangle_down: :line-listing-app: Line Listing version ${{ steps.extract_version.outputs.version }} release ", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":small_red_triangle_down: :line-listing-app: Line Listing version ${{ steps.extract_version.outputs.version }} release " + } + } + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + + report-release-success: + runs-on: ubuntu-latest + needs: release + if: | + success() && + !cancelled() && + github.ref == 'refs/heads/master' + steps: + - name: Checkout code + uses: actions/checkout@master + + - name: Extract version + id: extract_version + uses: Saionaro/extract-package-version@v1.2.1 + + - name: Send success message to analytics-internal-bot slack channel + id: slack + uses: slackapi/slack-github-action@v1.23.0 + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + payload: | + { + "text": ":large_green_circle: :line-listing-app: :tada: Line Listing release succeeded for version: ${{ steps.extract_version.outputs.version }}", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":large_green_circle: :line-listing-app: :tada: Line Listing version ${{ steps.extract_version.outputs.version }} released " + } + } + ] + } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From 4a4ea60c57893d1c514e07a323a872a2be486caa Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Fri, 15 Sep 2023 13:20:57 +0000 Subject: [PATCH 2/5] chore(release): cut 100.9.2 [skip release] ## [100.9.2](https://github.com/dhis2/line-listing-app/compare/v100.9.1...v100.9.2) (2023-09-15) ### Bug Fixes * always have the full pagination in view ([#431](https://github.com/dhis2/line-listing-app/issues/431)) ([05d3d79](https://github.com/dhis2/line-listing-app/commit/05d3d7921577a3a8d357c3e28aaf4ca0f952525e)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0173ac454..2857dd320 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [100.9.2](https://github.com/dhis2/line-listing-app/compare/v100.9.1...v100.9.2) (2023-09-15) + + +### Bug Fixes + +* always have the full pagination in view ([#431](https://github.com/dhis2/line-listing-app/issues/431)) ([05d3d79](https://github.com/dhis2/line-listing-app/commit/05d3d7921577a3a8d357c3e28aaf4ca0f952525e)) + ## [100.9.1](https://github.com/dhis2/line-listing-app/compare/v100.9.0...v100.9.1) (2023-08-21) diff --git a/package.json b/package.json index 1a6ac894f..20ea60e28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "line-listing-app", - "version": "100.9.1", + "version": "100.9.2", "description": "DHIS2 Line Listing", "license": "BSD-3-Clause", "private": true, From 181c14f99cf7782f07ddf860eea269ffac7a2795 Mon Sep 17 00:00:00 2001 From: HendrikThePendric Date: Mon, 25 Sep 2023 17:02:14 +0200 Subject: [PATCH 3/5] chore(deps): upgrade cypress --- package.json | 2 +- yarn.lock | 68 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 20ea60e28..f8101e4c9 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@dhis2/cypress-plugins": "^10.0.2", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^12.1.4", - "cypress": "^12.13.0", + "cypress": "^13.2.0", "cypress-tags": "^1.1.2", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.6", diff --git a/yarn.lock b/yarn.lock index 0ae6d2f88..51f3bc212 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1422,10 +1422,10 @@ through2 "^2.0.0" watchify "^4.0.0" -"@cypress/request@^2.88.10": - version "2.88.11" - resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.11.tgz#5a4c7399bc2d7e7ed56e92ce5acb620c8b187047" - integrity sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w== +"@cypress/request@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960" + integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -1440,9 +1440,9 @@ json-stringify-safe "~5.0.1" mime-types "~2.1.19" performance-now "^2.1.0" - qs "~6.10.3" + qs "6.10.4" safe-buffer "^5.1.2" - tough-cookie "~2.5.0" + tough-cookie "^4.1.3" tunnel-agent "^0.6.0" uuid "^8.3.2" @@ -3461,10 +3461,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.3.tgz#b31eb300610c3835ac008d690de6f87e28f9b878" integrity sha512-pg9d0yC4rVNWQzX8U7xb4olIOFuuVL9za3bzMT2pu2SU0SNEi66i2qrvhE2qt0HvkhuCaWJu7pLNOt/Pj8BIrw== -"@types/node@^14.14.31": - version "14.18.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.47.tgz#89a56b05804d136cb99bf2f823bb00814a889aae" - integrity sha512-OuJi8bIng4wYHHA3YpKauL58dZrPxro3d0tabPHyiNF8rKfGKuVfr83oFlPLmKri1cX+Z3cJP39GXmnqkP11Gw== +"@types/node@^18.17.5": + version "18.17.19" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.19.tgz#80c9b8a89d3648d9e6098f4a7184e03833fee3c5" + integrity sha512-+pMhShR3Or5GR0/sp4Da7FnhVmTalWm81M6MkEldbwjETSaPalw138Z4KdpQaistvqQxLB7Cy4xwYdxpbSOs9Q== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -6251,14 +6251,14 @@ cypress-tags@^1.1.2: boolean-parser "0.0.2" through "^2.3.8" -cypress@^12.13.0: - version "12.13.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.13.0.tgz#725b6617ea19e41e5c59cc509fc3e08097142b01" - integrity sha512-QJlSmdPk+53Zhy69woJMySZQJoWfEWun3X5OOenGsXjRPVfByVTHorxNehbzhZrEzH9RDUDqVcck0ahtlS+N/Q== +cypress@^13.2.0: + version "13.2.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.2.0.tgz#10f73d06a0764764ffbb903a31e96e2118dcfc1d" + integrity sha512-AvDQxBydE771GTq0TR4ZUBvv9m9ffXuB/ueEtpDF/6gOcvFR96amgwSJP16Yhqw6VhmwqspT5nAGzoxxB+D89g== dependencies: - "@cypress/request" "^2.88.10" + "@cypress/request" "^3.0.0" "@cypress/xvfb" "^1.2.4" - "@types/node" "^14.14.31" + "@types/node" "^18.17.5" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" arch "^2.2.0" @@ -6291,9 +6291,10 @@ cypress@^12.13.0: minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" + process "^0.11.10" proxy-from-env "1.0.0" request-progress "^3.0.0" - semver "^7.3.2" + semver "^7.5.3" supports-color "^8.1.1" tmp "~0.2.1" untildify "^4.0.0" @@ -12836,7 +12837,7 @@ process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@~0.11.0: +process@^0.11.10, process@~0.11.0: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== @@ -12966,6 +12967,13 @@ q@^1.1.2, q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== +qs@6.10.4: + version "6.10.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7" + integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g== + dependencies: + side-channel "^1.0.4" + qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -12973,13 +12981,6 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" -qs@~6.10.3: - version "6.10.5" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4" - integrity sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ== - dependencies: - side-channel "^1.0.4" - qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -14041,6 +14042,13 @@ semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: dependencies: lru-cache "^6.0.0" +semver@^7.5.3: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -15247,6 +15255,16 @@ tough-cookie@^4.0.0: universalify "^0.2.0" url-parse "^1.5.3" +tough-cookie@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" + integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" From 2b733f16c426617469c4c43aeaec5d9c0f049923 Mon Sep 17 00:00:00 2001 From: Hendrik de Graaf Date: Tue, 26 Sep 2023 16:54:11 +0200 Subject: [PATCH 4/5] fix: ensure pagination max-width is correct in interpretations modal (#434) * fix: always attach resize observer if node is found * chore: remove stray console.log * fix: upgrade @dhis2/ui to get spacing between pagination elements * chore: deduplicate @dhis2/ui versions * fix: implement min width on pagination container so dropdowns fit * fix: bump min width for less concise locales --- package.json | 2 +- src/components/Visualization/Visualization.js | 19 +- yarn.lock | 871 +++++++++--------- 3 files changed, 444 insertions(+), 448 deletions(-) diff --git a/package.json b/package.json index f8101e4c9..43b494c75 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "dependencies": { "@dhis2/analytics": "^26.0.7", "@dhis2/app-runtime": "^3.4.4", - "@dhis2/ui": "^8.13.13", + "@dhis2/ui": "^8.14.5", "@dnd-kit/core": "^5.0.3", "@dnd-kit/sortable": "^6.0.1", "@dnd-kit/utilities": "^3.2.0", diff --git a/src/components/Visualization/Visualization.js b/src/components/Visualization/Visualization.js index b56fee4a0..dd10ff009 100644 --- a/src/components/Visualization/Visualization.js +++ b/src/components/Visualization/Visualization.js @@ -64,6 +64,9 @@ import { export const DEFAULT_SORT_DIRECTION = 'asc' export const FIRST_PAGE = 1 export const PAGE_SIZE = 100 +// +/- min width of "Rows per page" select + 2 * padding +// + 30% in case label text are longer than English +export const PAGINATION_MIN_WIDTH = 250 const getFontSizeClass = (fontSize) => { switch (fontSize) { @@ -125,16 +128,23 @@ export const Visualization = ({ const visualizationRef = useRef(visualization) const containerCallbackRef = useCallback((node) => { - if (node === null || node.clientWidth === 0) { + if (node === null) { return } const adjustSize = () => { + if (node.clientWidth === 0) { + return + } const containerInnerWidth = node.clientWidth const scrollBox = node.querySelector('.tablescrollbox') const scrollbarWidth = scrollBox.offsetWidth - scrollBox.clientWidth + const maxWidth = Math.max( + containerInnerWidth - scrollbarWidth, + PAGINATION_MIN_WIDTH + ) - setPaginationMaxWidth(containerInnerWidth - scrollbarWidth) + setPaginationMaxWidth(maxWidth) } const sizeObserver = new window.ResizeObserver(adjustSize) @@ -435,7 +445,10 @@ export const Visualization = ({ styles.stickyNavigation, sizeClass )} - style={{ maxWidth: paginationMaxWidth }} + style={{ + maxWidth: paginationMaxWidth, + minWidth: PAGINATION_MIN_WIDTH, + }} > Date: Wed, 27 Sep 2023 16:48:11 +0200 Subject: [PATCH 5/5] chore: send release success and fail slack messages on actual releases only (#439) Check the commit message to ensure the commit is an actual release. --- .github/workflows/dhis2-verify-app.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dhis2-verify-app.yml b/.github/workflows/dhis2-verify-app.yml index 83c8a38fb..6a54f55e8 100644 --- a/.github/workflows/dhis2-verify-app.yml +++ b/.github/workflows/dhis2-verify-app.yml @@ -125,7 +125,8 @@ jobs: if: | failure() && !cancelled() && - github.ref == 'refs/heads/master' + github.ref == 'refs/heads/master' && + contains(github.event.head_commit.message, 'chore(release)') steps: - name: Checkout code uses: actions/checkout@master @@ -141,13 +142,13 @@ jobs: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} payload: | { - "text": ":small_red_triangle_down: :line-listing-app: Line Listing version ${{ steps.extract_version.outputs.version }} release ", + "text": ":small_red_triangle_down: :line-listing-app: Line Listing release ", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": ":small_red_triangle_down: :line-listing-app: Line Listing version ${{ steps.extract_version.outputs.version }} release " + "text": ":small_red_triangle_down: :line-listing-app: Line Listing release " } } ] @@ -161,7 +162,8 @@ jobs: if: | success() && !cancelled() && - github.ref == 'refs/heads/master' + github.ref == 'refs/heads/master' && + contains(github.event.head_commit.message, 'chore(release)') steps: - name: Checkout code uses: actions/checkout@master