-
Notifications
You must be signed in to change notification settings - Fork 176
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
fix: Use feature detection to show the unsupported browser page #15813
Conversation
+ "';window.location.reload();return false;\" href=\"#\">Continue without updating</a> (not recommended)</sub></p>" | ||
+ "</body>\n" + "</html>"); | ||
// @formatter:on | ||
IOUtils.copy(getClass().getResourceAsStream("too-old.html"), page, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to allow people to customize this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean in a less fragile way than adding your own src/main/resources/com/vaadin/flow/server/too-old.html
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you say it like this: yes 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok now you can use src/main/resources/browser-too-old.html
instead :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🙇♂️ This is great! Having a way to customize this page is really good. We had requests in the past especially for translation and corporate styling needs. Could be something worth to mention as new feature for v24 - some people are really looking forward to it. Customizing it atm is just hacky
Note that if this is backported (it probably should be) then the feature set to detect is different (ResizeObserver should be ok) |
6667838
to
228d443
Compare
Kudos, SonarCloud Quality Gate passed!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I just wonder if we need to mark this as a "breaking change" since we removed a public API.
Perhaps nobody is using the WebBrowser.isTooOldToFunctionProperly()
method, but it would be good to mention the removal in the release notes
Yes, we could mention that even though usage is likely below 0.1% |
if (!('CSSLayerBlockRule' in window)) { | ||
window.location.search='v-r=oldbrowser'; | ||
} | ||
"""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is it a place where we put the checks for used features?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the place yes
) This removes the `WebBrowser. isTooOldToFunctionProperly()` method as it is no longer possible to determine this information based on the user agent. Fixes #14366
) (CP: 23.3) Changed to detect ResizeObserver This removes the `WebBrowser. isTooOldToFunctionProperly()` method as it is no longer possible to determine this information based on the user agent. Fixes #14366
) (CP: 23.3) Changed to detect ResizeObserver This removes the `WebBrowser. isTooOldToFunctionProperly()` method as it is no longer possible to determine this information based on the user agent. Fixes #14366
) (CP: 23.3) (#16024) Changed to detect ResizeObserver This removes the `WebBrowser. isTooOldToFunctionProperly()` method as it is no longer possible to determine this information based on the user agent. Fixes #14366 Co-authored-by: czp13 <61667986+czp13@users.noreply.github.com> Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Fixes #14366