Skip to content

Feature/seplan bk90 atualizacao componente texto#614

Open
GustavoFSoares wants to merge 12 commits intohomolfrom
feature/SEPLAN-BK90_atualizacao-componente-texto
Open

Feature/seplan bk90 atualizacao componente texto#614
GustavoFSoares wants to merge 12 commits intohomolfrom
feature/SEPLAN-BK90_atualizacao-componente-texto

Conversation

@GustavoFSoares
Copy link
Copy Markdown
Collaborator

@GustavoFSoares GustavoFSoares commented Mar 17, 2026

Task ID

Summary by CodeRabbit

Release Notes

  • Documentation

    • Added comprehensive guides for frontend development patterns, including form and pagination components.
    • Added detailed documentation for MenuPaginacao and SmaeTable components.
  • Refactor

    • Simplified form field integration across multiple views by streamlining component value binding patterns.
    • Updated SmaeText component documentation to reflect current usage modes.

@GustavoFSoares GustavoFSoares changed the base branch from homol to feature/claude March 17, 2026 19:26
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

This pull request adds comprehensive documentation for frontend components and refactors form field bindings across multiple views. The changes systematically remove explicit :model-value bindings from SmaeText components and replace vee-validate's <Field v-slot> pattern with direct SmaeText usage, while introducing documentation for component patterns and usage guidelines.

Changes

Cohort / File(s) Summary
Configuration & Documentation
.gitignore, frontend/CLAUDE.md
Updated .gitignore to ignore .claude/ only at repository root; added Portuguese frontend development documentation linking to project knowledge areas.
Component Documentation
frontend/src/components/MenuPaginacao.md, frontend/src/components/SmaeTable/README.md, frontend/src/components/camposDeFormulario/SmaeText/SmaeText.vue
Added detailed documentation for MenuPaginacao (query-param pagination) and SmaeTable (data table with columns, routing, slots); reduced SmaeText documentation from three to two usage modes, removing Field v-slot examples.
Form Field Refactoring (Single Field Removal)
frontend/src/views/acompanhamentos/AcompanhamentosCriarEditar.vue, frontend/src/views/mdo.acompanhamentos/AcompanhamentosCriarEditar.vue, frontend/src/views/mdo.portfolios/PortfoliosCriarEditar.vue, frontend/src/views/tarefas/TarefasCriarEditar.vue, frontend/src/views/transferenciasVoluntarias/RegistroDeTransferenciaCriarEditar.vue, frontend/src/views/transferenciasVoluntarias/TransferenciaDistribuicaoDeRecursos/TransferenciaDistribuicaoDeRecursosCriarEditar.vue
Removed explicit :model-value bindings from individual SmaeText textarea fields, relying on form integration via name prop.
Form Field Refactoring (Multiple Fields)
frontend/src/views/demandas/DemandasCriarEditar.vue, frontend/src/views/licoesAprendidas/LicoesAprendidasCriarEditar.vue, frontend/src/views/metas/AddEdit.vue, frontend/src/views/riscos/RiscosCriarEditar.vue, frontend/src/views/transferenciasVoluntarias/TransferenciasVoluntariasCriarEditar.vue, frontend/src/views/valoresLimites/ValoresLimitesCriarEditar.vue, frontend/src/views/variaveis/CicloAtualizacao/CicloAtualizacaoModalAdicionar.vue, frontend/src/views/variaveis/VariaveisCriarEditar.vue
Removed :model-value bindings from multiple textarea fields per file and/or refactored from vee-validate <Field v-slot> pattern to direct SmaeText usage; eliminated slot-driven value/change handlers.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

  • Fix/contador de caracteres travado em zero #585: Implements internal SmaeText changes (mode detection, valorLocal behavior, emitValue) that directly enable this PR's removal of explicit :model-value bindings across forms.
  • Feature/s97.g005 textarea #371: Applies the same refactoring pattern of replacing vee-validate <Field v-slot> with direct SmaeText components across overlapping view files (metas, variaveis, transferencias, cicloAtualizacao, portfolios).
  • Feature/ajuste cadastro demanda #567: Modifies DemandasCriarEditar.vue form initialization and schema coercion, directly affecting the same file where this PR refactors textarea field bindings and may require coordination.

Suggested reviewers

  • robsonsobral
  • Eduruiz

Poem

🐰 With binding threads now snipped with care,
Our forms grow light and debonair.
SmaeText speaks for itself so true,
While docs describe what components do.
A cleaner flow through every field,
The rabbit's work at last revealed! 📝✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title describes updating a text component (SmaeText), which is the primary change shown across multiple form views and documentation files, though it is partially focused on the larger refactoring of removing :model-value bindings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/SEPLAN-BK90_atualizacao-componente-texto

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 17, 2026

Deploying smae with  Cloudflare Pages  Cloudflare Pages

Latest commit: c7d5849
Status: ✅  Deploy successful!
Preview URL: https://9837232d.smae.pages.dev
Branch Preview URL: https://feature-seplan-bk90-atualiza.smae.pages.dev

View logs

/>
</Field>
:disabled="bloquearCampos"
:aria-disabled="bloquearCampos"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GustavoFSoares , não gostei do uso do disabled e do aria-disabled ao mesmo tempo aqui. Faz sentido ambos existirem, mas não sei se vale serem usados nesse caso. Eles deveriam ser excluídos do submit? Essa página usa controlledValues?

Acho que a implementação de aria-disabled poderia ativar um readonly. Que acha?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acho que pode ser só readonly nesses casos

Copy link
Copy Markdown
Collaborator

