You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature was implemented by me in annotate_models in those PRs: #988 and #999. Since that other GEM does not seem to be maintained anymore, I am considering a switch to annotaterb but would love that feature to follow.
I volunteer for implementing it, but I prefer to first post this as an issue, in case there is resistance to the idea.
It would be anyways an opt-in and would not change the behavior otherwise. It would also open the door to further formats in the future.
Feature Suggestion
At the moment, when we configure the column comments to be documented, we get them with the name of the column, on the left of the table.
# type :enum not null# book_id :uuid not null, indexed# parent_id(A null parent means it is a root register.) :uuid indexed# starts_at(Opening date of the register (eg: for accounts, but not for categories).) :date# expires_at(Optional expiration date of the register (eg: for a credit card).) :date# currency_iso_code :string(3) not null
What is proposed here is to add a new configuration that allow the user to state if they want the comment with the column name (the actual behavior, and would be the default), or at the very end of the table (on the right).
The reason for such a feature is that those comments are extra information, and pushing the whole table further to the right for having them is not ideal. Also, they could potentially be long and it's then better to scroll right to read them comments, than to read their type / nullity / etc.
The proposed configuration key would be position_of_column_comment and could have the following values:
Value
Description
with_name (default)
The comment appears with next to the name, in parenthesis.
rightmost_column
The comment appears in its own column, at the far right of the table.
Example above, configured with rightmost_column:
# type :enum not null# book_id :uuid not null, indexed A null parent means it is a root register.# parent_id :uuid indexed# starts_at :date Opening date of the register (eg: for accounts, but not for categories).# expires_at :date Optional expiration date of the register (eg: for a credit card).# currency_iso_code :string(3) not null
Contribution
As mentioned in the prelude, I offer to implement this myself, so do not hesitate to assign this to me if there is no objections.
The text was updated successfully, but these errors were encountered:
Hi, thanks for bringing this up. No objections here. I meant to get around to this after this refactor landed [1] (while unemployed), but then I got a job and haven't had a chance to sit down and get to it. Looking forward to having this as an addition. Please let me know if the refactors that I made do help or not, I'm actually very curious how it feels to make such changes.
@drwl : I am starting work on this. Please assign me to it, just to make it obvious and avoid someone maybe picking it up (if that is how you work on this repository).
Prelude
This feature was implemented by me in annotate_models in those PRs: #988 and #999. Since that other GEM does not seem to be maintained anymore, I am considering a switch to
annotaterb
but would love that feature to follow.I volunteer for implementing it, but I prefer to first post this as an issue, in case there is resistance to the idea.
It would be anyways an opt-in and would not change the behavior otherwise. It would also open the door to further formats in the future.
Feature Suggestion
At the moment, when we configure the column comments to be documented, we get them with the name of the column, on the left of the table.
What is proposed here is to add a new configuration that allow the user to state if they want the comment with the column name (the actual behavior, and would be the default), or at the very end of the table (on the right).
The reason for such a feature is that those comments are extra information, and pushing the whole table further to the right for having them is not ideal. Also, they could potentially be long and it's then better to scroll right to read them comments, than to read their type / nullity / etc.
The proposed configuration key would be
position_of_column_comment
and could have the following values:with_name
(default)rightmost_column
Example above, configured with
rightmost_column
:Contribution
As mentioned in the prelude, I offer to implement this myself, so do not hesitate to assign this to me if there is no objections.
The text was updated successfully, but these errors were encountered: