Repository navigation
feat: add note to clarify the workspace join link functionality #45374
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8848236
feat: add note to clarify the workspace join link functionality
dominictb da87f49
fix: update padding
dominictb c3a1164
Merge remote-tracking branch 'origin/main' into fix/45303-note-join
dominictb 13a3243
Merge remote-tracking branch 'origin/main' into fix/45303-note-join
dominictb 4e43547
chore: update translation msg
dominictb 5c33ee3
Merge remote-tracking branch 'origin/main' into fix/45303-note-join
dominictb d5f54b7
Merge remote-tracking branch 'origin/main' into fix/45303-note-join
dominictb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import React, {useRef} from 'react'; | ||
| import React, {useMemo, useRef} from 'react'; | ||
| import {View} from 'react-native'; | ||
| import type {ImageSourcePropType} from 'react-native'; | ||
| import ContextMenuItem from '@components/ContextMenuItem'; | ||
|
|
@@ -9,6 +9,8 @@ import QRShare from '@components/QRShare'; | |
| import type {QRShareHandle} from '@components/QRShare/types'; | ||
| import ScreenWrapper from '@components/ScreenWrapper'; | ||
| import ScrollView from '@components/ScrollView'; | ||
| import Text from '@components/Text'; | ||
| import TextLink from '@components/TextLink'; | ||
| import useEnvironment from '@hooks/useEnvironment'; | ||
| import useLocalize from '@hooks/useLocalize'; | ||
| import useStyleUtils from '@hooks/useStyleUtils'; | ||
|
|
@@ -50,6 +52,13 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) { | |
| const logoBackgroundColor = !hasAvatar ? defaultWorkspaceAvatarColors.backgroundColor?.toString() : undefined; | ||
| const svgLogoFillColor = !hasAvatar ? defaultWorkspaceAvatarColors.fill : undefined; | ||
|
|
||
| const adminRoom = useMemo(() => { | ||
| if (!policy?.id) { | ||
| return undefined; | ||
| } | ||
| return ReportUtils.getRoom(CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, policy?.id); | ||
| }, [policy?.id]); | ||
|
|
||
| return ( | ||
| <AccessOrNotFoundWrapper | ||
| policyID={policyID} | ||
|
|
@@ -63,8 +72,29 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) { | |
| title={translate('common.share')} | ||
| onBackButtonPress={Navigation.goBack} | ||
| /> | ||
| <ScrollView style={[themeStyles.flex1, themeStyles.pt2]}> | ||
| <ScrollView style={[themeStyles.flex1, themeStyles.pt3]}> | ||
| <View style={[themeStyles.flex1, isSmallScreenWidth ? themeStyles.workspaceSectionMobile : themeStyles.workspaceSection]}> | ||
| <View style={[themeStyles.mh5]}> | ||
| <Text style={[themeStyles.textHeadlineH1, themeStyles.mb2]}>{translate('workspace.common.shareNote.header')}</Text> | ||
| </View> | ||
| <View style={[themeStyles.mh5, themeStyles.mb9]}> | ||
| <Text style={[themeStyles.textNormal]}> | ||
| {translate('workspace.common.shareNote.content.firstPart')}{' '} | ||
| <TextLink | ||
| style={themeStyles.link} | ||
| onPress={() => { | ||
| if (!adminRoom?.reportID) { | ||
| return; | ||
| } | ||
| Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(adminRoom.reportID)); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The navigation logic from this line led to the following issue: because the RHP modal was not being closed before navigating. We fixed the issue by using Navigation.dismissModal(adminRoom.reportID);which does both, dismiss the modal and then navigate to the room. |
||
| }} | ||
| > | ||
| {CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS} | ||
| </TextLink>{' '} | ||
| {translate('workspace.common.shareNote.content.secondPart')} | ||
| </Text> | ||
| </View> | ||
|
|
||
| <View style={[themeStyles.workspaceSectionMobile, themeStyles.ph9]}> | ||
| {/* | ||
| Right now QR code download button is not shown anymore | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{BZ CHECKLIST} there was a regression that if there is heavy account all reports are not fetched on sign in admin report can be missing in onyx and hence it links to nothng, we used policy?.chatReportIDAdmins as fallback here to fix it