hanko icon indicating copy to clipboard operation
hanko copied to clipboard

Improve layout shift on load

Open FlxMgdnz opened this issue 1 year ago • 7 comments

Pages that integrate Hanko currently suffer from a layout shift or "flicker effect" when the Hanko Element loads:

https://github.com/teamhanko/hanko/assets/20115649/6dd367a2-e29e-4df7-a7fb-eecd0d456e4a

This should be improved. Ideas:

  • Give the component reasonable values for min-height and min-width
  • Implement transitions, i.e. if the content of the component changes, do a transition from height a to height b (to avoid the flicker effect) - this should also work on initial load, but also all other layout changes when going through the flows will benefit

FlxMgdnz avatar Oct 18 '23 09:10 FlxMgdnz

If this issue is available. can i try it?

incruder1 avatar Oct 18 '23 21:10 incruder1

@FlxMgdnz in which folder can i find this page?

jatingodnani avatar Dec 01 '23 10:12 jatingodnani

It's here somewhere: https://github.com/teamhanko/hanko/tree/main/frontend/elements/src

I think part of the task is figuring out the right hierarchical level where to apply the changes to.

FlxMgdnz avatar Dec 01 '23 14:12 FlxMgdnz

@FlxMgdnz i found the file , how can i run this page on localhost?

jatingodnani avatar Dec 01 '23 14:12 jatingodnani