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

/**
* 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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've seen it done in other places in ui-lib, I guess it's for letting devs write the literal string or to use an enum which supports changes in the enums value?

Copy link
Collaborator

Choose a reason for hiding this comment

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

exactly, it also supports auto-complete when using it, which is really nice as a user

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it seems much more laggy tbh, do we still prefer it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Works better for me with Slider from incubator 🙈

Comment on lines +235 to +181
? {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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

what's the alternative for it? couldn't find one but seemed to be used throughout the repo.
perhaps using 'ViewStyle'?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, try to use ViewStyle
most of the time it just shows that we don't use the types properly

@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

✅ 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)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's rename, maybe bottomGradient or something?

/**
* 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.

exactly, it also supports auto-complete when using it, which is really nice as a user

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see we still have this one

Comment on lines +195 to +127
if (useSafeArea && Constants.isIphoneX) {
style.push({paddingBottom: safeAreaBottom});
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thinks it's better to retry
in general we don't support landscape in Wix mobile apps (yet), but since it's also for the community, let's take it into consideration :)

{alignItems, justifyContent}
];

if (useSafeArea && Constants.isIphoneX) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

but only iPhoneX needs this padding?

}
};

const renderFooterItems = useMemo(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to memo if it's not passed as a prop value :)

Comment on lines +235 to +181
? {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.

Yes, try to use ViewStyle
most of the time it just shows that we don't use the types properly

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.

Works better for me with Slider from incubator 🙈

}, [visible, height, animationDuration]);

// Combine keyboard hoisting + visibility into a single animated style
const animatedStyle = useAnimatedStyle(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

works much better with the keyboard accessory view

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