Skip to content

feat(transaction-list-expandable): expose isInverted on parent and children#1085

Draft
acassiovilasboas wants to merge 2 commits into
masterfrom
feature/BAN-57-expandable-inverted
Draft

feat(transaction-list-expandable): expose isInverted on parent and children#1085
acassiovilasboas wants to merge 2 commits into
masterfrom
feature/BAN-57-expandable-inverted

Conversation

@acassiovilasboas

@acassiovilasboas acassiovilasboas commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Resumo

Estende o flag isInverted (introduzido em OceanTransactionListItem) ao componente expandable, cobrindo tanto o parent (OceanParentTransactionListExpandable) quanto os children (OceanChildTransactionListExpandable).

  • Adiciona isInverted: Boolean = false em OceanTransactionListExpandableItem.
  • Propaga item.isInverted para o OceanTransactionListItem interno em ambos os wrappers.
  • Sem regra acoplada pai → filho: cada item carrega seu próprio flag e é honrado individualmente. Quem precisar pode inverter só o parent, só os children, ou os dois.
  • Atualiza o OceanTransactionListExpandablePreview e o TransactionListItemActivity com um cenário default e um invertido lado a lado para validação visual.

Contexto

Origem: PR Pagnet/blu-mobile-android#3632 (extrato com isInverted no OceanTransactionListItem direto). Os agrupamentos COLLAPSE_GROUP ficaram fora do escopo porque o expandable ainda não expunha o parâmetro. Esta PR fecha esse gap. Próxima PR no consumer (Pagnet/blu-mobile-android) bumpa a versão e passa isInverted = true no helper do ExtractFragment.

Notas de implementação

  • Precedência isInverted vs. primaryLabelStyle/secondaryLabelStyle explícitos já está correta no OceanTransactionListItem (ver linhas 188–208) — isInverted vence sobre os styles passados explicitamente. Sem ajuste extra necessário no item base.
  • Default false em todas as superfícies novas → retrocompat total. Nenhum consumer existente do OceanTransactionListExpandable muda comportamento.

Test plan

  • Preview Compose OceanTransactionListExpandablePreview renderiza o novo bloco com:
    • Parent invertido: primaryLabel em OceanTextStyle.description + OceanColors.interfaceDarkDown; secondaryLabel em OceanTextStyle.paragraph + OceanColors.interfaceDarkDeep. Mantém o chevron up/down.
    • Children invertidos: idem para primaryLabel/secondaryLabel, com o leading icon do grupo, valor em heading5 e divider interno entre filhos preservados.
  • Os blocos default (isInverted = false) acima permanecem visualmente idênticos ao comportamento atual.
  • Sample TransactionListItemActivity exibe o novo expandable invertido após o bloco existente, sem regressão nos itens de cima.

Before

image

After

image

Refs

acassiovilasboas and others added 2 commits May 7, 2026 17:09
…ildren

Adds isInverted flag to OceanTransactionListExpandableItem and propagates
to the underlying OceanTransactionListItem in both
OceanParentTransactionListExpandable and OceanChildTransactionListExpandable.
Each item carries its own flag (no parent → child coupling), so callers
can invert the parent, the children, or both independently.

Updates the Compose preview and the TransactionListItemActivity sample
with a default vs. inverted scenario.

Refs BAN-57.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The expandable inverted scenario belongs alongside the other
OceanTransactionListExpandable samples, not in the item activity.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented May 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
20.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant