Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix PLATIA-2534 #582

Merged
merged 9 commits into from
Jun 2, 2022
Merged

Bug fix PLATIA-2534 #582

merged 9 commits into from
Jun 2, 2022

Conversation

yargo11
Copy link
Contributor

@yargo11 yargo11 commented May 19, 2022

  • Please check if the PR fulfills these requirements
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Tasks are beign paginated correctly, quantified per page

  • What is the current behavior? (You can also link to an open issue here)
    Tasks table is loading all the tasks, even showing only 10 or 20 (setted by the page size)

  • What is the new behavior (if this is a feature change)?
    The table is loading tasks setted by the page size

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    no

  • Is there any issue related to this PR in other repository? (such as platiagro/web-ui)
    no

  • Other information:
    Changes was needed on .test files

@yargo11 yargo11 requested a review from LuanEdCosta May 19, 2022 02:39
@github-actions
Copy link

Dicas para revisão de código

Commits

  • Título (1a linha do commit): apresentar resumo do que foi alterado/adicionado/removido.
    ex: adiciona action que salva parametros no backend; exibe rótulo no componente de selecao de dataset;
  • Descrição (outras linhas): dar mais detalhes de cada alteração:
    • motivos das alterações
      ex: havia um bug que causava...; nova funcionalidade que faz isso...; código foi movido para...;
    • bibliotecas adicionadas e versões (package.json)
      ex: atualiza para antd v4.6;
    • testes unitários criados/alterados
      ex: adiciona testes para a action fetchProjectSuccess;
  • Mensagens auto-explicativas! Quem revisa o código deve entender o que foi feito (e porque foi feito) sem perguntar para quem fez o commit.
  • Não devem ter conflitos. Solicitar que sejam resolvidas as ocorrências de "This branch has conflicts that must be resolved".

SonarCloud Quality Gate

  • Coverage > 80.0%, e sempre que possível = 100%
  • 0 Bugs, 0 Code Smells, 0 Vulnerabilities

Build Github actions COM SUCESSO

ReactJS

  • Usar Node 12 ou 14.
  • Remover console.log.
  • Não deixar código-fonte comentado.
  • Pasta de módulos devem ser escritas em lower case
  • Pasta de componentes devem ser escritas em camel case
  • Nunca utilizar spread em retorno de reducer sem alteração
  • Sempre utilizar hooks ao invés de HOCs
  • Itens em uma lista devem ser renderizados com uma chave única (preferir uuid)
  • Comentar apenas códigos que não estão muito claros
  • Não utilizar comentários para blocos
  • Action types devem conter @

Redux

As instruções a seguir foram retiradas do Redux Style Guide.

Copy link
Contributor

@LuanEdCosta LuanEdCosta left a comment

Choose a reason for hiding this comment

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

I noticed 2 things:

  1. When changing the page size reset the page number to the initial page:

image

  1. Search tasks using the API. You just need to send a name in the filters object from the request:

image

Copy link
Contributor

@LuanEdCosta LuanEdCosta left a comment

Choose a reason for hiding this comment

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

1 - The task search IS NOT working with the API (instead of filtering the array of tasks you should make an API REQUEST to filter tasks).
2 - When changing the page size or searching, the desired behavior is to reset the page number to 1, but the last page is being selected.
3 - I noticed that the buttons of the task search dropdown are in english (but should be in portuguese):

image

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 1, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

29.5% 29.5% Coverage
7.0% 7.0% Duplication

Copy link
Contributor

@LuanEdCosta LuanEdCosta left a comment

Choose a reason for hiding this comment

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

Good job 🚀

@LuanEdCosta LuanEdCosta merged commit a322ae4 into develop Jun 2, 2022
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