Skip to content

feat: Follow navigation in preview view - #7550

Closed
distantnative wants to merge 9 commits into
develop-minorfrom
feat/preview-view-navigate
Closed

feat: Follow navigation in preview view#7550
distantnative wants to merge 9 commits into
develop-minorfrom
feat/preview-view-navigate

Conversation

@distantnative

@distantnative distantnative commented Aug 16, 2025

Copy link
Copy Markdown
Member

Description

Feature for the new Panel preview view that allows users to navigate in the frontend iframe and the Panel following their navigation (syncing to the newly page they navigated to):

Screen.Recording.2025-08-16.at.14.13.40.mp4

Merge first

Changelog

🎉 Features

  • Preview view: When you navigate through your frontend, the Panel syncs to the new location

For review team

  • Add changes & docs to release notes draft in Notion

@distantnative distantnative self-assigned this Aug 16, 2025
@distantnative distantnative changed the title Feat/preview view navigate feat: Follow navigation in preview view Aug 16, 2025
@distantnative
distantnative force-pushed the feat/preview-view-navigate branch from 0cd8a9e to 858ed18 Compare August 16, 2025 16:15
@distantnative distantnative added this to the 5.1.0 milestone Aug 16, 2025
@lukasbestle
lukasbestle changed the base branch from develop-minor to refact/http-uri-query-params August 17, 2025 19:41
@distantnative
distantnative force-pushed the refact/http-uri-query-params branch 2 times, most recently from c41305a to 6cc0244 Compare August 17, 2025 19:51
Base automatically changed from refact/http-uri-query-params to develop-minor August 18, 2025 06:12
@bastianallgeier bastianallgeier modified the milestones: 5.1.0, 5.2.0 Aug 18, 2025
@distantnative
distantnative force-pushed the feat/preview-view-navigate branch from 858ed18 to d740601 Compare August 18, 2025 18:12
@distantnative
distantnative marked this pull request as ready for review August 18, 2025 18:16
@distantnative
distantnative requested a review from a team August 18, 2025 18:16
Comment thread panel/src/components/Views/Preview/PreviewBrowser.vue Outdated
@distantnative
distantnative force-pushed the feat/preview-view-navigate branch 2 times, most recently from 85f7c67 to 8f3a410 Compare September 4, 2025 17:42
@bastianallgeier

Copy link
Copy Markdown
Member

There are two things that I found when testing it with the demokit.

  1. When you click on a link that has target _blank, the onClick handler would still try to open a new window for it and Firefox supresses that with a warning. I think we should check what the target for the link is.

  2. When I click on one of the "View source" links in the footer, the link is internal, but there's no matching model and a warning will pop up. Could we check for that error and still open the link in a new window?

@distantnative
distantnative marked this pull request as draft October 7, 2025 13:54
@bastianallgeier bastianallgeier removed this from the 5.2.0 milestone Dec 2, 2025
@distantnative
distantnative force-pushed the feat/preview-view-navigate branch from abc18be to 2169a5a Compare December 13, 2025 19:05
Comment thread src/Panel/Controller/View/ModelPreviewViewController.php Fixed
Comment thread src/Panel/Controller/View/ModelPreviewViewController.php Fixed
Comment thread src/Panel/Controller/View/ModelPreviewViewController.php Fixed
Comment thread src/Panel/Controller/View/ModelPreviewViewController.php Fixed
Comment thread src/Panel/Controller/View/ModelPreviewViewController.php Fixed
Comment thread src/Panel/Controller/View/ModelPreviewViewController.php Fixed
Comment thread src/Panel/Controller/View/ModelPreviewViewController.php Fixed
@distantnative

Copy link
Copy Markdown
Member Author

@bastianallgeier I have dived into this again

  1. I hope this has been solved with 2169a5a

  2. Checking for that error is pretty hard as our Panel setup just grabs it as RequestError with the actual error message ending up deep in the view object. And event if I try to grab that at the request module, I still have trouble routing it back to the original view that called $panel.view.reload(). What does work is not throwing a LogicException but a Redirect though this does not open a new window but redirects the current one. Would this be an acceptable middle ground? Or do you see any way to catch the error inside k-preview-view?

Comment thread src/Panel/Controller/View/ModelPreviewViewController.php Fixed
@distantnative
distantnative force-pushed the feat/preview-view-navigate branch from 51f2e3b to 50ad74b Compare December 13, 2025 19:46
@distantnative
distantnative force-pushed the feat/preview-view-navigate branch from e155735 to 43ec1a3 Compare December 13, 2025 19:53
@distantnative
distantnative marked this pull request as ready for review December 13, 2025 19:57
@distantnative

Copy link
Copy Markdown
Member Author

@bastianallgeier I added a checkbox to enable/disable the behavior. We probably want a better UI for that. But I realized working on the live edit mode that there sometimes following navigation (and pulling up the right model/fields) is great, but sometimes you might rather want to look at e.g. the blog overview page while editing a specific blog post (and stay on the blog post fields no matter how navigating around in the iframe).

@bastianallgeier

Copy link
Copy Markdown
Member

@distantnative maybe it's a good idea to work on this in combination with the live editing feature for v6 then?

@distantnative

Copy link
Copy Markdown
Member Author

We could move it to v6 as well, would be fine with me.

@distantnative

Copy link
Copy Markdown
Member Author

Added it to #7780

@distantnative
distantnative deleted the feat/preview-view-navigate branch December 15, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants