feat: changing height and present widget better for mobile #276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work in progress
This branch looks to facilitate some of the changes for following tickets which are kind of inter-related
Jira: LF-3514
Jira: LF-8614
Jira: LF-8615
Started by making the height of the widget configurable using the containers height in the config so...
Also been looking to facilitate some form of full height solution for the mobile experience
I started by using '100vh' on the container height just to get to the point where I can see the what would be impacted from a 'full height' mobile experience.
I added in a flag to change a few things on some pages - mainly moving some of the interactive elements to the bottom of the pages for the mobile layout - this is common in a lot of mobile apps.
I think rather than using '100vh' for the container height that we might have a better experience looking to use a flex based approach to full height - this might also allow for integrators to incorporate the widget alongside other elements on a page more easily - will look at this next. I also think that this might have benefits for the scrolling experience for users and also help to better establish minimum height in parts of the widget.
For the virtualised token lists - these actually seemed to work well when a developer might only set the height once in the config - so for it works for page initialialisation and the initial page mount. Dynamically updating the height after mounting however will not currently update the virtualised token list height.
As mobile users can flip their phones between landscape and portrait I think we might have to look at re-establishing the height on the token list when that happens.
Whether we want to think about updating the token list height on a container height update from the config is also worth asking