Skip to content

Conversation

@yotam-wix
Copy link
Collaborator

@yotam-wix yotam-wix commented Jan 5, 2026

Description

Added ScreenFooter, a new component for sticky bottom items (3 max) with support for:

  • Horizontal & vertical layouts with flexible alignment/distribution.
  • Solid, fading, and transparent backgrounds.
  • Keyboard handling (sticky or hoisted) and visibility animations.

Added ScreenFooterScreen demo to showcase all configurations.
Added hook 'useScrollToHide' to allow functionality of 'hideOnScroll'.

Changelog

screenFooter - added new component.
screenFooterScreen - added demo screen for new component.
useScrollToHide - added new hook for controlling visibility during scroll.

Additional info

Ticket 4330

@yotam-wix yotam-wix requested a review from lidord-wix January 5, 2026 09:15
@lidord-wix lidord-wix self-assigned this Jan 6, 2026
Copy link
Collaborator

@lidord-wix lidord-wix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I added some comments, it may look a lot but it's because the PR is a bit big..
Some more general comments:

  1. Some of the comments I wrote general and not specific only to the place I added them, so please re-review the whole PR when fixing.
  2. Please run yarn tsc to verify the typescript is ok
  3. Please add api.json file for the docs.
  4. In general theres no need to pass default values, you get them by default :)
  5. Please add render tests, you can see references in other components.
  6. When adding text + image + button, on a stretch case in the example screen, the result is not so good, see the image:Image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need the png in 5 sizes to support devices with different densities

/**
* The background style of the footer
*/
backgroundType?: ScreenFooterBackgrounds | `${ScreenFooterBackgrounds}`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! the type is well defined 😄
Did you understand why we're doing it?

@@ -0,0 +1,534 @@
import React, {useState, useMemo} from 'react';
import {StyleSheet, ScrollView, Image} from 'react-native';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use UILib's Image

ItemsFit,
Switch,
TextField,
Slider,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Slider doesn't work so good, can you try the slider from Incubator?

<Slider
value={itemWidth}
minimumValue={50}
maximumValue={500}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the range is too big IMO, let's decrease the max value

Comment on lines +235 to +236
? {width: itemWidth, flexShrink: 1, overflow: 'hidden' as const}
: {width: itemWidth, maxWidth: '100%' as const};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid using "as ..." for resolving typing issues, it kinda hack

Comment on lines +292 to +295
background: {
width: '100%',
height: '100%'
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it needed for non-Image components?

// Update visibility translation when visible or height changes
useEffect(() => {
visibilityTranslateY.value = withTiming(visible ? 0 : height, {duration: animationDuration});
}, [visible, height, animationDuration]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add visibilityTranslateY to the deps array

{label: 'Spread', value: HorizontalItemsDistribution.SPREAD}
];

const DISTRIBUTION_OPTIONS_SPACED = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not in use

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider taking all the types to a different file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants