[PAGES-45] Support URL fragments in preview mode Created: 19/Nov/15 Updated: 20/Mar/17 Resolved: 17/Mar/17 |
|
| Status: | Closed |
| Project: | Magnolia pages module |
| Component/s: | None |
| Affects Version/s: | 5.4.1 |
| Fix Version/s: | 5.4.11, 5.5.3 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Nils Breunese | Assignee: | Milan Divilek |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Date of First Response: | |||||
| Sprint: | Kromeriz 87 | ||||
| Story Points: | 5 | ||||
| Description |
|
In the preview mode we have a menu that uses a url fragment identifier (#part) of the url.
http://ip169-093.vpro.nl:8085/vpronl-sample/?mgnlPreview=true&mgnlChannel=desktop&mgnlChannel=desktop&mgnlPreview=true#navigation-overlay&mgnlChannel=desktop&mgnlPreview=true
It looks like the code in info.magnolia.ui.vaadin.gwt.client.connector.PageEditorConnector basically adds the parameters to the path:
eventBus.addHandler(FrameNavigationEvent.TYPE, new FrameNavigationEventHandler() {
@Override
public void onFrameUrlChanged(FrameNavigationEvent frameUrlChangedEvent) {
String path = frameUrlChangedEvent.getPath();
final String platformId = getState().parameters.getPlatformType().getId();
path += path.indexOf('?') == -1 ? "?" : "&";
path += "mgnlChannel=" + platformId;
final boolean isPreview = getState().parameters.isPreview();
path += "&mgnlPreview=" + isPreview;
view.setUrl(path);
}
});
This does not allow for url fragment identifiers. |
| Comments |
| Comment by Nils Breunese [ 19/Nov/15 ] |
|
It would probably be best to properly parse the URL into path, query parameters and fragment, modify the query parameters if needed and then rebuild the URL from those components. |