Skip to content

OBPIH-6930 added page reload after changing location#5007

Merged
awalkowiak merged 7 commits intodevelopfrom
OBPIH-6930
Jan 22, 2025
Merged

OBPIH-6930 added page reload after changing location#5007
awalkowiak merged 7 commits intodevelopfrom
OBPIH-6930

Conversation

@SebastianLib
Copy link
Collaborator

✨ Description of Change

A concise summary of what is being changed. Please provide enough context for reviewers to be able to understand the change and why it is necessary. If the issue/ticket already provides enough information, you can put "See ticket" as the description.

Link to GitHub issue or Jira ticket:

Description:


📷 Screenshots & Recordings (optional)

If this PR contains a UI change, consider adding one or more screenshots here or link to a screen recording to help reviewers visualize the change. Otherwise, you can remove this section.

@github-actions github-actions bot added the domain: frontend Changes or discussions relating to the frontend UI label Jan 20, 2025

window.location.reload();
});
setIsOpen(false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not the solution we would want to have. This way, you would always reload the page, it's not what React's flow is about (SPA).
What you need to do is to refetch the data when the location changes (using appropriate useEffect)

Copy link
Collaborator

Choose a reason for hiding this comment

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

☝️

@codecov
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 7.76%. Comparing base (08ea84c) to head (c78ea19).
Report is 177 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##             develop   #5007      +/-   ##
============================================
+ Coverage       7.72%   7.76%   +0.03%     
- Complexity       854     857       +3     
============================================
  Files            610     610              
  Lines          42589   42589              
  Branches       10346   10346              
============================================
+ Hits            3292    3305      +13     
+ Misses         38810   38793      -17     
- Partials         487     491       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

}));

const fetchData = () => {
sourceRef.current = CancelToken.source();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this looks good because this is what we also did for the old useTableData. The only request I have is to copy the comment from the useTableData, so that everyone understands why it is needed here.

@awalkowiak awalkowiak merged commit b520164 into develop Jan 22, 2025
9 checks passed
@awalkowiak awalkowiak deleted the OBPIH-6930 branch January 22, 2025 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: frontend Changes or discussions relating to the frontend UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants