annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

Reformat Column comments

Open Z2Flow opened this issue 1 year ago • 1 comments

This stems from reverse-engineering a PostgreSQL database… Add the ability to move column comments to the next line, and indented 'n' spaces. Also soft-wrap to column 'm' (default 80), and interpret newline characters (\n).

Currently columns with long comments cause the page width to extend to the end of the comment making it difficult to access the datatype as it overflows the window.

E.g. current formatting:

# assembly_failures(The list of causes of failure for an assembly.\n This is a template field copied to the Test when it is created.\n This array creates a list of checkboxes in the form. :jsonb

Proposed formatting:

#  assembly_failures                                       :jsonb
#       The list of causes of failure for an assembly.
#       This is a template field copied to the Test when it is created.
#       This array creates a list of checkboxes in the form.

Version

  • annotate version: 3.2.0
  • rails version: 7.1.3
  • ruby version: 3.3.0

Z2Flow avatar Feb 20 '24 18:02 Z2Flow

Yes, please! Was about to submit a PR to simply add a space between the field name and the (, but this is way better.

mvastola avatar May 08 '24 00:05 mvastola