Skip to content

Commit cd89b93

Browse files
REFACTOR - Twitter to X (Twitter) and twitter.com to x.com (#1170)
* REFACTOR - Twitter to X (Twitter) and twitter.com to x.com * FIX - Tests * wip * wip --------- Co-authored-by: Dries Vints <dries@vints.be>
1 parent 918d09f commit cd89b93

File tree

18 files changed

+113
-114
lines changed

18 files changed

+113
-114
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ New threads will be automatically added to the index and threads which get updat
9393
php artisan scout:flush App\\Models\\Thread
9494
```
9595

96-
### Twitter Sharing (optional)
96+
### X (Twitter) Sharing (optional)
9797

98-
To enable published articles to be automatically shared on Twitter, you'll need to [create a Twitter app](https://developer.twitter.com/apps/). Once the app has been created, update the below variables in your `.env` file. The consumer key and secret and access token and secret can be found in the `Keys and tokens` section of the Twitter developers UI.
98+
To enable published articles to be automatically shared on X, you'll need to [create an app](https://developer.x.com/apps/). Once the app has been created, update the below variables in your `.env` file. The consumer key and secret and access token and secret can be found in the `Keys and tokens` section of the X developers UI.
9999

100100
```
101101
TWITTER_CONSUMER_KEY=

app/Console/Commands/PostArticleToTwitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class PostArticleToTwitter extends Command
1111
{
1212
protected $signature = 'lio:post-article-to-twitter';
1313

14-
protected $description = 'Posts the latest unshared article to Twitter';
14+
protected $description = 'Posts the latest unshared article to X';
1515

1616
public function handle(AnonymousNotifiable $notifiable): void
1717
{

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"algolia/scout-extended": "^3.1",
99
"blade-ui-kit/blade-heroicons": "^2.3",
1010
"blade-ui-kit/blade-icons": "^1.6",
11-
"blade-ui-kit/blade-ui-kit": "^0.6",
11+
"blade-ui-kit/blade-ui-kit": "^0.6.3",
1212
"blade-ui-kit/blade-zondicons": "^1.5",
1313
"codeat3/blade-simple-icons": "^5.0",
1414
"guzzlehttp/guzzle": "^7.2",

composer.lock

Lines changed: 78 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/views/articles/overview.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<h2 class="text-2xl font-extrabold tracking-tight text-gray-900 md:text-3xl">
1616
<span class="block">Got some knowledge to share?</span>
1717
<span class="block">
18-
Share your article with <a href="https://twitter.com/laravelio" class="text-lio-500 hover:text-lio-600 hover:underline">our 50,000+ Twitter followers</a>.
18+
Share your article with <a href="https://x.com/laravelio" class="text-lio-500 hover:text-lio-600 hover:underline">our 50,000+ X (Twitter) followers</a>.
1919
</span>
2020
</h2>
2121
<div class="mt-8 flex lg:mt-0 lg:shrink-0">

resources/views/articles/show.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class="prose prose-lg text-gray-800 prose-lio"
158158
@endif
159159

160160
@if ($article->author()->hasTwitterAccount())
161-
<a href="https://twitter.com/{{ $article->author()->twitter() }}" class="text-twitter">
161+
<a href="https://x.com/{{ $article->author()->twitter() }}" class="text-twitter">
162162
<x-si-x class="w-6 h-6" />
163163
</a>
164164
@endif

resources/views/auth/passwords/reset.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
</div>
1414

1515
<div>
16-
<x-forms.label for="password" />
16+
<x-forms.label for="password">New Password</x-forms.label>
1717

1818
<x-forms.inputs.password name="password" id="password" required />
1919
</div>
2020

2121
<div>
22-
<x-forms.label for="password_confirmation" />
22+
<x-forms.label for="password_confirmation">Confirm New Password</x-forms.label>
2323

2424
<x-forms.inputs.password name="password_confirmation" id="password_confirmation" required />
2525
</div>

resources/views/components/articles/engage.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span class="uppercase text-gray-500">Share</span>
77

88
<a class="text-gray-300 hover:text-twitter" target="_blank" rel="noopener" aria-label="Share on Twitter"
9-
href="http://twitter.com/share?text={{ urlencode('"'.$article->title().'" by '. ($article->author()->twitter() ? '@'.$article->author()->twitter() : $article->author()->name()) . ' - ') }}&url={{ urlencode(route('articles.show', $article->slug())) }}">
9+
href="http://x.com/share?text={{ urlencode('"'.$article->title().'" by '. ($article->author()->twitter() ? '@'.$article->author()->twitter() : $article->author()->name()) . ' - ') }}&url={{ urlencode(route('articles.show', $article->slug())) }}">
1010
<x-si-x class="w-6 h-6" />
1111
</a>
1212

resources/views/components/articles/form.blade.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</x-info>
2626

2727
<x-info class="mt-4">
28-
Every article that gets approved will be shared with our 50.000 users and wil be tweeted out on our <a href="https://twitter.com/laravelio" class="text-lio-700 underline">Twitter account</a> which has over 50,000 followers. Feel free to submit as many articles as you like. You can even cross-reference an article on your blog with the original url.
28+
Every article that gets approved will be shared with our 50.000 users and wil be tweeted out on our <a href="https://x.com/laravelio" class="text-lio-700 underline">X (Twitter) account</a> which has over 50,000 followers. Feel free to submit as many articles as you like. You can even cross-reference an article on your blog with the original url.
2929
</x-info>
3030

3131
<x-info class="mt-4">
@@ -38,7 +38,7 @@
3838
<div class="flex flex-col space-y-6">
3939
<div class="grow space-y-6">
4040
<div class="space-y-1">
41-
<x-forms.label for="title">Title</x-forms.label>
41+
<x-forms.label for="title" />
4242

4343
<x-forms.inputs.input name="title" :value="old('title', $article?->title())" required maxlength="100" />
4444

@@ -50,7 +50,7 @@
5050

5151
<div class="grow space-y-6">
5252
<div class="space-y-1">
53-
<x-forms.label for="body">Body</x-forms.label>
53+
<x-forms.label for="body" />
5454

5555
<livewire:editor :body="$article?->body()"/>
5656

@@ -73,7 +73,7 @@
7373

7474
<div class="grow space-y-6">
7575
<div class="space-y-1">
76-
<x-forms.label for="tags">Tags</x-forms.label>
76+
<x-forms.label for="tags" />
7777

7878
<select name="tags[]" id="create-article" multiple x-data="{}" x-init="$nextTick(function () { choices($el) })">
7979
@foreach ($tags as $tag)
@@ -148,9 +148,8 @@ class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:t
148148

149149
@unless (Auth::user()->twitter())
150150
<span class="text-gray-600 text-sm mt-4 block">
151-
Articles will be shared on Twitter.
152-
<a href="{{ route('settings.profile') }}" class="text-green-darker">Add your Twitter handle</a>
153-
and we'll include that too.
151+
Articles will be shared on X (Twitter).
152+
<a href="{{ route('settings.profile') }}" class="text-green-darker">Add your X (Twitter) handle</a> and we'll include that too.
154153
</span>
155154
@endunless
156155
</div>

resources/views/components/threads/form.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<div class="flex flex-col space-y-6">
3333
<div class="grow space-y-6">
3434
<div class="space-y-1">
35-
<x-forms.label for="subject"/>
35+
<x-forms.label for="subject" />
3636

3737
<x-forms.inputs.input name="subject" :value="$thread?->subject()" required maxlength="60" />
3838

@@ -44,9 +44,7 @@
4444

4545
<div class="grow space-y-6">
4646
<div class="space-y-1">
47-
<x-forms.label for="tags">
48-
Tags
49-
</x-forms.label>
47+
<x-forms.label for="tags" />
5048

5149
<select name="tags[]" id="create-thread" multiple x-data="{}" x-init="$nextTick(function () { choices($el) })">
5250
@foreach($tags as $tag)
@@ -58,7 +56,9 @@
5856

5957
<div class="grow space-y-6">
6058
<div class="space-y-1">
61-
<x-forms.label for="body">Compose your question</x-forms.label>
59+
<x-forms.label for="body">
60+
Compose your question
61+
</x-forms.label>
6262

6363
<livewire:editor
6464
:body="$thread?->body()"

0 commit comments

Comments
 (0)