Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/blue-schools-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'voltra': minor
---

Add chart components for iOS and Android widgets and Live Activities, including bar, line, area, point, rule, and pie/donut charts.
8 changes: 6 additions & 2 deletions android/src/main/java/voltra/VoltraRN.kt
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,13 @@ class VoltraRN(

withContext(Dispatchers.Main) {
try {
// Try to reapply to the existing view first to avoid flickering/replacing
// Try to reapply to the existing view first to avoid flickering/replacing.
// IMPORTANT: Only use reapply for dimension-only changes (same payload).
// When the payload changes, always do a fresh apply to prevent stale
// style bleed (e.g. padding from a previous widget persisting because
// the new widget's RemoteViews doesn't explicitly reset it to zero).
var applied = false
if (frameLayout.childCount > 0) {
if (frameLayout.childCount > 0 && payloadStr == lastRenderedPayload) {
try {
val existingView = frameLayout.getChildAt(0)
remoteViews.reapply(context, existingView)
Expand Down
7 changes: 7 additions & 0 deletions android/src/main/java/voltra/generated/ShortNames.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ object ShortNames {
"fvar" to "fontVariant",
"fw" to "fontWeight",
"fgs" to "foregroundStyle",
"fss" to "foregroundStyleScale",
"f" to "frame",
"g" to "gap",
"gs" to "gaugeStyle",
Expand All @@ -83,6 +84,7 @@ object ShortNames {
"ly" to "layout",
"lp" to "layoutPriority",
"l" to "left",
"lgv" to "legendVisibility",
"ls" to "letterSpacing",
"lh" to "lineHeight",
"ll" to "lineLimit",
Expand All @@ -95,6 +97,7 @@ object ShortNames {
"mr" to "marginRight",
"mt" to "marginTop",
"mv" to "marginVertical",
"mrk" to "marks",
"me" to "maskElement",
"maxh" to "maxHeight",
"max" to "maximumValue",
Expand Down Expand Up @@ -163,6 +166,10 @@ object ShortNames {
"valig" to "verticalAlignment",
"wt" to "weight",
"w" to "width",
"xgs" to "xAxisGridStyle",
"xav" to "xAxisVisibility",
"ygs" to "yAxisGridStyle",
"yav" to "yAxisVisibility",
"zi" to "zIndex",
)

Expand Down
Loading
Loading