Skip to content

Reformat Column comments #1011

Open
Open
@Z2Flow

Description

@Z2Flow

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

Activity

mvastola

mvastola commented on May 8, 2024

@mvastola

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mvastola@Z2Flow

        Issue actions

          Reformat Column comments · Issue #1011 · ctran/annotate_models