Skip to content

Conversation

@tmscarla
Copy link
Contributor

@tmscarla tmscarla commented Feb 17, 2023

Description

Currently when loading PCUI with a deep link pointing to a specific cluster (e.g. /clusters/{:clusterName}), the cluster in the deep link does not get selected.

Steps to reproduce:

  1. select a cluster and refresh the page
  2. see that no cluster gets selected

This PR aims at solving this issue by extracting the clearAllState out of the LoadInitialState function and call it directly in the region selection callback, since its purpose is to clear the state when LoadInitialState is called when changing the region.

Closes #30.

How Has This Been Tested?

  1. Selected a cluster
  2. Refreshed page
  3. Verified that cluster is still selected

PR Quality Checklist

  • I added tests to new or existing code
  • I removed hardcoded strings and used react-i18next library (useTranslation hook and/or Trans component), see an example here
  • I made sure no sensitive info gets logged at any time in the codebase (see here) (e.g. no user info or details, no stacktraces, etc.)
  • I checked that infrastructure/update_infrastructure.sh runs without any error
  • I checked that npm run build builds without any error
  • I checked that clusters are listed correctly
  • I checked that a new cluster can be created (config is produced and dry run passes)
  • I checked that login and logout work as expected

In order to increase the likelihood of your contribution being accepted, please make sure you have read both the Contributing Guidelines and the Project Guidelines

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@tmscarla tmscarla merged commit 64963a4 into main Feb 17, 2023
@tmscarla tmscarla deleted the tsscarla/cluster-deep-link branch February 17, 2023 15:23
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.

Bookmarking a page with a cluster instance selected will not select back that instance when the user navigates to the bookmarked URL

2 participants