From 0f9e01b4a1e557599b5f31fe8d8994504aaaabc0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 25 Jan 2022 17:08:20 -0600 Subject: [PATCH] "birth date" --> "birthday", move the toggle next to the picker --- app/soapbox/components/birthday_input.js | 5 ++-- app/soapbox/features/birthdays/account.js | 4 +-- app/soapbox/features/edit_profile/index.js | 30 +++++++++++-------- .../ui/components/profile_info_panel.js | 4 +-- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/app/soapbox/components/birthday_input.js b/app/soapbox/components/birthday_input.js index cb1408d51..ad6e561ea 100644 --- a/app/soapbox/components/birthday_input.js +++ b/app/soapbox/components/birthday_input.js @@ -9,7 +9,7 @@ import 'react-datepicker/dist/react-datepicker.css'; import { getFeatures } from 'soapbox/utils/features'; const messages = defineMessages({ - birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birth date' }, + birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birthday' }, }); const mapStateToProps = state => { @@ -52,7 +52,6 @@ class EditProfile extends ImmutablePureComponent {
{ @@ -73,7 +73,7 @@ class Account extends ImmutablePureComponent {
diff --git a/app/soapbox/features/edit_profile/index.js b/app/soapbox/features/edit_profile/index.js index cf73ddbc4..9a425768b 100644 --- a/app/soapbox/features/edit_profile/index.js +++ b/app/soapbox/features/edit_profile/index.js @@ -50,7 +50,7 @@ const messages = defineMessages({ error: { id: 'edit_profile.error', defaultMessage: 'Profile update failed' }, bioPlaceholder: { id: 'edit_profile.fields.bio_placeholder', defaultMessage: 'Tell us about yourself.' }, displayNamePlaceholder: { id: 'edit_profile.fields.display_name_placeholder', defaultMessage: 'Name' }, - birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birth date' }, + birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birthday' }, }); const makeMapStateToProps = () => { @@ -285,11 +285,22 @@ class EditProfile extends ImmutablePureComponent { onChange={this.handleTextChange} rows={3} /> - } - value={this.state.birthday} - onChange={this.handleBirthdayChange} - /> + {supportsBirthdays && ( + <> + } + value={this.state.birthday} + onChange={this.handleBirthdayChange} + /> + } + hint={} + name='show_birthday' + checked={this.state.show_birthday} + onChange={this.handleCheckboxChange} + /> + + )}
@@ -344,13 +355,6 @@ class EditProfile extends ImmutablePureComponent { checked={this.state.discoverable} onChange={this.handleCheckboxChange} /> - {supportsBirthdays && } - hint={} - name='show_birthday' - checked={this.state.show_birthday} - onChange={this.handleCheckboxChange} - />} {supportsEmailList && } hint={} diff --git a/app/soapbox/features/ui/components/profile_info_panel.js b/app/soapbox/features/ui/components/profile_info_panel.js index f90cac95d..6b35c601e 100644 --- a/app/soapbox/features/ui/components/profile_info_panel.js +++ b/app/soapbox/features/ui/components/profile_info_panel.js @@ -98,7 +98,7 @@ class ProfileInfoPanel extends ImmutablePureComponent {
); @@ -107,7 +107,7 @@ class ProfileInfoPanel extends ImmutablePureComponent {