uhuruphotos-android
uhuruphotos-android copied to clipboard
Update dependency com.patrykandpatrick.vico:compose-m2 to v1.14.0
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
com.patrykandpatrick.vico:compose-m2 | 1.9.2 -> 1.14.0 |
[!WARNING] Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
patrykandpatrick/vico (com.patrykandpatrick.vico:compose-m2)
v1.14.0
This release introduces fixes and improvements, including a performance boost. Read the release notes.
v1.13.1
This release includes the following changes.
API changes
- In
MutableExtraStore
, an error affectingremove
has been resolved. The function accepted onlyExtraStore.Key
instances withDrawingModel
or a subtype thereof as the type parameter’s value. Now, allExtraStore.Key
instances are accepted.
v1.13.0
This release includes the following changes.
Since v1.13.0-beta.1
Resolved issues
- Crashes occurred in
ComposedChart
when no model was available or when the available model had fewer data sets than theComposedChart
had nestedChart
s.
Since v1.12.0
Improvements
- The default
AxisItemPlacer.Vertical
implementation now requests no insets whenmaxItemCount
is zero. Thus, to create an axis with no labels, ticks, or guidelines, it’s sufficient to useAxisItemPlacer.Vertical.default(maxItemCount = 0)
. (See #​445.) - When the precision of a chart’s x values is too large for the GCD of their deltas to be calculated, a descriptive exception is now thrown. (See #​374.)
API changes
-
The animation system has been entirely rewritten. Difference animations are smoother, behave better when the y range changes due to a data update, and exhibit better performance. Redundant calls to
AxisValuesOverrider
functions are no longer made, and numerous visual glitches have been resolved.DiffProcessor
has been removed in favor ofChart.ModelTransformer
andDrawingModelInterpolator
. Use the latter for custom difference animations.ColumnChart
andLineChart
havedrawingModelInterpolator
fields, and in thecompose
module, thelineChart
andcolumnChart
functions havedrawingModelInterpolator
parameters. InChartModelProducer
,progressModel
has been renamed totransformModel
, and itsprogress
parameter has been renamed tofraction
. This change is reflected across related APIs. -
Updates have been made to
ChartEntryModelProducer
andComposedChartEntryModelProducer
.-
ComposedChartEntryModelProducer
, rather than being a combination ofChartEntryModelProducer
s, is now independent and uses a list of data sets, with each one corresponding to a single nestedChart
. This makes the API easier to use and resolves synchronization-related issues. To run data updates, userunTransaction
orrunTransactionSuspending
. To create aComposedChartEntryModelProducer
, useComposedChartEntryModelProducer.build
, which lets you run an initialTransaction
. Refer to theTransaction
documentation for more information. Below, the first code block uses APIs from Vico 1.12.0, and the second one shows how to achieve the same result in Vico 1.13.0.val chartEntryModelProducer1 = ChartEntryModelProducer(a) val chartEntryModelProducer2 = ChartEntryModelProducer(b) val composedChartEntryModelProducer = chartEntryModelProducer1 + chartEntryModelProducer2 chartEntryModelProducer1.setEntries(c) chartEntryModelProducer2.setEntries(d)
val composedChartEntryModelProducer = ComposedChartEntryModelProducer.build { add(a) add(b) } composedChartEntryModelProducer.runTransaction { /* Because we’re not calling `populate`, the new list of data sets is empty, so we use `add` instead of `set`. */ add(c) add(d) }
-
The
ComposedChartEntryModelProducer.composedChartEntryModelOf
function has been removed in favor of theplus
operator function forChartEntryModel
s. -
To resolve a problem where
ChartEntryModelProducer
andComposedChartEntryModelProducer
accepted all updates immediately, even if an update was already running—in which caseConcurrentModificationException
s andNullPointerException
s occurred—we’ve reworked the update mechanism.ChartEntryModelProducer#setEntries
,ComposedChartEntryModelProducer#runTransaction
, andComposedChartEntryModelProducer.Transaction#commit
can reject an update if there’s already one in progress. Each of these functions returns aBoolean
indicating whether the requested update has been accepted or rejected.ChartEntryModelProducer#setEntriesSuspending
,ComposedChartEntryModelProducer#runTransactionSuspending
, andComposedChartEntryModelProducer.Transaction#commitSuspending
suspend the current coroutine until an update can be run. Data updates typically take a few milliseconds to be processed, so unless your chart is frequently updated and you experienced CMEs and NPEs in previous Vico versions,ChartEntryModelProducer#setEntries
,ComposedChartEntryModelProducer#runTransaction
, andComposedChartEntryModelProducer.Transaction#commit
are safe to use. BecauseChartEntryModelProducer
andComposedChartEntryModelProducer
now use coroutines, they no longer acceptExecutor
s—rather, you can specify a customCoroutineDispatcher
. (See #​408.) -
ChartEntryModelProducer
andComposedChartEntryModelProducer
now let you define extras (auxiliary data). These can later be read viaChartEntryModel#extraStore
. Extras are useful for properties that should change with the chart data and can’t be directly derived from it or should be precalculated. For example, if you create a list of x-axis labels for your chart data, you can store this list as an extra to ensure that it’s always in sync with the data.ChartEntryModelProducer#setEntries
has anupdateExtras
parameter, and inComposedChartEntryModelProducer
, theTransaction
class has anupdateExtras
function. (See #​363.)
-
-
Automatic padding for extreme
HorizontalAxis
labels has been introduced. WithHorizontalLayout.FullWidth
, this option adds such an amount of horizontal padding to the chart that the labels forChartValues#minX
andChartValues#maxX
are fully visible. To turn this on, use theaddExtremeLabelPadding
parameter ofAxisItemPlacer.Horizontal.default
or theaddExtremeHorizontalAxisLabelPadding
XML attribute from theAxis
attribute set.AxisItemPlacer.Horizontal
has two new functions,getAddFirstLabelPadding
andgetAddLastLabelPadding
.AxisRenderer
has a newupdateHorizontalDimensions
function. In theChart
interface,updateHorizontalDimensions
replacesgetHorizontalDimensions
. (See #​431.) -
Chart placeholders have been added. These are displayed in charts with
ChartModelProducer
s when noChartEntryModel
is available (no data has been added to theChartModelProducer
). TheChart
composable function has aplaceholder
slot, andBaseChartView
accepts a child view. For the latter, you can also useBaseChartView#setPlaceholder
. In both cases, the default placeholder is blank. Internally, the somewhat ambiguous concept of emptyChartEntryModel
s has been removed—if there’s no data, there’s noChartEntryModel
. Thus, where appropriate,ChartEntryModel
types are now nullable. In particularChartModelProducer#getModel
may now returnnull
. If you’re sure that aChartEntryModel
is available (data has been added), you can useChartModelProducer#requireModel
. (See #​414.) -
For greater flexibility,
HorizontalLayout.FullWidth
now lets you add both scalable (zoom-dependent) and unscalable padding.startPaddingDp
andendPaddingDp
have been replaced withscalableStartPaddingDp
,scalableEndPaddingDp
,unscalableStartPaddingDp
, andunscalableEndPaddingDp
. TheHorizontalLayout.fullWidth
function from thecompose
module has been updated accordingly. (We were unable to use deprecation because Kotlin’s overload resolution doesn’t consider it. When both a deprecated overload and a non-deprecated overload match a call, the deprecated overload may be used, and there’s no direct way around this.) ThestartContentPadding
andendContentPadding
XML attributes have been marked as deprecated and replaced withscalableStartContentPadding
,scalableEndContentPadding
,unscalableStartContentPadding
, andunscalableEndContentPadding
attributes. -
In
MeasureContext
,chartValuesManager
(of typeChartValuesManager
) has been replaced withchartValuesProvider
(of typeChartValuesProvider
).ChartValuesProvider
has the samegetChartValues
function thatChartValuesManager
does, so it’s sufficient to replacechartValuesManager
withchartValuesProvider
where the former can’t be resolved.ChartValues
updates are to be run earlier on. -
Selected deprecated APIs with
DeprecationLevel.ERROR
have been removed.
Resolved issues
- Automatic scrolling failed to work in some instances. (See here.)
- Automatically scaled charts’ initial zoom could be incorrectly calculated. (See here.)
- XML attributes could fail to be applied.
- The default x step for multi-series data sets could be incorrect. (See #​417.)
- The
plus
operator function forChartEntryModel
s incorrectly handledComposedChartEntryModel
s. - Charts created via the
Chart
composable function didn’t respond to changes to thehorizontalLayout
parameter’s value and density changes that didn’t cause the function to leave and reenter the composition.
Dependency updates
- All modules now use Kotlin 1.9.20.
- In the
compose
,compose-m2
, andcompose-m3
modules, the Jetpack Compose BOM has been updated from version 2023.09.01 to version 2023.10.01.
v1.12.0
This release includes the following changes.
Improvements
- The
Chart
composable function no longer runs initial animations in previews. This is to prevent empty noninteractive previews. (See #​369 and #​389. Thanks to @​Leedwon for contributing.)
API changes
-
DefaultMarkerLabelFormatter
is now a regular class, not an object, and has acolorCode
property. (See #​183.)
Bug fixes
- An issue where
VerticalAxis
instances could show one more label thanmaxLabelCount
allowed has been resolved. (See #​387 and #​388. Thanks to @​p-fischer for contributing.)
v1.11.3
This release includes the following changes.
Bug fixes
- An issue where
MarkerComponent
rounded the maximum label width down, causing issues withSpannable
s, has been resolved. (See #​381.)
v1.11.2
This release includes the following changes.
Bug fixes
- The default
AxisItemPlacer.Horizontal
implementation, which can be created viaAxisItemPlacer.Horizontal.default
, now works properly whenChartValues#minX
isn’t a multiple ofChartValues#xStep
.
v1.11.1
Improvements
- In the
compose
module,LocalChartStyle
now caches the defaultChartStyle
, significantly improving performance in setups whereProvideChartStyle
isn’t used.
v1.11.0
This release includes the following changes.
Additions
- In
TextComponent
, thegetWidth
,getHeight
, andgetTextBounds
functions have a new parameter,pad
. When this is set totrue
,text
is extended by such a number of blank lines that it haslineCount
lines, which can be useful for certain measurement operations.
Improvements
- The
Chart
composable function’sdiffAnimationSpec
parameter is now nullable, and passingnull
disables difference animations. This is recommended over usingsnap
.
API changes
- Because
AxisItemPlacer.Horizontal#getMeasuredLabelClearance
is no longer used, it has been marked as deprecated. Overrides of this function can be removed. -
MeasureContext#chartScale
has been removed. This field’s value was sometimes inaccurate, as once all elements have been measured, the zoom factor may be overridden (e.g., forAutoScaleUp
to take effect). UseChartDrawContext#zoom
instead.
Bug fixes
- An issue where, when
AutoScaleUp.Full
was in effect, chart zooming worked incorrectly has been resolved. (See #​342.) -
FadingEdges
instances now work as expected in charts that are zoomed in or zoomed out. - In the
views
module, the threeFadingEdges
-related XML attributes now work properly. - An issue where some elements requested insufficient insets, potentially leading to clipping, has been fixed.
-
ChartEntryModel
s created viachartEntryModelOf
now have unique IDs.
Thanks to @​p-fischer for contributing.
v1.10.1
This release includes the following changes.
Bug fixes
- Text is now correctly scaled on Android 13 and below. (See #​364.)
v1.10.0
This release includes the following changes.
API changes
- In
MeasureContext
, because Android 14 introduces non-linear font scaling,fontScale
has been removed. UsespToPx
instead. - In
MeasureContext
, for clarity,toPixels
has been renamed todpToPx
, andtoFontSize
has been renamed tospToPx
. The functions with the old names have been marked as deprecated.
Bug fixes
- An issue where, in unscrolalble charts, it could be impossible to trigger the display of a
Marker
for the last visible entry no longer occurs. (See #​320.) - In the
compose
module, gesture handling now works properly with version 2023.08.00 of the Jetpack Compose BOM. (See #​358.) - An issue where
TextComponent
could produce garbled text, particularly inMarkerComponent
s, has been resolved. (See #​357.) -
MarkerComponent
now limits the label width.
Configuration
đź“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.