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

feat: release DHIS2-18441 and DHIS2-13038 #3169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HendrikThePendric
Copy link
Contributor

@HendrikThePendric HendrikThePendric commented Dec 18, 2024

This PR must be merged with a merge commit, not a squash commit

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Dec 18, 2024

🚀 Deployed on https://pr-3169.dashboard.netlify.dhis2.org

@dhis2-bot dhis2-bot temporarily deployed to netlify December 18, 2024 13:40 Inactive
@HendrikThePendric HendrikThePendric force-pushed the feat/release-DHIS2-18441-and-DHIS2-13038 branch from de1f429 to 1776ac5 Compare December 18, 2024 13:48
@dhis2-bot dhis2-bot temporarily deployed to netlify December 18, 2024 13:50 Inactive
@HendrikThePendric HendrikThePendric force-pushed the feat/release-DHIS2-18441-and-DHIS2-13038 branch from 1776ac5 to b73f6ee Compare December 18, 2024 14:35
@dhis2-bot dhis2-bot temporarily deployed to netlify December 18, 2024 14:37 Inactive
…n, and keyboard navigation

Implements JIRA issue DHIS2-18441 according to the design specs

---

### Key features

1. New design
2. New navigation menu
3. New keyboard navigation

---

### Description

Implements the new design according to the design doc. Some other changes are also included in this
PR and these are listed below.

#### Changes to `ViewDashboard`

- Use the `useAlert` hook instead of rendering a `AlertStack`. This ensures the show/hide animation
  runs and that there won't be problems when we show this alert together with another alert
- The logic to load a dashboard has been simplified, I suspect this component still contained some
  logic that predates the inclusion of react-router. In any case, there was some logic present that
  accommodated "loading a new dashboard". But this scenario would never occur, because when the
  route changes the component is remounted.
- Instead of having a `getContent` function, we now have the `ViewDashboardContent` component.

#### Changes to `CacheableViewDashboard`

A `useEffect` hook was added to ensure that the selected dashboard is cleared from the redux store
when the user  chooses "Close dashboard" in the "action menu" dropdown.

#### Changes to `FilterBadge`

The design was updated and some modifications were done to the behaviour as well:
- When online on a large screen it is possible to edit and/or remove a filter
- When online on a small screen (width =< 480px) it is not possible to edit a filter, but it can be
  removed. When attempting to edit a filter a tooltip shows to inform the user this is not possible.
- When offline filters cannot be edited or deleted. The filter-badge is still visible but the
  remove-icon is not rendered. When attempting to edit a filter a tooltip shows to inform the user
  this is not possible.

#### Major version upgrade of `@dhis2/ui` (v10)

Version 10 includes some improvements in terms of accessibility and keyboard navigation. To comply
with the new guidelines in that regard a few small tweaks to components were needed. This involved
adding things like `ariaLabel` props, and addressing some invalid DOM nesting (nested `<a>` tags).

#### Some tweaks to the unit-testing configuration

- React testing-library was configured to work with the `data-test` attribute we use at DHIS2 (i.e.
  the `dataTest` prop for components from `@dhis2/ui`). The default data-attribute used by React
  testing-library is `data-test-id`, and some tests needed to be adjusted to no longer use that.
- Some ESLint rules were added specifically for `spec.js` to remove the need to add ESLint ignore
  comments when making mock-components and other types of mocks.

---

### Known issues

-   Keyboard navigation inconsistencies: this PR includes a major version bump in `@dhis2/ui` which
    comes with some accessibility improvements including arrow-key keyboard navigation for menus.
    The navigation- and more-actions-menu in the new dashboards-bar are using these. But the
    filter-menu is using a custom menu-list and this can be used by keyboard by using the tab-key.
    This inconsistency will be tackled in a separate PR as described in JIRA issue DHIS2-18537.

---

### References

Current JIRA Issue DHIS2-18441: https://dhis2.atlassian.net/browse/DHIS2-18441
Follow-up JIRA issue DHIS2-18537: https://dhis2.atlassian.net/browse/DHIS2-18537
Design specs: https://docs.google.com/document/d/1c8Ll1aLbFYwU8HYsyDlH1wk_QKTrUXwNanCiqayczOM
@HendrikThePendric HendrikThePendric force-pushed the feat/release-DHIS2-18441-and-DHIS2-13038 branch from b73f6ee to 45e6f4c Compare December 18, 2024 14:41
@dhis2-bot dhis2-bot temporarily deployed to netlify December 18, 2024 14:43 Inactive
@jenniferarnesen jenniferarnesen marked this pull request as ready for review December 20, 2024 15:20
@dhis2-bot dhis2-bot temporarily deployed to netlify December 20, 2024 15:21 Inactive
Implements https://dhis2.atlassian.net/browse/DHIS2-13038

Details:

1. When entering the slideshow/fullscreen, the parent div of the ItemGrid is put
into browser fullscreen. That same div remains in fullscreen the entire time, while
the dashboard items are displayed/hidden in turn using css opacity. Css opacity is
used instead of display or visibility so that the items can first be resized to
fullscreen while "invisible", and then be made visible. This means that the user
doesn't see a flash of the visualization in its regular item size before it gets resized.

2. Progressive loading. When the dashboard goes into fullscreen/slideshow, then progressive
loading will load the next and previous items in the fullscreen display order instead of
being based on proximity to the viewport.

3. RTL support has been implemented for the slideshow navigation buttons. It was decided
after discussions with in-house RTL experts that the order
of the dashboard items would remain LTR.
@jenniferarnesen jenniferarnesen force-pushed the feat/release-DHIS2-18441-and-DHIS2-13038 branch from cb2b931 to 320f37c Compare December 20, 2024 15:42
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
13 New issues
3 New Bugs (required ≤ 0)
D Reliability Rating on New Code (required ≥ A)
10 New Code Smells (required ≤ 0)
1 New Critical Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@jenniferarnesen jenniferarnesen added the e2e record Apply this label to a pull request to trigger recording of E2E tests on Cypress Cloud label Dec 20, 2024
Copy link

cypress bot commented Dec 20, 2024

dashboards-app    Run #5081

Run Properties:  status check failed Failed #5081  •  git commit 881461537d ℹ️: Merge 320f37c327ff9cf49e8ef771ce5a5bd14efc5dec into b890115905eb8e5053cbf5f0b641...
Project dashboards-app
Branch Review feat/release-DHIS2-18441-and-DHIS2-13038
Run status status check failed Failed #5081
Run duration 03m 20s
Commit git commit 881461537d ℹ️: Merge 320f37c327ff9cf49e8ef771ce5a5bd14efc5dec into b890115905eb8e5053cbf5f0b641...
Committer Hendrik de Graaf
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 103
View all changes introduced in this branch ↗︎

Tests for review

Failed  cypress/e2e/slideshow.feature • 1 failed test • e2e-chrome-parallel-2.40-7

View Output Video

Test Artifacts
Slideshow > I view fullscreen on the third item of the dashboard and navigate backwards Test Replay Screenshots Video
Flakiness  edit_dashboard.feature • 1 flaky test • e2e-chrome-parallel-2.40-2

View Output Video

Test Artifacts
Creating, editing and deleting dashboard > I delete a dashboard Test Replay Screenshots Video
Flakiness  dashboard_filter.feature • 1 flaky test • e2e-chrome-parallel-2.41-1

View Output Video

Test Artifacts
Dashboard filter > I delete a dashboard Test Replay Screenshots Video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e record Apply this label to a pull request to trigger recording of E2E tests on Cypress Cloud
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants