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

Update copy in OrganizationProfile/Members tabs #1621

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/new-schools-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
9 changes: 5 additions & 4 deletions packages/clerk-js/src/ui/common/BlockButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ import type { PropsOfComponent } from '../styledSystem';
type BlockButtonProps = PropsOfComponent<typeof ArrowBlockButton>;

export const BlockButton = (props: BlockButtonProps) => {
const { id, ...rest } = props;
return (
<ArrowBlockButton
variant='ghost'
{...props}
elementDescriptor={descriptors.profileSectionPrimaryButton}
elementId={descriptors.profileSectionPrimaryButton?.setId(id as any)}
{...rest}
/>
);
};

export const AddBlockButton = (props: BlockButtonProps) => {
const { id, leftIcon, ...rest } = props;
const { leftIcon, ...rest } = props;
return (
<BlockButton
elementDescriptor={descriptors.profileSectionPrimaryButton}
elementId={descriptors.profileSectionPrimaryButton?.setId(id as any)}
colorScheme='primary'
{...rest}
sx={theme => ({ justifyContent: 'flex-start', gap: theme.space.$2 })}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AddBlockButton } from '../../common';
import { BlockButton } from '../../common';
import { useCoreOrganization, useEnvironment, useOrganizationProfileContext } from '../../contexts';
import { Col, descriptors, Flex, Icon, localizationKeys } from '../../customizables';
import { Header, IconButton } from '../../elements';
Expand Down Expand Up @@ -55,9 +55,12 @@ export const OrganizationMembersTabInvitations = () => {
</Header.Root>
<DomainList
fallback={
<AddBlockButton
textLocalizationKey={localizationKeys('organizationProfile.profilePage.domainSection.primaryButton')}
id='addOrganizationDomain'
<BlockButton
colorScheme='primary'
textLocalizationKey={localizationKeys(
'organizationProfile.membersPage.invitationsTab.autoInvitations.primaryButton',
)}
id='manageVerifiedDomains'
onClick={() => navigate('organization-settings/domain')}
/>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AddBlockButton } from '../../common';
import { BlockButton } from '../../common';
import { useCoreOrganization, useOrganizationProfileContext } from '../../contexts';
import { Col, Flex, localizationKeys } from '../../customizables';
import { Header } from '../../elements';
Expand Down Expand Up @@ -48,9 +48,12 @@ export const OrganizationMembersTabRequests = () => {
</Header.Root>
<DomainList
fallback={
<AddBlockButton
textLocalizationKey={localizationKeys('organizationProfile.profilePage.domainSection.primaryButton')}
id='addOrganizationDomain'
<BlockButton
colorScheme='primary'
textLocalizationKey={localizationKeys(
'organizationProfile.membersPage.requestsTab.autoSuggestions.primaryButton',
)}
id='manageVerifiedDomains'
onClick={() => navigate('organization-settings/domain')}
/>
}
Expand Down
10 changes: 6 additions & 4 deletions packages/localizations/src/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,12 +648,13 @@ export const enUS: LocalizationResource = {
table__emptyRow: 'No invitations to display',
manualInvitations: {
headerTitle: 'Individual invitations',
headerSubtitle: 'Browse and manage invited members.',
headerSubtitle: 'Manually invite members and manage existing invitations.',
},
autoInvitations: {
headerTitle: 'Domain invitations',
headerTitle: 'Automatic invitations',
headerSubtitle:
'New and existing users will be able to join anytime as members and will get notified in-app.',
'Invite users by connecting an email domain with your organization. Anyone who signs up with a matching email domain will be able to join the organization anytime.',
primaryButton: 'Manage verified domains',
},
},
requestsTab: {
Expand All @@ -668,7 +669,8 @@ export const enUS: LocalizationResource = {
autoSuggestions: {
headerTitle: 'Automatic suggestions',
headerSubtitle:
'Users with an email address on your verified domain will see a suggestion to request to join the organization.',
'Users who sign up with a matching email domain, will be able to see a suggestion to request to join your organization.',
primaryButton: 'Manage verified domains',
},
},
},
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/localization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ type _LocalizationResource = {
autoInvitations: {
headerTitle: LocalizationValue;
headerSubtitle: LocalizationValue;
primaryButton: LocalizationValue;
};
};
requestsTab: {
Expand All @@ -688,6 +689,7 @@ type _LocalizationResource = {
autoSuggestions: {
headerTitle: LocalizationValue;
headerSubtitle: LocalizationValue;
primaryButton: LocalizationValue;
};
};
};
Expand Down