Orfium / orfium-ictinus

This repo will include the building blocks to create the Orfium Parthenons to come ...
https://designlab.orfium.com
22 stars 3 forks source link

fix: resolve positioning issues in Select and Filter #802

Closed mkarajohn closed 7 months ago

mkarajohn commented 7 months ago

Description

Resolves NDS-881

The issue was that initial dimension/coords calculations were wrong because the DOM elements did not exist in the document. So while useLayoutEffect corrected the flickering issue, it still could not fix the 1st time the list appeared in the document.

The chosen solution was to keep the list elements always inside the document but hidden, so that the 1st time a dimension/coord calculation happens it can yield correct results.

Another change made was that the DOM element refs are now kept in state, since they were used as dependency arrays to hooks.

Screenshot

Test Plan

orfium-sonarqube-app[bot] commented 7 months ago

SonarQube Quality Gate

Quality Gate passed

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

98.1% 98.1% Coverage
0.0% 0.0% Duplication