@robsonsobral robsonsobral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GustavoFSoares , você testou todas essas páginas? Acho que só tem uma que me deixa encucado.

Não lembro se a gente preparou o componente para o uso do atributo standalone do Vee-validate.

@GustavoFSoares GustavoFSoares force-pushed the feature/claude branch 2 times, most recently from 1539c6d to 2c0fa9e Compare March 20, 2026 17:47
Copy link
Copy Markdown
Collaborator

@robsonsobral robsonsobral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fez uma branch dependente da outra?

@GustavoFSoares GustavoFSoares changed the base branch from feature/claude to homol April 7, 2026 18:54
@GustavoFSoares GustavoFSoares force-pushed the feature/SEPLAN-BK90_atualizacao-componente-texto branch from d0a94e6 to c7d5849 Compare April 7, 2026 18:55
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/src/views/licoesAprendidas/LicoesAprendidasCriarEditar.vue (1)

80-85: ⚠️ Potential issue | 🟠 Major

Migrate from <Form> wrapper to useForm composition.

The <Form disabled> prop is ineffective—it doesn't disable nested controls. While the submit button is properly locked via isSubmitting and the spinner overlay provides visual feedback, this component should follow the project's pattern of using useForm (as in VariaveisCriarEditar.vue) instead of the deprecated <Form> wrapper. The disabled prop on Form can be removed; the actual form locking is already handled by button state and the overlay.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/views/licoesAprendidas/LicoesAprendidasCriarEditar.vue` around
lines 80 - 85, Replace the deprecated <Form> wrapper with the composition API
useForm pattern used in VariaveisCriarEditar.vue: remove the disabled prop on
the <Form> element and refactor this component to call useForm() in setup,
passing initialValues (itemParaEdicao), validation schema (schema) and the
submit handler (onSubmit) to the returned form context, then bind form state
(errors, isSubmitting, setFieldValue) from useForm to the template controls;
ensure chamadasPendentes.emFoco is no longer used as a Form prop and that submit
button still uses isSubmitting and the spinner overlay continues to provide the
lock.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@frontend/src/views/licoesAprendidas/LicoesAprendidasCriarEditar.vue`:
- Around line 80-85: Replace the deprecated <Form> wrapper with the composition
API useForm pattern used in VariaveisCriarEditar.vue: remove the disabled prop
on the <Form> element and refactor this component to call useForm() in setup,
passing initialValues (itemParaEdicao), validation schema (schema) and the
submit handler (onSubmit) to the returned form context, then bind form state
(errors, isSubmitting, setFieldValue) from useForm to the template controls;
ensure chamadasPendentes.emFoco is no longer used as a Form prop and that submit
button still uses isSubmitting and the spinner overlay continues to provide the
lock.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: df7f39e2-e01a-4ca7-a6a8-912373a5bd22

📥 Commits

Reviewing files that changed from the base of the PR and between e66ed13 and c7d5849.

📒 Files selected for processing (19)
  • .gitignore
  • frontend/CLAUDE.md
  • frontend/src/components/MenuPaginacao.md
  • frontend/src/components/SmaeTable/README.md
  • frontend/src/components/camposDeFormulario/SmaeText/SmaeText.vue
  • frontend/src/views/acompanhamentos/AcompanhamentosCriarEditar.vue
  • frontend/src/views/demandas/DemandasCriarEditar.vue
  • frontend/src/views/licoesAprendidas/LicoesAprendidasCriarEditar.vue
  • frontend/src/views/mdo.acompanhamentos/AcompanhamentosCriarEditar.vue
  • frontend/src/views/mdo.portfolios/PortfoliosCriarEditar.vue
  • frontend/src/views/metas/AddEdit.vue
  • frontend/src/views/riscos/RiscosCriarEditar.vue
  • frontend/src/views/tarefas/TarefasCriarEditar.vue
  • frontend/src/views/transferenciasVoluntarias/RegistroDeTransferenciaCriarEditar.vue
  • frontend/src/views/transferenciasVoluntarias/TransferenciaDistribuicaoDeRecursos/TransferenciaDistribuicaoDeRecursosCriarEditar.vue
  • frontend/src/views/transferenciasVoluntarias/TransferenciasVoluntariasCriarEditar.vue
  • frontend/src/views/valoresLimites/ValoresLimitesCriarEditar.vue
  • frontend/src/views/variaveis/CicloAtualizacao/CicloAtualizacaoModalAdicionar.vue
  • frontend/src/views/variaveis/VariaveisCriarEditar.vue
💤 Files with no reviewable changes (10)
  • frontend/src/views/tarefas/TarefasCriarEditar.vue
  • frontend/src/views/transferenciasVoluntarias/TransferenciaDistribuicaoDeRecursos/TransferenciaDistribuicaoDeRecursosCriarEditar.vue
  • frontend/src/views/mdo.portfolios/PortfoliosCriarEditar.vue
  • frontend/src/views/variaveis/VariaveisCriarEditar.vue
  • frontend/src/views/transferenciasVoluntarias/TransferenciasVoluntariasCriarEditar.vue
  • frontend/src/views/acompanhamentos/AcompanhamentosCriarEditar.vue
  • frontend/src/views/transferenciasVoluntarias/RegistroDeTransferenciaCriarEditar.vue
  • frontend/src/views/variaveis/CicloAtualizacao/CicloAtualizacaoModalAdicionar.vue
  • frontend/src/views/mdo.acompanhamentos/AcompanhamentosCriarEditar.vue
  • frontend/src/views/riscos/RiscosCriarEditar.vue

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.

2 participants