-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/single parameter edition #498
Conversation
cedric-matheus
commented
Jul 26, 2021
- Create update operator parameter service
- Create update operator parameter action type
- Create update operator parameter action
- Update container to use new update operator parameter action
Dicas para revisão de códigoCommits
SonarCloud Quality Gate
Build Github actions COM SUCESSOReactJS
ReduxAs instruções a seguir foram retiradas do Redux Style Guide.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cedric-matheus parece que depois da alteração o polling está interferindo com a exibição de itens do painel. Provavelmente algum re-render que não existia antes. Neste caso pode causar um problema de usabilidade (vídeo abaixo) em que um select é fechado sozinho, sem clicar na tela.
Acho que isso precisamos ajustar :x
Gravar.2.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cedric-matheus Para tentar corrigir estes re-renders você pode tentar utilizar o hook useDeepSelector
, que faz comparação profunda e não gera novas renderizações se os dados realmente não foram alterados. O useSelector faz comparação referencial, isto é, se o endereço de memória for alterado ele gera uma nova renderização. Olha o que fala as docs.
Pra simplificar o GenericDrawerContainer se pode mover o componente OperatorParameter para outro componente e até tentar usar o React.memo para memoizar o componente, mas o React usa comparação rasa (shallow equal) no React.memo, então acredito que você teria que passar um segundo parâmetro pra ele, que é uma nova função de comparação (pode usar o isEqual
do lodash igual o useDeepSelector).
SonarCloud Quality Gate failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* Create update operator parameter service * Create update operator parameter action type * Create update operator parameter action * Update to use new update operator parameter action * Rectify sonar code smells * Refactor action to use async await * Rectify rerender bug