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: upgrade react router to v6 #1001

Merged
merged 11 commits into from
Jan 17, 2024
Merged

Conversation

Syed-Ali-Abbas-Zaidi
Copy link
Contributor

@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi commented Jul 10, 2023

Ticket

React Router Upgrade to v6.

Description

This PR upgrades React Router from v5 to v6.

package.json Outdated Show resolved Hide resolved
@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi self-assigned this Jan 2, 2024
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (42a493c) 85.42% compared to head (66a89a7) 85.33%.

❗ Current head 66a89a7 differs from pull request most recent head 13f8e6e. Consider uploading reports for the commit 13f8e6e to get more accurate results

Files Patch % Lines
src/components/Admin/AdminSearchForm.jsx 0.00% 5 Missing ⚠️
src/components/App/index.jsx 0.00% 4 Missing ⚠️
...c/components/EnterpriseApp/EnterpriseAppRoutes.jsx 73.33% 4 Missing ⚠️
src/components/TableComponent/index.jsx 0.00% 2 Missing ⚠️
src/components/CodeManagement/ManageCodesTab.jsx 85.71% 1 Missing ⚠️
src/components/CodeSearchResults/index.jsx 75.00% 1 Missing ⚠️
...ights/HighlightStepper/ContentHighlightStepper.jsx 66.66% 1 Missing ⚠️
src/components/EnterpriseApp/index.jsx 66.66% 1 Missing ⚠️
...c/components/RequestCodesPage/RequestCodesForm.jsx 0.00% 1 Missing ⚠️
...rner-credit-management/BudgetDetailAssignments.jsx 66.66% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1001      +/-   ##
==========================================
- Coverage   85.42%   85.33%   -0.09%     
==========================================
  Files         494      495       +1     
  Lines       10625    10639      +14     
  Branches     2219     2230      +11     
==========================================
+ Hits         9076     9079       +3     
- Misses       1507     1518      +11     
  Partials       42       42              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi marked this pull request as ready for review January 12, 2024 14:28
Copy link
Member

@brobro10000 brobro10000 left a comment

Choose a reason for hiding this comment

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

Great job with the PR. Noticed a couple issues QAing the learner credit management section.

@@ -147,7 +147,7 @@ const NewAssignmentModalButton = ({ enterpriseId, course, children }) => {
});

// Navigate to the activity tab
history.push(pathToActivityTab);
navigate(pathToActivityTab);
Copy link
Member

Choose a reason for hiding this comment

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

Noticed a bug with this implementation where the url is not being changed to reflect the activity tab and is not redirecting correctly. (See video)

The first half of the video is the PR, while the second half is the current stage environment.
https://github.com/openedx/frontend-app-admin-portal/assets/82611798/3e4568f3-5ecd-4501-aa5e-69e11f611194

pathname: generatePath(routeMatch.path, { budgetId, activeTabKey: 'catalog' }),
state: { budgetActivityScrollToKey: 'catalog' },
}}
to={generatePath(pathname, { budgetId, activeTabKey: 'catalog' })}
Copy link
Member

Choose a reason for hiding this comment

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

Noticed a bug with this where when the user is on the activity tab and selects the New course assignment button, the tab no longer changes to the catalog tab. The same behavior can be seen from clicking the View spent activity and View assigned activity button from the utilization details button (See Video). For those buttons, when the user is on the catalog tab, the tab is supposed to switch to the activity tab and scroll down to the selected component. (Found in BudgetDetailPageOverviewUtilization

Screen.Recording.2024-01-16.at.10.06.03.AM.mov

pathname: generatePath(routeMatch.path, { budgetId, activeTabKey: 'activity' }),
state: { budgetActivityScrollToKey: type },
}}
to={generatePath(pathname, { budgetId, activeTabKey: 'activity' })}
Copy link
Member

Choose a reason for hiding this comment

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

See comment above relating to the tabs not switching.

Copy link
Member

@brobro10000 brobro10000 left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏽 Will undergo thorough testing in stage before moving over to prod. Thanks for putting all the effort into this.

@brobro10000 brobro10000 merged commit 4b56103 into master Jan 17, 2024
4 checks passed
@brobro10000 brobro10000 deleted the Ali-Abbas/react-router-upgrade branch January 17, 2024 17:29
Syed-Ali-Abbas-Zaidi added a commit that referenced this pull request Jan 19, 2024
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.

2 participants