Vaadin Flow Components V24.4.13
Vaadin Flow Components 24.4.13
This is a release of the Java integration for Vaadin Components to be used from the Java server side with Vaadin Flow.
Changes in Flow Components from 24.4.12
Changes in All Components
- Chore:
- ⧉ Increase Web-Component version
Changes in vaadin-charts-flow
- Breaking Changes:
-
⧉ Shim an implementation of
getSubStringLength
(#6663) (CP: 24.4). PR:6670.Estimate the rendered length of a substring of text in an SVG element. Supports wrapping/truncation of long labels in charts. Improve shims of getBBox and getSubStringLength: The prior implementations were relying on specific DOM structures that Highcharts used to create: if the measured element had children, all text was expected to be within those children, and none in the top-level element. Also, it did not handle arbitrary element nesting. The current version of Highcharts does not always follow these rules, and there were cases of structures like: Some text hereand some in a nested element In that example, 'Some text here' would be omitted from measurement. Replace that strategy with one that processes each text node separately, providing the context of the containing element, and recursing into all nested elements. after that change. The previous method of computing string width was a rough approximation based on average character width. This method produced suboptimal results in many situtations, generating extra space or overlapping text. Instead, use the string-pixel-width library to provide a better estimate. This library has per-character widths for a number of font families and variants, and results in widths much closer to the actual rendered style. As Lucida is used heavily in at least the test charts, and it is not natively supported by the library, add a custom mapping file including metrics for it. Also, improve detection of font family and font size, walking up the element parent chain (even potentially outside of the measured element) to find settings of these attributes. Add test for getSubStringLength to ensure proper handling of sub-strings crossing text nodes (and other cases). To support this, change the way methods are added to jsdom SVG elements: rather than adding them only for elements instantiated via createElementNS, add them to the SVGElement prototype. This makes them available for elements created by any method of instantiation (including by setting innerHTML, as used in the test). Use rewire to access private elements of the exporter during tests.
-