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: persist sorting information in AO (DHIS2-14955) #382

Merged
merged 23 commits into from
Apr 25, 2024

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Jun 7, 2023

Implements DHIS2-14955
Fixes DHIS2-15248

Requires https://dhis2.atlassian.net/browse/DHIS2-14956


Key features

  1. persist sorting details in LL AOs
  2. apply sorting also to downloads

Description

Moved the sorting field and direction state from the Visualization component to the App.
The sorting details are fetched directly in the visualization/current object, in this way the sorting is correctly applied to dashboard items too when first loaded.

One regression tho, is that changing sorting does not work in dashboard.
The reason is that the onDataSorted callback is only passed to the plugin by the LL app.
The above has been fixed by adding the onDataSorted callback to the PluginWrapper component used by dashboard.


TODO

  • figure out a solution for "temporarily" changing sorting in dashboard
  • enable the new Cypress test when the backend support is in place

Screenshots

Sorting applied and returned in the AO:
Screenshot 2023-07-11 at 10 29 12

Screenshot 2023-07-11 at 10 29 39

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Jun 7, 2023

🚀 Deployed on https://pr-382--dhis2-line-listing.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify June 7, 2023 14:43 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 8, 2023 09:49 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 9, 2023 09:43 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 9, 2023 14:50 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 12, 2023 07:39 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 19, 2023 07:58 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify July 6, 2023 14:27 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify July 7, 2023 15:03 Inactive
@edoardo edoardo marked this pull request as ready for review July 11, 2023 08:53
@dhis2-bot dhis2-bot temporarily deployed to netlify July 11, 2023 08:54 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 21, 2023 09:16 Inactive
@edoardo edoardo removed the on hold label Aug 21, 2023
@cypress
Copy link

cypress bot commented Aug 21, 2023

Passing run #2682 ↗︎

0 701 3 0 Flakiness 0

Details:

Merge fe5cc91 into 0572604...
Project: line-listing-app Commit: a137287139 ℹ️
Status: Passed Duration: 13:36 💡
Started: Apr 25, 2024 9:57 AM Ended: Apr 25, 2024 10:11 AM

Review all test suite changes for PR #382 ↗︎

@martinkrulltott martinkrulltott self-assigned this Aug 21, 2023
@dhis2-bot dhis2-bot temporarily deployed to netlify August 21, 2023 11:49 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 11, 2023 08:40 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 11, 2023 09:18 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 11, 2023 11:32 Inactive
@edoardo edoardo removed the on hold label Sep 11, 2023
All local state needs to be reset when loading a different AO,
otherwise, because the Visualization component is not unmounted when
switching AO, but simply re-renders, local state from the previous AO is
kept and applied to the current AO.
@dhis2-bot dhis2-bot temporarily deployed to netlify January 30, 2024 10:40 Inactive
@edoardo edoardo force-pushed the feat/save-sorting-DHIS2-14955 branch from 1d7e613 to 3a8c98e Compare January 30, 2024 13:03
@dhis2-bot dhis2-bot temporarily deployed to netlify January 30, 2024 13:05 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 30, 2024 13:52 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 5, 2024 09:21 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 5, 2024 14:10 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 5, 2024 16:19 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 5, 2024 18:03 Inactive
@jenniferarnesen jenniferarnesen removed the Awaiting Core Release Should not be released / merged until a supported backend version has been released first label Apr 8, 2024
@edoardo edoardo force-pushed the feat/save-sorting-DHIS2-14955 branch from 693df49 to 18de3f8 Compare April 18, 2024 10:10
@dhis2-bot dhis2-bot temporarily deployed to netlify April 18, 2024 10:13 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 19, 2024 11:57 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 19, 2024 12:49 Inactive
@jenniferarnesen
Copy link
Collaborator

LGTM

@dhis2-bot dhis2-bot temporarily deployed to netlify April 25, 2024 09:51 Inactive
@edoardo edoardo merged commit 718ed86 into master Apr 25, 2024
33 checks passed
@edoardo edoardo deleted the feat/save-sorting-DHIS2-14955 branch April 25, 2024 11:55
dhis2-bot added a commit that referenced this pull request Apr 25, 2024
# [100.17.0](v100.16.2...v100.17.0) (2024-04-25)

### Bug Fixes

* show empty cell for missing boolean values as well ([#466](#466)) ([db706cc](db706cc))

### Features

* persist sorting information in AO (DHIS2-14955) ([#382](#382)) ([718ed86](718ed86))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants