Skip to content

Adicionar suporte a v-model ao SegmentedControl#1093

Open
lucasn4s wants to merge 5 commits into
mainfrom
feature/segmented-control-v-model-3936232099814014702
Open

Adicionar suporte a v-model ao SegmentedControl#1093
lucasn4s wants to merge 5 commits into
mainfrom
feature/segmented-control-v-model-3936232099814014702

Conversation

@lucasn4s

Copy link
Copy Markdown
Collaborator

Adicionado suporte a two-way binding com v-model ao componente SegmentedControl.

Principais mudanças:

  • Refatoração do componente para a sintaxe <script setup>.
  • Implementação do v-model utilizando defineModel.
  • Garantia de que o primeiro segmento seja selecionado por padrão caso nenhum valor inicial seja fornecido, mantendo o comportamento anterior.
  • Atualização da documentação com exemplos de uso do v-model.
  • Adição de testes unitários para validar o suporte ao v-model.
  • Atualização da versão do projeto para 3.159.0.

Fixes #1092


PR created automatically by Jules for task 3936232099814014702 started by @lucasn4s

- Refactor SegmentedControl to <script setup>
- Add v-model support using defineModel
- Maintain backward compatibility with existing props and events
- Update documentation with v-model examples
- Add unit tests for v-model functionality
- Update project version to 3.159.0

Co-authored-by: lucasn4s <17988272+lucasn4s@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions Bot added the 🐛 Bug Algo não está funcionando label May 22, 2026
@greptile-apps

greptile-apps Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Este PR adiciona suporte a v-model no SegmentedControl. As principais mudanças são:

  • Refatoração do componente para <script setup>.
  • Inclusão de defineModel para two-way binding.
  • Seleção automática do primeiro segmento quando não há valor inicial.
  • Atualização da documentação e dos metadados gerados.
  • Novos testes unitários para o fluxo com v-model.
  • Atualização da versão do pacote para 3.159.0.

Confidence Score: 3/5

Eu corrigiria estes comportamentos antes de fazer o merge.

  • O componente pode alterar o estado do pai no mount sem interação do usuário.

  • Valores controlados falsy podem ser sobrescritos pela seleção automática.

  • Listas de segmentos carregadas depois do mount podem ficar sem item ativo.

  • A documentação do novo evento está incompleta.

  • src/components/SegmentedControl.vue

  • docs/.docgen/components-metadata.json

  • docs/components/navegação/segmented-control.md

Important Files Changed

Filename Overview
src/components/SegmentedControl.vue Adiciona v-model, mas a inicialização do modelo pode alterar o estado do pai e não cobre listas carregadas depois do mount.
docs/components/navegação/segmented-control.md Documenta o novo uso com v-model, mas o exemplo referencia um estado não declarado.
docs/.docgen/components-metadata.json Atualiza os metadados do componente, mas não lista o evento update:modelValue.

Reviews (1): Last reviewed commit: "feat: add v-model support to SegmentedCo..." | Re-trigger Greptile

Comment thread src/components/SegmentedControl.vue
Comment thread src/components/SegmentedControl.vue Outdated
Comment thread src/components/SegmentedControl.vue
Comment thread docs/.docgen/components-metadata.json
Comment thread docs/components/navegação/segmented-control.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug Algo não está funcionando

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adicionar suporte a v-model ao SegmentedControl

2 participants