Skip to content

Add sortable Created At and Updated columns to Commmunity News#1083

Open
RJV333 wants to merge 1 commit intomainfrom
1062_sort_community_news_by_date
Open

Add sortable Created At and Updated columns to Commmunity News#1083
RJV333 wants to merge 1 commit intomainfrom
1062_sort_community_news_by_date

Conversation

@RJV333
Copy link
Collaborator

@RJV333 RJV333 commented Feb 18, 2026

What is the goal of this PR and why is this important?

  1. Adds a Created At column to accompany Updated (At)
  2. tweaks styling so dates fit on one line
    3). Adds sortability to both these date columns
Screen.Recording.2026-02-18.at.6.22.56.PM.mov

How did you approach the change?

Anything else to add?

base_scope = authorized_scope(CommunityNews.includes([ :bookmarks, :primary_asset,
:author, :organization, author: :person ]))
filtered = base_scope.search_by_params(params)
@sort = %w[created_at updated_at].include?(params[:sort]) ? params[:sort] : "updated_at"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default to a Desc 'Updated_at" sort

@RJV333 RJV333 self-assigned this Feb 18, 2026
Copy link
Collaborator

@maebeale maebeale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, @RJV333 !

would you be willing to make all the columns sortable either here or in a subsequent PR?
also, ideally we still only have one date column -- would you remove updated_at?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments