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

feat: improve button labels to be more concise in text #2207

Merged
merged 7 commits into from
Jul 11, 2022
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
4 changes: 2 additions & 2 deletions src/dashboard/Account/AccountOverview.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export default class AccountOverview extends React.Component {
onClose={() => {
this.setState({showAccountKeyModal: false});
}}
submitText='Create Key'
submitText='Create'
inProgressText={'Creating\u2026'}
clearFields={() => {
this.setState({accountKeyName: ''});
Expand Down Expand Up @@ -332,7 +332,7 @@ export default class AccountOverview extends React.Component {
subtitle='If you delete this account key, anything that was using it will stop working.'
type={Modal.Types.DANGER}
open={this.state.showDeleteAccountKeyModal}
submitText='Yes, delete it'
submitText='Delete'
inProgressText={'Deleting\u2026'}
onSubmit={() => {
return AccountManager.deleteAccountKeyById(this.state.accountKeyIdToDelete);
Expand Down
6 changes: 3 additions & 3 deletions src/dashboard/Data/Browser/AddColumnDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ export default class AddColumnDialog extends React.Component {
title='Add a new column'
subtitle='Store another type of data in this class.'
disabled={!this.valid()}
confirmText='Add column'
cancelText={'Never mind, don\u2019t.'}
confirmText='Add'
cancelText='Cancel'
onCancel={this.props.onCancel}
continueText={'Add column & continue'}
continueText={'Add & continue'}
showContinue={true}
onContinue={() => {
this.props.onContinue(this.state);
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/Data/Browser/AttachRowsDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class AttachRowsDialog extends React.Component {
onClose={this.props.onCancel}
onSubmit={this.handleConfirm}
submitText="Attach"
inProgressText="Attaching ..."
inProgressText={'Attaching\u2026'}
>
<Field
label={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class AttachSelectedRowsDialog extends React.Component {
iconSize={40}
title="Attach Selected Rows to Relation"
submitText="Attach"
inProgressText="Attaching ..."
inProgressText={'Attaching\u2026'}
onClose={this.props.onCancel}
onSubmit={this.handleConfirm}
>
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/Data/Browser/CloneSelectedRowsDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export default class CloneSelectedRowsDialog extends React.Component {
title={this.props.selection['*'] ? 'Clone all rows?' : (selectionLength === 1 ? 'Clone this row?' : `Clone ${selectionLength} rows?`)}
subtitle={''}
disabled={!this.valid()}
confirmText={'Yes clone'}
cancelText={'Never mind, don\u2019t.'}
confirmText='Clone'
cancelText='Cancel'
onCancel={this.props.onCancel}
onConfirm={this.props.onConfirm}>
{content}
Expand Down
10 changes: 5 additions & 5 deletions src/dashboard/Data/Browser/CreateClassDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ export default class CreateClassDialog extends React.Component {
type={Modal.Types.INFO}
icon='plus'
iconSize={40}
title='Add a new class'
subtitle='Create a new collection of objects.'
title='Create a new class?'
subtitle='This creates a new class to hold objects.'
disabled={!this.valid()}
confirmText='Create class'
cancelText={'Cancel'}
continueText={'Create class & add columns'}
confirmText='Create'
cancelText='Cancel'
continueText={'Create & add columns'}
onCancel={this.props.onCancel}
showContinue={true}
onContinue={async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/Data/Browser/DeleteRowsDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export default class DeleteRowsDialog extends React.Component {
title={this.props.selection['*'] ? `${deleteText} all rows?` : (selectionLength === 1 ? `${deleteText} this row?` : `${deleteText} ${selectionLength} rows?`)}
subtitle={this.props.relation ? 'You need to delete origin record. This is a reference.' : 'This action cannot be undone!'}
disabled={!this.valid()}
confirmText={`Yes, ${this.props.relation ? 'detach' : 'delete'}`}
cancelText={'Never mind, don\u2019t.'}
confirmText='Delete'
cancelText='Cancel'
onCancel={this.props.onCancel}
onConfirm={this.props.onConfirm}>
{content}
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/Data/Browser/DropClassDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export default class DropClassDialog extends React.Component {
title='Delete this class?'
subtitle='This action cannot be undone!'
disabled={!this.valid()}
confirmText='Yes, delete.'
cancelText={'Never mind, don\u2019t.'}
confirmText='Delete'
cancelText='Cancel'
onCancel={this.props.onCancel}
onConfirm={this.props.onConfirm}>
<Field
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/Data/Browser/ExportDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class ExportDialog extends React.Component {
type={Modal.Types.INFO}
icon='down-outline'
iconSize={40}
title='Export this class'
title='Export this class?'
subtitle={'We\'ll send you an email when your data is ready.'}
confirmText='Export'
cancelText='Cancel'
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/Data/Browser/ExportSelectedRowsDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export default class ExportSelectedRowsDialog extends React.Component {
title={this.props.selection['*'] ? 'Export all rows?' : (selectionLength === 1 ? 'Export 1 selected row?' : `Export ${selectionLength} selected rows?`)}
subtitle={this.props.selection['*'] ? 'Note: Exporting is limited to the first 10,000 rows.' : ''}
disabled={!this.valid()}
confirmText={'Yes export'}
cancelText={'Never mind, don\u2019t.'}
confirmText='Export'
cancelText='Cancel'
onCancel={this.props.onCancel}
onConfirm={this.props.onConfirm}>
{}
Expand Down
6 changes: 3 additions & 3 deletions src/dashboard/Data/Browser/PointerKeyDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export default class PointerKeyDialog extends React.Component {
return (
<Modal
type={Modal.Types.INFO}
title={'Change pointer key'}
title={'Change pointer key?'}
subtitle={hasColumns ? `The selected column will be used to represent a pointer for class "${this.props.className}"` : `There are no columns that can be set to represent a pointer for class "${this.props.className}"`}
confirmText='Set pointer key'
cancelText={'Never mind, don\u2019t.'}
confirmText='Change'
cancelText='Cancel'
onCancel={this.props.onCancel}
disabled={!this.state.name}
onConfirm={() => {
Expand Down
6 changes: 3 additions & 3 deletions src/dashboard/Data/Browser/RemoveColumnDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ export default class RemoveColumnDialog extends React.Component {
<Modal
type={Modal.Types.DANGER}
icon='warn-outline'
title='Remove a column'
title='Remove a column?'
subtitle={hasColumns ? 'Be careful, this action cannot be undone.' : 'There are no removable columns on this class.'}
confirmText='Remove column'
cancelText={'Never mind, don\u2019t.'}
mtrezza marked this conversation as resolved.
Show resolved Hide resolved
confirmText='Remove'
cancelText='Cancel'
onCancel={this.props.onCancel}
disabled={!this.state.name}
onConfirm={() => {
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/Data/Browser/SecureFieldsDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class SecureFieldsDialog extends React.Component {
protectedFields={this.props.perms.protectedFields}
enablePointerPermissions={parseServerSupportsPointerPermissions}
advanced={true}
confirmText="Save Fields"
confirmText="Save"
details={
<a
target="_blank"
Expand Down
6 changes: 3 additions & 3 deletions src/dashboard/Data/Browser/SecurityDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ export default class SecurityDialog extends React.Component {
details={<a target="_blank" href='http://docs.parseplatform.org/ios/guide/#security'>Learn more about CLPs and app security</a>}
permissions={this.props.perms}
userPointers={this.props.userPointers}
validateEntry={entry =>
validateEntry={entry =>
validateEntry(this.props.userPointers, entry, parseServerSupportsPointerPermissions)}
onCancel={this.handleClose}
onConfirm={perms =>
onConfirm={perms =>
this.props.onChangeCLP(perms).then(this.handleClose)}
/>
);
Expand All @@ -134,7 +134,7 @@ export default class SecurityDialog extends React.Component {
if (this.props.disabled) {
classes.push(styles.toolbarButtonDisabled);
}

return dialog;
}
}
10 changes: 5 additions & 5 deletions src/dashboard/Data/Config/ConfigDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ export default class ConfigDialog extends React.Component {
iconSize={30}
subtitle={'Dynamically configure parts of your app'}
disabled={!this.valid()}
confirmText={newParam ? 'Create parameter' : 'Save parameter'}
cancelText={'Cancel'}
confirmText={newParam ? 'Create' : 'Save'}
cancelText='Cancel'
onCancel={this.props.onCancel}
onConfirm={this.submit.bind(this)}>
<Field
Expand Down Expand Up @@ -233,13 +233,13 @@ export default class ConfigDialog extends React.Component {
description='Use this to configure your app. You can change it at any time.' />
}
input={EDITORS[this.state.type](this.state.value, (value) => { this.setState({ value }) })} />

{
/*
Add `Requires master key` field if parse-server version >= 3.9.0,
that is the minimum version that supports this feature.
*/
semver.valid(this.props.parseServerVersion) && semver.gte(this.props.parseServerVersion, '3.9.0')
semver.valid(this.props.parseServerVersion) && semver.gte(this.props.parseServerVersion, '3.9.0')
? <Field
label={
<Label
Expand All @@ -250,7 +250,7 @@ export default class ConfigDialog extends React.Component {
<Toggle
type={Toggle.Types.YES_NO}
value={this.state.masterKeyOnly}
onChange={(masterKeyOnly) => this.setState({ masterKeyOnly })}
onChange={(masterKeyOnly) => this.setState({ masterKeyOnly })}
additionalStyles={{ margin: '0px' }} />
}
className={styles.addColumnToggleWrapper}
Expand Down
8 changes: 4 additions & 4 deletions src/dashboard/Data/Config/DeleteParameterDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export default class DeleteParameterDialog extends React.Component {
<Modal
type={Modal.Types.DANGER}
icon='warn-outline'
title={'Delete parameter?'}
subtitle={'This action cannot be undone!'}
title='Delete parameter?'
subtitle='This action cannot be undone!'
disabled={!this.valid()}
confirmText={'Yes, delete'}
cancelText={'Never mind, don\u2019t.'}
confirmText='Delete'
cancelText='Cancel'
onCancel={this.props.onCancel}
onConfirm={this.props.onConfirm}>
{content}
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/Data/Jobs/Jobs.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ class Jobs extends TableView {
type={Modal.Types.DANGER}
title='Delete job schedule?'
subtitle='Careful, this action cannot be undone'
confirmText='Yes, delete it'
cancelText={'Never mind, don\'t'}
confirmText='Delete'
cancelText='Cancel'
onCancel={() => this.setState({ toDelete: null })}
onConfirm={() => {
this.setState({ toDelete: null });
Expand Down
6 changes: 3 additions & 3 deletions src/dashboard/Data/Webhooks/Webhooks.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class Webhooks extends TableView {
onClose={() => {
this.setState({showNewWebhookModal: false});
}}
submitText='Create Webhook'
submitText='Create'
inProgressText={'Creating\u2026'}
clearFields={this.clearFields.bind(this)}
enabled={true /* TODO: do some validation here */}>
Expand All @@ -184,7 +184,7 @@ class Webhooks extends TableView {
onClose={() => {
this.setState({showEditWebhookModal: false});
}}
submitText='Save Webhook'
submitText='Save'
inProgressText={'Saving\u2026'}
clearFields={this.clearFields.bind(this)}
enabled={true /* TODO: do some validation here */}>
Expand Down Expand Up @@ -212,7 +212,7 @@ class Webhooks extends TableView {
onClose={() => {
this.setState({showDeleteWebhookModal: false});
}}
submitText='Delete Webhook'
submitText='Delete'
inProgressText={'Deleting\u2026'}
clearFields={() => {
this.setState({
Expand Down
6 changes: 3 additions & 3 deletions src/dashboard/Settings/AppleCerts.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ export default class AppleCerts extends React.Component {
{this.state.deletePending === null ? null :
<Modal
type={Modal.Types.DANGER}
title='Delete this certificate'
title='Delete this certificate?'
subtitle='Notifications will no longer be sent to the associated app.'
cancelText={'Cancel'}
confirmText={'Delete it!'}
cancelText='Cancel'
confirmText='Delete'
onCancel={() => this.setState({ deletePending: null })}
onConfirm={() => {
let id = this.state.deletePending;
Expand Down
10 changes: 5 additions & 5 deletions src/dashboard/Settings/GeneralSettings.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ export default class GeneralSettings extends DashboardView {
iconSize={30}
type={Modal.Types.DANGER}
open={this.state.showMigrateAppModal}
submitText={this.state.migrationWarnings && this.state.migrationWarnings.length > 0 ? 'Migrate anyway' : 'Begin the migration'}
inProgressText={'Beginning the migration\u2026'}
submitText={this.state.migrationWarnings && this.state.migrationWarnings.length > 0 ? 'Migrate anyway' : 'Migrate'}
inProgressText={'Migrating\u2026'}
showErrors={this.state.showMongoConnectionValidationErrors}
width={900}
onSubmit={() => {
Expand Down Expand Up @@ -463,7 +463,7 @@ export default class GeneralSettings extends DashboardView {
}}
onClose={closeModalWithConnectionString}
type={Modal.Types.DANGER}
submitText={this.state.migrationWarnings && this.state.migrationWarnings.length > 0 ? 'Change anyway' : 'Change connection string'}
submitText={this.state.migrationWarnings && this.state.migrationWarnings.length > 0 ? 'Change anyway' : 'Change'}
inProgressText={'Changing\u2026'}
showErrors={this.state.showMongoConnectionValidationErrors}
width={900}
Expand Down Expand Up @@ -494,7 +494,7 @@ export default class GeneralSettings extends DashboardView {
iconSize={30}
type={Modal.Types.DANGER}
open={this.state.showTransferAppModal}
submitText='Transfer ownership'
submitText='Transfer'
inProgressText={'Transferring\u2026'}
enabled={
(this.state.password.length > 0 || !AccountManager.currentUser().has_password)
Expand Down Expand Up @@ -531,7 +531,7 @@ export default class GeneralSettings extends DashboardView {
subtitle='This is an irreversible action!'
type={Modal.Types.DANGER}
open={this.state.showDeleteAppModal}
submitText='Permanently delete this app'
submitText='Delete'
inProgressText={'Deleting\u2026'}
enabled={this.state.password.length > 0}
onSubmit={() => AppsManager.deleteApp(this.context.slug, this.state.password)}
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/Settings/SecuritySettings.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class SecuritySettings extends DashboardView {
}
open={this.state.showResetDialog}
type={Modal.Types.DANGER}
submitText='Reset it'
submitText='Reset'
inProgressText={'Resetting\u2026'}
enabled={this.state.passwordInput.length > 0 || !AccountManager.currentUser().has_password}
onSubmit={() => currentApp.resetMasterKey(this.state.passwordInput)}
Expand Down