Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V3] Topbar with large title still shows small title #5454

Closed
axpro opened this issue Sep 5, 2019 · 21 comments
Closed

[V3] Topbar with large title still shows small title #5454

axpro opened this issue Sep 5, 2019 · 21 comments

Comments

@axpro
Copy link

axpro commented Sep 5, 2019

Issue Description

When largeTitle is enabled the small title should be hidden and only shown on scroll. Right now they are both visible.

Other issues related to the largeScreen option:

  • On first render the large title is scrolled up (hidden under the small title)
  • If you scroll to view the large title and then push to another screen, that screen doesn't have a title. If you push without scrolling first, the pushed screen title is visible.

Steps to Reproduce / Code Snippets / Screenshots

Add largeTitle to any screen (can be reproduced in playground):

largeTitle: {
  visible: true
}

Screenshot 2019-09-05 at 07 28 03

Other issues:

largeTitle


Environment

  • React Native Navigation version: 3.1.2 (the issue didn't present itself on 3.0.0-alpha.2)
  • React Native version: 0.60.5
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator iPhone X - 12.2
@axpro axpro changed the title Topbar with large title still shows small title [V3] Topbar with large title still shows small title Sep 5, 2019
@cesarm16
Copy link

same here

@carlitosspot
Copy link

yes, noticing the same issue as well. Has anyone tried a temp fix?

@djschilling
Copy link

I have the same issue, a fix would be greatly appreciated.

@nbolender
Copy link

+1

1 similar comment
@isokolovskii
Copy link

+1

@axxag
Copy link

axxag commented Nov 5, 2019

Same. A dirty horrible workaround is to set the topbar title color the same as the topbar background color. Though this also prevents the small title from being visible on scroll.

topBar: {
    largeTitle: { visible: true },
    background: {
      color: '#F7F7F7'
    },
    title: {
      color: '#F7F7F7'
    },
  },

@patrickschmelter
Copy link

patrickschmelter commented Nov 18, 2019

Issue still persists:

React Native Navigation version: 3.6.0 (last working is 3.1.0)
React Native version: 0.61.4
Platform(s) (iOS, Android, or both?): iOS
Device info (Simulator/Device? OS version? Debug/Release?): Simulator iPhone 8 - 13.2.2

@stale
Copy link

stale bot commented Dec 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

@stale stale bot added the 🏚 stale label Dec 18, 2019
@djschilling
Copy link

Issue still exists

@stale stale bot removed the 🏚 stale label Dec 18, 2019
@stale
Copy link

stale bot commented Jan 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

@stale stale bot added the 🏚 stale label Jan 17, 2020
@patrickschmelter
Copy link

Still not stale

@stale stale bot removed the 🏚 stale label Jan 17, 2020
@stale
Copy link

stale bot commented Feb 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

@stale stale bot added the 🏚 stale label Feb 16, 2020
@djschilling
Copy link

still an issue

@stale stale bot removed the 🏚 stale label Feb 17, 2020
@nbolender
Copy link

Death to stalebot!

@joshfarrant
Copy link

Has anyone found a fix/workaround for this? Maybe something that could be applied through patch-package 😄

@guyca
Copy link
Collaborator

guyca commented Mar 7, 2020

This is fixed in 6.1.0

@guyca guyca closed this as completed Mar 7, 2020
@jaredegan
Copy link

This is still happening to me.

React Native Navigation version: 6.3.0
React Native version: 0.61.5
Platform(s) (iOS, Android, or both?): iOS
Device info (Simulator/Device? OS version? Debug/Release?): Debug. Both device & Sim. iPhone 11 Pro, iOS 13.3.1. iPhone 8 Simulator, iOS 13.3.

@jaredegan
Copy link

Here is a gif of the issue.
large titles

@jaredegan
Copy link

If I don't have a ScrollView as first view, then the large title shows up by default. However, since the full view isn't scrollable, it's locked to be large.

Here the component being returned:

return (
    <ScrollView>
      <Text>uhhh</Text>
      <Text>uhhh</Text>
      <Text>uhhh</Text>
</ScrollView>

@jaredegan
Copy link

Sorry for the rush of comments, but this workaround fixes the issue for me, should be a strong clue about what the real issue is. This is using useNavigationComponentDidAppear from react-native-navigation-hooks.

const MyScreen: React.FC<MyScreenProps> = (props) => {

  const [didAppear, setDidAppear] = useState(false);

  useNavigationComponentDidAppear((didAppearEvent) => {
    setDidAppear(true);
  }, props.componentId);

  if (!didAppear) {
    return (<View />);
  }

  return (
    <ScrollView
      style={{
        width: '100%',
      }}
      contentContainerStyle={{
        alignItems: 'center',
        flex: 1,
      }}
    >
      <Text>My View Goes Here</Text>
    </ScrollView>
  );
};

@kanzitelli
Copy link
Contributor

If anyone is still facing this issue, try out these workarounds.

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

No branches or pull requests