Skip to content

Commit

Permalink
Increase Title/Content Text Limits For News Articles (#1447)
Browse files Browse the repository at this point in the history
# Description

Increases the text limit for news reports:
- Title character limit: 25 -> 50
- Content character limit: 2048 -> 2560

Mostly a personal change for me because I often run into the title
character limits when I was playing Reporter.

## Media


![image](https://github.com/user-attachments/assets/121b29d3-af42-474d-bb04-a438dbab74c3)

![image](https://github.com/user-attachments/assets/5fd71407-a641-4dcc-8913-d0515ca7598c)

![image](https://github.com/user-attachments/assets/079142f8-5f39-4d91-b914-c1327bf4f0bb)


## Changelog

:cl: Skubman
- tweak: The news article title character limit has been increased from
25 to 50 characters, and news content from 2048 to 2560 characters.
  • Loading branch information
angelofallars authored Jan 8, 2025
1 parent 747cb50 commit f80f954
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Content.Client/MassMedia/Ui/NewsArticleCard.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class NewsArticleCard : Control
public string? Title
{
get => TitleLabel.Text;
set => TitleLabel.Text = value?.Length <= 30 ? value : $"{value?[..30]}...";
set => TitleLabel.Text = value?.Length <= 40 ? value : $"{value?[..40]}...";
}

public string? Author
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/MassMedia/Ui/NewsWriterMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
xmlns:ui="clr-namespace:Content.Client.MassMedia.Ui"
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
Title="{Loc 'news-write-ui-default-title'}"
MinSize="348 443"
SetSize="348 443">
MinSize="404 443"
SetSize="404 443">

<ui:ArticleEditorPanel Name="ArticleEditorPanel" HorizontalAlignment="Left" VerticalExpand="True"
MinWidth="410" MinHeight="370" Margin="0 0 0 30" Access="Public" Visible="False"/>
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/MassMedia/Systems/SharedNewsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace Content.Shared.MassMedia.Systems;

public abstract class SharedNewsSystem : EntitySystem
{
public const int MaxTitleLength = 25;
public const int MaxContentLength = 2048;
public const int MaxTitleLength = 50;
public const int MaxContentLength = 2560;
}

[Serializable, NetSerializable]
Expand Down

0 comments on commit f80f954

Please sign in to comment.