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

AttachmentView's header_title is overlapping with download icon #6043

Open
sher999 opened this issue Dec 4, 2024 · 11 comments
Open

AttachmentView's header_title is overlapping with download icon #6043

sher999 opened this issue Dec 4, 2024 · 11 comments

Comments

@sher999
Copy link

sher999 commented Dec 4, 2024

Description:

In attachmentView page viewing an image with long name, it will overlap with the right Icon (download button)

Environment Information:

  • Rocket.Chat Server Version: 7.1.0
  • Rocket.Chat App Version: 4.56.0 , 4.55.0
  • Device Name: Android Poco f4, pixel 3a
  • OS Version: android 14

Steps to reproduce:

  1. Open a chat on chats page
  2. then open an image on chat which has a large name
  3. On the header of the attcahmentView page title and download button is overlapping

Expected behavior:

Screenshot

Screenshot_1733328585

Actual behavior:

Screenshot

Screenshot_1733328563

### Additional context:

tried solving it with trimming the tittle to 20 to 30 subString

const options = {
			title: title || '',
			headerLeft: () => (
				<HeaderButton.CloseModal testID='close-attachment-view' navigation={navigation} color={colors.fontDefault} />
			),
			
			headerRight: () => 
				Allow_Save_Media_to_Gallery && !isImageBase64(attachment.image_url) ? (
					<HeaderButton.Download testID='save-image' onPress={handleSave} color={colors.fontDefault} />
				) : null
		};
@Rohit3523
Copy link
Contributor

This was a known issue in React Native Screens, and it was recently fixed in React Native Screens v4.

native header now uses flexbox model (in VDOM) - long story short - long titles are now truncated properly 

@sher999
Copy link
Author

sher999 commented Dec 4, 2024

Should I continue working on it ?

@Rohit3523
Copy link
Contributor

Sure, try upgrading the package first.

@sher999
Copy link
Author

sher999 commented Dec 5, 2024

Upgraded react-native-screens @4.3.0 doesn't work on android ,
Screenshot 2024-12-05 at 1 09 13 PM

adding headerTitleAlign to center works neatly

Screenshot 2024-12-05 at 1 09 01 PM

here is the screenshot of Ios and android

On android

Screenshot_1733385570

On Iphone

Simulator Screenshot - iPhone 16 Pro - 2024-12-05 at 13 09 28

@Rohit3523
Copy link
Contributor

We're currently using react-navigation/native-stack version 6, but the fix we need is still in a draft PR (#12135).

We have two options:

  1. Upgrade to version 7 (release notes) and see if it solves the issue.
  2. Wait for the PR to be merged and released for version 6.

Can you try upgrading the package to version 7 and test the navigation flows?

@sher999
Copy link
Author

sher999 commented Dec 5, 2024

Yeah sure trying for version 7.

@sher999
Copy link
Author

sher999 commented Dec 5, 2024

Yes it worked with updating the react-navigation/native-stack to "7.1.10" and @react-navigation/native to "7.0.9"

ScreenShot

Screenshot_1733395192

thanks for your guidance.

@JASIM0021
Copy link
Contributor

Is this issue close to being resolved, @sher999?

@sher999
Copy link
Author

sher999 commented Dec 9, 2024

This has been solved but not seen by mentor

@Rohit3523
Copy link
Contributor

I will have to check the changes in navigation library as it's a major release by them

@Rohit3523
Copy link
Contributor

Could you please update all the @react-navigation/* packages to version 7 and test the navigation?
It's important to keep all the sub-packages at the same version, as they depend on the core package.

Thanks

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

3 participants