mui / toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
964 stars 243 forks source link

Reload of a page editor always switches to the first page #1551

Closed Janpot closed 1 year ago

Janpot commented 1 year ago

Duplicates

Latest version

Steps to reproduce 🕹

Steps:

  1. Open the editor on an app with multiple pages
  2. Open any of the pages other than the first page
  3. Hit reload

Current behavior 😯

The url switches to the first page

Expected behavior 🤔

The url stays on the selected page

Context 🔦

This line is the culprit https://github.com/mui/mui-toolpad/blob/4f4f4f1e80c943098be66a9417f455006a9ae1dc/packages/toolpad-app/src/toolpad/AppEditor/index.tsx#L58

This will need an integration test

Your environment 🌎

No response

apedroferreira commented 1 year ago

Thanks for catching this, I'll look into it!

Janpot commented 1 year ago

We should also look if it's still possible to navigate to a Toolpad editor url with query parameters.

apedroferreira commented 1 year ago

We should also look if it's still possible to navigate to a Toolpad editor url with query parameters.

You mean as a new feature? We didn't have any case where it was possible to do that yet, right? If so I'll create a new issue for it.

Janpot commented 1 year ago

I think it was possible for pages, but I may be wrong. I'm pretty sure it didn't use to eliminate them. Not sure if also it did something with them.

oliviertassinari commented 1 year ago

It's a regression, probably a recent one, I confused me a couple of timed this week improving a few of the toolpad apps.