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 NDC Enhancement page crashing/not loading #1667

Merged
merged 6 commits into from
Jul 5, 2023

Conversation

SARodrigues
Copy link
Collaborator

@SARodrigues SARodrigues commented Jun 30, 2023

Description

This PR fixes the "NDC Enhancement Tracker" page crashing when the user visited Explore NDCS first.

It also includes some minor fixes to address some of the console errors found during the debugging process, as well as a couple tweaks in an attempt to make it so that similar issues don't crash the page in its entirely.

@SARodrigues SARodrigues self-assigned this Jun 30, 2023
@what-the-diff
Copy link

what-the-diff bot commented Jun 30, 2023

PR Summary

  • Design Modifications Applied to Maps
    The changes in the code are to correct errors that occur when certain manipulations are done on the maps displayed in the application. These include adjusting the properties of the country highlight styles, correcting the way data related to each country is stored and filtered, and modifying how certain elements appear on the map.

  • Exploration Page Changes
    This update modifies how data related to country commitments to climate change (referred to as NDCs) is fetched and managed on the exploration page. Moreover, clarifications and corrections have been made to the map elements on this page.

  • Enhancements to Tables on NDC Page
    Similar changes of data management and filtering that were applied to maps are also implemented to the tables displayed on the NDC page.

  • Improved Efficiency in Data Fetching
    Certain actions and reducers responsible for achieving data-related tasks have been renamed to better reflect their function. This helps in improving the readability of the code and makes it easier for other developers to understand the code workflow.

  • Clarifications Added and Typos Corrected
    A handful of changes were made to clean up the code. These include fixing typographical errors, improving function explanations, and making sure that every major element in the code carries a distinctive identification key.

@SARodrigues SARodrigues marked this pull request as ready for review June 30, 2023 12:18
Copy link
Collaborator

@Bluesmile82 Bluesmile82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice! Check my comment

@@ -296,7 +296,7 @@ export const getPreviousComparisonCountryValues = createSelector(
[getPreviousComparisonIndicators, getISOCountries],
(previousComparisonIndicators, isos) => {
if (!previousComparisonIndicators) return null;
const previousComparisonCountryValues = {};
const previousComparisonCountryValues = [];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an object. We are adding attributes to it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching that.

… NDCSEnhancementsMap component"

This reverts commit 116205c.
@SARodrigues SARodrigues merged commit 666ba2b into develop Jul 5, 2023
2 of 3 checks passed
@SARodrigues SARodrigues deleted the ndc-enhancement-debug branch July 5, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants