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 diff --git a/package.json b/package.json index b92c96327..e37494354 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "dependencies": { "@dhis2/analytics": "^26.0.20", "@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, + }} >