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

@yotam-wix yotam-wix closed this Jan 13, 2026
@yotam-wix yotam-wix deleted the screenFooter-in-dev branch January 13, 2026 14:59
@yotam-wix yotam-wix restored the screenFooter-in-dev branch January 13, 2026 15:04
@yotam-wix yotam-wix reopened this Jan 13, 2026
@yotam-wix yotam-wix force-pushed the screenFooter-in-dev branch from b2a729d to 7547d9d Compare January 13, 2026 15:26
@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

✅ PR Description Validation Passed

All required sections are properly filled out:

  • Description
  • Changelog
  • Additional info

Your PR is good for review! 🚀


This validation ensures all sections from the PR template are properly filled.

@yotam-wix
Copy link
Collaborator Author

yotam-wix commented Jan 13, 2026

After making some mess with git history due to the new pre-push check that denied my branch name, I've managed to do it properly.

the new commits start from 'apply small fixes due to PR comments, move types to different file'.

I've left replies to some comments due to things I wasn't sure about.

Here's what was added in the recent commits here -

  • small changes due to PR comments
  • moved keyboard hoisting from useKeyboardHeight hook with to KeyboardAccessibilityView for better visuals as you suggested.
  • added 5 sizes of gradient into assets folder
  • added a template of docs api.json file, still need to finish it by uploading examples to the media platform
  • added render tests
  • moved types into a separate file
  • found multiple bugs on android that needed addressing, so hopefully fixed them here (sticky still pushed footer on top of keyboard, hoisted + solid caused the background to render on top of footer etc.)

this was quite a lot and I still miss some work on the docs part, but let me know what you think overall.

@yotam-wix yotam-wix requested a review from lidord-wix January 13, 2026 15:37
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 really good overall, good job 🙂
I replied and added some small comments, please also see bullet 6 in my last review comment (still looks the same)

@yotam-wix
Copy link
Collaborator Author

yotam-wix commented Jan 27, 2026

I've replied to the comments left. Let me know what you think.

By the way, have you gone over the changes made in the 'android bug fixes' commit? I've done some code re-writing there due to specific Android-only bugs, just wanna make sure it didn't go over you and that the code there is fine.

And regarding bullet 6 - I think I did fix it, will attach here the current look of the stretch + icon, text Footer, where as the previous worse version can be seen at this page too.

It now centeres each item properly, it does make sense that the icon won't be completely centered since the button and text are bigger and wider, pretty sure that's more similar to what Alexey has showed in the desired behavior.

image

@yotam-wix yotam-wix requested a review from lidord-wix January 27, 2026 15:43
@lidord-wix lidord-wix assigned yotam-wix and unassigned lidord-wix Feb 2, 2026
const flexStyle = itemsFit === ItemsFit.STRETCH ? {flex: 1, alignItems: 'center'} : {flexShrink: 1};
const flexStyle = itemsFit === ItemsFit.STRETCH
? {flex: 1, minWidth: 0, alignItems: 'center'}
: {flexShrink: 1};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

adding a minWidth prop here to the stretched layout improved the correct division of the container between the items, seems like the button having a certain minWidth caused it to catch more unwanted space

@yotam-wix yotam-wix assigned lidord-wix and unassigned yotam-wix Feb 3, 2026
lidord-wix
lidord-wix previously approved these changes Feb 8, 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! 🎉 👏🏽
Approved with a small comment, feel free to merge once fixed :)

Comment on lines 258 to 262
stretchItemWrapper: {
flexDirection: 'row',
flex: 1,
justifyContent: 'center'
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can use modifiers instead this style, also I think you don't need the "row"

Copy link
Collaborator Author

@yotam-wix yotam-wix Feb 8, 2026

Choose a reason for hiding this comment

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

it's actually necessary - the stretch happens due to the default alignItems: 'stretch', and to not ruin this stretch I needed to kind of cheat it by combining row+justifyContent: center, which caused effect of alignItems: center without overriding the alignItems: stretch.

let me know if I'm missing something though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, ok 👍🏽

Copy link
Collaborator

Choose a reason for hiding this comment

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

but still I think you can move to modifiers :)

@lidord-wix lidord-wix assigned yotam-wix and unassigned lidord-wix Feb 8, 2026
@yotam-wix
Copy link
Collaborator Author

@lidord-wix
I think I managed to fix the issue we had by using react-native-safe-area-context as suggested.
I also tried to sort out the issue of the padding remaining when hoisting is activated and a keyboard is open by using UseKeyboardHeight(). let me know if it looks ok.

also, my build fails for some reason due to it not finding the react-native-safe-area-context module?

@yotam-wix yotam-wix requested a review from lidord-wix February 8, 2026 15:56
@yotam-wix yotam-wix assigned lidord-wix and unassigned yotam-wix Feb 8, 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.

Please see the comments
regarding the build - I see you wasn't on the latest master, I pulled, please re check 🙏🏽

@@ -1,12 +1,14 @@
import React, {useCallback, useEffect, useMemo, useState} from 'react';
import {LayoutChangeEvent, StyleSheet, ViewStyle} from 'react-native';
import {useSafeAreaInsets} from 'react-native-safe-area-context';
Copy link
Collaborator

Choose a reason for hiding this comment

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

please see the usage of useSafeAreaInsets in the tabController component, when using a native dependency in one of our components, we're doing it optionally for the users, so if they don't use this component they don't have to install it

];


if (useSafeArea && !isKeyboardVisible) {
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 don't need the useSafeArea prop anymore, the native control the heights

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.

2 participants