Repository navigation
feat: demo accounts declared; merged items redirect and tell their followers #23
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6f8d470
test: the author sees a visible, labelled status on their suggestion
roble 65974b8
chore: alias dev as 3.x-dev, so it never falls behind a minor release
roble 23a919a
feat: the demo seeder declares its accounts (#[DemoAccount])
roble a9db43e
fix: the item page clears a site header of any height
roble 5ae0416
Merge branch 'renanroble-roadmap-item-offset' into dev
roble 1bb6378
fix: a merged item redirects to its target and tells its followers
roble de2905e
Merge branch 'renanroble-bugfixes-2026-11-19' into dev
roble 6bfe684
chore: require core ^3.1 for the demo account attribute
roble dae944e
fix: an item is merged once, however many times the merge is asked
roble c342fbf
Merge branch 'renanroble-coderabbit-2026-11-20' into dev
roble File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| <?php | ||
|
|
||
| namespace Modules\Roadmap\Notifications; | ||
|
|
||
| use Illuminate\Bus\Queueable; | ||
| use Illuminate\Contracts\Queue\ShouldQueue; | ||
| use Illuminate\Notifications\Messages\MailMessage; | ||
| use Illuminate\Notifications\Notification; | ||
| use Modules\Roadmap\Models\RoadmapItem; | ||
| use Saucebase\Core\Support\Markdown; | ||
|
|
||
| /** To the duplicate's voters and author: where their vote and the conversation went. */ | ||
| class RoadmapItemMergedNotification extends Notification implements ShouldQueue | ||
| { | ||
| use Queueable; | ||
|
|
||
| public function __construct( | ||
| public RoadmapItem $duplicate, | ||
| public RoadmapItem $target, | ||
| ) {} | ||
|
|
||
| /** | ||
| * @return array<int, string> | ||
| */ | ||
| public function via(object $notifiable): array | ||
| { | ||
| return ['mail']; | ||
| } | ||
|
|
||
| public function toMail(object $notifiable): MailMessage | ||
| { | ||
| return (new MailMessage) | ||
| ->subject(__('A roadmap item you follow was merged')) | ||
| ->greeting(__('Hello :name,', ['name' => $notifiable->name])) | ||
| ->line(__('**":duplicate"** was merged into **":target"**, which asks for the same thing. Your vote and the comments now count there.', [ | ||
|
Check warning on line 35 in src/Notifications/RoadmapItemMergedNotification.php
|
||
| 'duplicate' => Markdown::escape($this->duplicate->title), | ||
| 'target' => Markdown::escape($this->target->title), | ||
| ])) | ||
| // A fixed label: Laravel repeats it, unescaped, in the mail's fallback line. | ||
| ->action(__('View the item'), $this->target->url()) | ||
| ->line(__('Thank you for your feedback!')); | ||
| } | ||
|
|
||
| /** | ||
| * @return array<string, mixed> | ||
| */ | ||
| public function toArray(object $notifiable): array | ||
| { | ||
| return [ | ||
| 'roadmap_item_id' => $this->duplicate->id, | ||
| 'merged_into_id' => $this->target->id, | ||
| ]; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise the saucebase/core minimum to
^3.1.saucebase/corev3.0.0 satisfies^3.0, but itssrc/tree has noSaucebase\Core\Testing\AssertsDemoAccountstrait. Theuse AssertsDemoAccounts;import intests/Feature/ShowcaseStaffTest.phptherefore fails when the test class loads on that release. Release v3.1.0 provides the trait and theDemoAccountattribute. Require^3.1so that the constraint excludes v3.0.x.Suggested fix