cloudoperators / juno

Monorepo for the Juno modular frontend framework, apps, design system and component library
http://cloudoperators.github.io/juno/
Apache License 2.0
4 stars 0 forks source link

fix(heureka): corrects URL state handling for filter property #603

Closed hodanoori closed 2 weeks ago

hodanoori commented 2 weeks ago

Summary

Fixed an issue where activeFilters were not immediately applied after URL updates, requiring additional actions to trigger synchronization. Refactored useUrlState by updating useEffect dependencies to ensure real-time syncing of URL state and filters when changes occur. Additionally, restored the missing activeFilters prop in FilterSelect within the Filters control.

Furthermore, the detailsFor prop is now handled correctly, ensuring that when a detail panel is closed, the corresponding detailsFor information is removed from the URL, maintaining a clean and accurate URL state.

Changes Made

Related Issues

Testing Instructions

For example, the following part of URL should display the Support group ccrn = compute-storage-api filter on the Services view: f:(Components:(:),IssueMatches:(:),Services:(supportGroupCcrn:(compute~Fstorage~Fapi)))

  1. npm i
  2. npm run TASK

Checklist

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 5c8e01afedac0f1e8dd187186a8b6c49cff1bca7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ----------------------------------- | ----- | | @cloudoperators/juno-app-heureka | Patch | | @cloudoperators/juno-app-greenhouse | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions[bot] commented 2 weeks ago

PR Preview Action v1.4.8 :---: Preview removed because the pull request was closed. 2024-11-15 10:44 UTC

hodanoori commented 2 weeks ago

Hi! I started checking the preview, and here’s what I noticed so far: the current page in pagination isn't being saved in the URL. For example, if I'm on page 3/3 in the Services tab and click on a service, the details panel opens correctly. However, when I reload the page, while the panel is correctly populated, the pagination resets to page 1/3, breaking the connection to the details shown in the panel. Could this behavior be related to the recent improvements?

Hi Arturo, nice catch, yes, the pagination is not correctly kept in the URL. But I will add the check for pagination and search in url state in a separate PR, if it's fine for you.

hodanoori commented 2 weeks ago

I'm experiencing the same issue with the search term. It seems that both pagination and the search term are not being reflected in the URL, correct?

Correct, I fix the search along with pagination in next PR.

hodanoori commented 2 weeks ago

By clicking I have noticed that the description of an IssueMatch in the details panel stays in Loading state for ever. Is this an Issue and do you want to create a ticket for it? Screenshot 2024-11-15 at 09 16 05

This is known to me, I fix this issue also in a separate PR.