Skip to content

Commit b9dcce9

Browse files
committed
Remove twitter social media bias
1 parent 49d2ac1 commit b9dcce9

File tree

19 files changed

+1
-132
lines changed

19 files changed

+1
-132
lines changed

app/avo/resources/user.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def fields # rubocop:disable Metrics
3333
field :email_reset, as: :boolean
3434
field :handle, as: :text
3535
field :public_email, as: :boolean
36-
field :twitter_username, as: :text, as_html: true, format_using: -> { link_to value, "https://twitter.com/#{value}", target: :_blank, rel: :noopener if value.present? }
3736
field :unconfirmed_email, as: :text
3837

3938
field :mail_fails, as: :number

app/controllers/profiles_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def params_user
6161
end
6262
end
6363

64-
PERMITTED_PROFILE_PARAMS = %i[handle twitter_username unconfirmed_email public_email full_name].freeze
64+
PERMITTED_PROFILE_PARAMS = %i[handle unconfirmed_email public_email full_name].freeze
6565

6666
def verify_password
6767
password = params.expect(user: :password)[:password]

app/controllers/users_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def create
2727
location
2828
password
2929
website
30-
twitter_username
3130
full_name
3231
].freeze
3332

app/helpers/users_helper.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
module UsersHelper
2-
def twitter_username(user)
3-
"@#{user.twitter_username}" if user.twitter_username.present?
4-
end
5-
6-
def twitter_url(user)
7-
"https://twitter.com/#{user.twitter_username}"
8-
end
9-
102
def show_policies_acknowledge_banner?(user)
113
user.present? && !user.policies_acknowledged?
124
end

app/models/user.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ class User < ApplicationRecord
7373
validates :handle, format: { with: Patterns::HANDLE_PATTERN }, length: { within: 2..40 }, allow_nil: true
7474
validate :unique_with_org_handle
7575

76-
validates :twitter_username, format: {
77-
with: /\A[a-zA-Z0-9_]*\z/,
78-
message: "can only contain letters, numbers, and underscores"
79-
}, allow_nil: true, length: { within: 0..20 }
80-
8176
validates :password,
8277
length: { minimum: 10 },
8378
unpwn: true,

app/views/dashboards/_subject.html.erb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@
2020
%></p>
2121
</div>
2222
<% end %>
23-
24-
<% if user.twitter_username.present? %>
25-
<div class="flex items-center mb-4 text-b3 lg:text-b2">
26-
<%= icon_tag("x-twitter", color: :primary, class: "w-6 text-orange mr-3") %>
27-
<p class="text-neutral-800 dark:text-white"><%=
28-
link_to(
29-
twitter_username(user),
30-
twitter_url(user)
31-
)
32-
%></p>
33-
</div>
34-
<% end %>
3523
</div>
3624

3725
<hr class="hidden lg:block lg:mb-6 border-neutral-400 dark:border-neutral-600" />

app/views/profiles/edit.html.erb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,6 @@
2020
<%= form.text_field :handle, :class => 'form__input' %>
2121
</div>
2222

23-
<div class="text_field">
24-
<%= form.label :twitter_username, class: 'form__label form__label__icon-container' do %>
25-
<%=
26-
image_tag("/images/x_icon.png", alt: 'X icon', class: 'form__label__icon')
27-
%>
28-
29-
<span class='form__label__text'><%= t('.twitter_username') %></span>
30-
<% end %>
31-
32-
<p class='form__field__instructions'>
33-
<%= t('.optional_twitter_username') %>
34-
</p>
35-
36-
<div class="form__input__addon-container form__input__addon-left">
37-
<span class="form__input__addon">@</span>
38-
<%= form.text_field(:twitter_username, class: 'form__input') %>
39-
</div>
40-
</div>
41-
4223
<% if current_user.unconfirmed_email %>
4324
<div class="push--bottom-s">
4425
<p class='form__field__instructions'>

app/views/profiles/show.html.erb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,6 @@
6464
%>
6565
</p>
6666
<% end %>
67-
68-
<% if @user.twitter_username.present? %>
69-
<%=
70-
image_tag(
71-
"/images/x_icon.png",
72-
alt: "X icon",
73-
class: "profile__header__icon"
74-
)
75-
%>
76-
77-
<%=
78-
link_to(
79-
twitter_username(@user),
80-
twitter_url(@user),
81-
class: "profile__header__attribute t-link--black"
82-
)
83-
%>
84-
<% end %>
8567
<% end %>
8668
</div>
8769

config/locales/de.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,6 @@ de:
763763
email_awaiting_confirmation:
764764
enter_password:
765765
optional_full_name:
766-
optional_twitter_username:
767-
twitter_username: Benutzername
768766
title: Bearbeite Profil
769767
delete:
770768
delete:

config/locales/en.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,6 @@ en:
684684
email_awaiting_confirmation: Please confirm your new email address %{unconfirmed_email}
685685
enter_password: Please enter your account's password
686686
optional_full_name: Optional. Will be displayed publicly
687-
optional_twitter_username: Optional X username. Will be displayed publicly
688-
twitter_username: Username
689687
title: Edit profile
690688
delete:
691689
delete: Delete

0 commit comments

Comments
 (0)