Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

fix(viz): Avoid rerendering of VisualizationStepViews #1901

Merged
merged 1 commit into from
Jun 2, 2023
Merged

fix(viz): Avoid rerendering of VisualizationStepViews #1901

merged 1 commit into from
Jun 2, 2023

Conversation

lordrip
Copy link
Collaborator

@lordrip lordrip commented Jun 2, 2023

Context

Currently, the Visualization component is consuming several properties from the VisualizationStore, and this makes it more susceptible to store changes, causing rerendering of the VisualizationStepViews component, and this, in turn, generates a flickering in the step extensions.

Changes

The fix is to add the 'shallow' function to the 'useVisualizationStore()' in order to only react to changes in the actual value of said properties.

Relates to: #801

Currently, the Visualization component is consuming several properties
from the VisualizationStore, and this makes it more susceptible to
store changes, causing rerendering of the VisualizationStepViews
component, and this in turn generates a flickering in the step
extensions.

The fix is to add the 'shallow' function to the 'useVisualizationStore()'
in order to only react to changes in the actual value of said properties.

Relates to: #801
@lordrip lordrip requested a review from a team June 2, 2023 11:54
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #1901 (1023dc7) into main (7876a32) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1901      +/-   ##
==========================================
- Coverage   58.88%   58.80%   -0.09%     
==========================================
  Files          72       72              
  Lines        2539     2534       -5     
  Branches      574      574              
==========================================
- Hits         1495     1490       -5     
  Misses        993      993              
  Partials       51       51              
Impacted Files Coverage Δ
src/components/Visualization.tsx 64.78% <100.00%> (-2.32%) ⬇️

@lordrip lordrip merged commit cd19c30 into kaoto-archive:main Jun 2, 2023
@lordrip lordrip deleted the fix/visualizationstepviews-rerendering branch June 2, 2023 13:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants