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 gateway detail redirect #1144

Closed
wants to merge 46 commits into from

Conversation

rustyjux
Copy link
Contributor

@rustyjux rustyjux commented Aug 19, 2024

Apparently adding return null to the useEffect() fixes the component render cycle and may be preventing the component from mounting and unmounting unpredictably before.

Worked 10x in a row in docker compose where it was frequently failing before.


🚀 Feature branch deployment: https://api-services-portal-feature-ns-to-gw-gateway-detail-redirect.apps.silver.devops.gov.bc.ca

ikethecoder and others added 30 commits September 30, 2022 13:07
* Feature/keycloak migration (#580)

* Feature/sprint 56 UI fixes (#596)

* Add fixes for deleting application optimistically and preventing saves in controls dialog

* Tighten up applications mocks, errors

* fix email search for finding user by email

* fix ns switch error

* remove switchto from perm ticket

* fixes for updating roles in clients (#594)


Co-authored-by: Joshua Jones <joshua@general-metrics.com>

* Feature/issue 237 access stale (#599)

* resolve build error

* fix error with upd roles

* fix display_name undefined ns access

* fix display_name undefined ns access

* upd logging details for online migration

* upd e2e keycloak with client mappers

* make title required for dataset (#606)

Co-authored-by: Joshua Jones <joshua@general-metrics.com>
Products page refresh (#595)
Test automation updates
fix consumer save error failed to construct formdata (#622)
Release Login Refresh Shared IdP Org Assignment
Feature/shared idp cypress (#673)
Feature/shared idp cypress (#680)
Feature/shared idp cypress (#687)
Feature/shared idp cypress (#690)
Cypress automation updates
Build feeder in test same way as portal
Release 1.2.6 changes
R1.2.6 bug fixes and ns access ui upgrade
fix feeder force sync on activity
Automation scripting updates
Email edit and ops metrics fix
increase max records for query resources (#781)
Release to test - feature public key
Fix for feature 518 public keys
Cypress automation updates
ckan out of sync issue
Cypress support for gwa-cli
Fix the test failed due to change in gwa generate-config output (#958)
aps-2198 fix npm access denied
@rustyjux
Copy link
Contributor Author

Why are so many old commits showing? When I run git merge dev I get Already up to date.

@@ -158,6 +158,9 @@ const NamespacesPage: React.FC = () => {
text: 'Your Organization and Business Unit will appear here',
};
}, [namespace]);
useEffect(() => {
window.scrollTo(0, 0);
}, []);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is to avoid the /detail page loading scrolled down when navigated to from /list if the user has scrolled down there. Maintaining scroll is noticeable and problematic for users on smaller displays.

We could add namespace as a dependency in order to also scroll to top when changing GW using the dropdown. However, this also causes scroll to top when going back from /manager page, which seems undesirable.

In newer versions of NextJS, the default option for router.push is scroll to top (and one can easily modify it for each call) but that's a much bigger can of worms.

@rustyjux rustyjux closed this Aug 21, 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.

Clicking on gateway list entry doesn't always redirect
3 participants