Skip to content

Support title for id_column #8641

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 3 commits into from
Mar 5, 2025
Merged

Support title for id_column #8641

merged 3 commits into from
Mar 5, 2025

Conversation

mgrunberg
Copy link
Contributor

I'm building the index page of a resource. I must display the resource id as the first column but with a different title than "Id".

Using I18n to affect id's human_attribute_name is not a valid solution because that's a global change. The only workaround is to write the full column myself.

This PR adds support to customize id_column title.

It's inspired by #8639

@mgrunberg mgrunberg changed the title support title for id_column Support title for id_column Feb 28, 2025
@mgrunberg mgrunberg force-pushed the support-title-for-id-column branch from 11d2c18 to 40468d9 Compare February 28, 2025 00:30
@mgrunberg mgrunberg marked this pull request as ready for review February 28, 2025 00:34
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.11%. Comparing base (542f7d6) to head (7b15959).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8641   +/-   ##
=======================================
  Coverage   99.11%   99.11%           
=======================================
  Files         141      141           
  Lines        4073     4076    +3     
=======================================
+ Hits         4037     4040    +3     
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

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

This is a good improvement, thank you. My only concern is around the method signature but no issue in getting this in.

@mgrunberg mgrunberg requested a review from javierjulio March 5, 2025 12:41
Copy link
Member

@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

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

Thanks!

@mgrunberg mgrunberg merged commit 6dcb63e into master Mar 5, 2025
26 checks passed
@mgrunberg mgrunberg deleted the support-title-for-id-column branch March 5, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants