New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Links with stream resource are broken in CCDM #7623
Comments
You can mark such links with a Will update the docs. |
Update after f2f between @Legioth and CCDM team: we need to think more and have a design decision here. Right now there is a mismatch between defaults in Vaadin Router and Flow:
Options:
Links that are not for client-side navigation must opt-out explicitly. Pros: Client-side views with client-side navigation are simple, as they can just use standard links. Cons: Breaking for some existing links in Flow:
Pros: Client-side views are simple too. Anchor usage is not affected. Downloads using Anchor work by default. Cons: Still breaking for links in Flow that are not Anchor and not client-side.
Pros: Not breaking anything for Flow. Cons: Breaking change in Vaadin Router. Slightly harder to build links in client-side views, requires a
Pros: Not breaking anything. Cons: Sample as above, except does not require a breaking change in Vaadin Router. Some additional bundle and maintenance costs for the workaround. |
Option 2 has the unexpected side effect that We can still consider giving special treatment to Another potential approach would be to go with option 1, but also document how to reconfigure the client-side router to work in the old way in order to ease migration. In any case, any of the alternatives would also need to be clearly documented. |
As a user, I would expect:
|
Concluded in F2F:
|
As far as I understood, the fix of linking to |
* Add known issue for default link behaviour in Flow 3 Related to vaadin/flow#7623
Why was this closed without the issue being fixed? |
Let's reopen it. I was dragging the related PR to the Closed column, the ticket moved along with the PR. |
The fix for this issue broke the behavior when
Like it's done in full stack starter |
We shouldn't remove that attribute if it wasn't added by us. It might be easiest to just never remove it since it's quite rare to on-the-fly change between a stream resource and a regular href. |
ok, I made a new ticket #7804 for the new issue and closing this one. |
Why is this mentioned as limitation in the V23 release? Isn't that fixed since a long time? |
Use
com.vaadin.flow.uitest.ui.StreamResourceView
test.It sets a link (
a
element) with a dynamic resource viaStreamResource
:Open the
http://localhost:8888/view/com.vaadin.flow.uitest.ui.StreamResourceView
page.There will be a link.
Click on it.
Result: there is an attempt to apply a routing for the URI. But there is no such route. Navigation can't be done and there is a routing error.
Expected: the file is downloaded.
In fact the file can be downloaded : you may copy a link to the clipboard and open it in another tab.
Then everything works fine.
So apparently routing is applied when it should not be applied. That worked fine without CCDM.
Most likely broken because of CCDM.
The text was updated successfully, but these errors were encountered: