Skip to content
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

[BUG] @Internal tag not detected on overrided @Inputs #1441

Open
myagoo opened this issue Mar 13, 2024 · 2 comments
Open

[BUG] @Internal tag not detected on overrided @Inputs #1441

myagoo opened this issue Mar 13, 2024 · 2 comments
Assignees

Comments

@myagoo
Copy link

myagoo commented Mar 13, 2024

Overview of the issue

Overridden @input marked with @internal tag still appears in generated json and no description & jsdoctags fields are even present. So I can't really find a way around it.

Operating System, Node.js, npm, compodoc version(s)

Node: v20.11.0
NPM: 10.2.4
Compodoc: 1.1.23

Angular configuration, a package.json file in the root folder
{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "projects": {
    "neo-ng": {
      "root": "libs/neo-ng",
      "sourceRoot": "libs/neo-ng",
      "projectType": "library",
      "prefix": "neo",
      "schematics": {
        "@schematics/angular:component": {
          "style": "scss",
          "displayBlock": true
        }
      },
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:ng-packagr",
          "options": {
            "tsConfig": "libs/neo-ng/tsconfig.json",
            "project": "libs/neo-ng/ng-package.json"
          }
        },
        "lint": {
          "builder": "@angular-eslint/builder:lint",
          "options": {
            "lintFilePatterns": ["libs/neo-ng"]
          }
        },
        "test": {
          "builder": "@angular-builders/jest:run",
          "options": {
            "tsConfig": "tsconfig.spec.json",
            "globalMocks": ["styleTransform", "matchMedia", "getComputedStyle"],
            "coverageDirectory": "coverage/neo-ng"
          },
          "configurations": {
            "ci": {
              "verbose": false,
              "ci": true,
              "runInBand": true,
              "coverage": true
            }
          }
        }
      }
    }
  },
  "cli": {
    "analytics": false
  }
}
{
  "silent": true,
  "name": "Documentation f3g-rialib-composants-graphiques",
  "theme": "gitbook",
  "disablePrivate": true,
  "disableProtected": true,
  "disableInternal": true,
  "disableLifeCycleHooks": true,
  "disableGraph": false,
  "language": "fr-FR"
}

Command used:
compodoc -c .compodocrc.json -p ./apps/neo-dev/tsconfig.compodoc.json -e json -d ./apps/neo-dev/src/assets/

Compodoc installed globally or locally ?

Locally

Reproduce the error
  /**
   * Test
   * @internal
   */
  @Input()
  override clearButtonAriaLabel: string;
@vogloblinsky vogloblinsky added this to the 1.1.24 milestone Apr 2, 2024
@vogloblinsky
Copy link
Contributor

Cannot reproduce...

@vogloblinsky vogloblinsky removed this from the 1.1.24 milestone Apr 12, 2024
@Abreuvoir
Copy link

Abreuvoir commented Apr 12, 2024

I can confirm the issue on my side.

Component A (AbstractFormElementComponent) is abstract and defines an input readOnly, component B (SelectSimpleComponent) inherits from A and overrides the input without changing anything except adding @internal or @ignore tag, like in the original post:

Component A

  @Input()
  readOnly = false;

Component B

  /**
   * @ignore
   */
  @Input()
  override readOnly: boolean;

In the json generated for components B, inputsClass still contains the inherited input that should be ignored:

                {
                    "name": "readOnly",
                    "defaultValue": "false",
                    "deprecated": false,
                    "deprecationMessage": "",
                    "line": 59,
                    "type": "boolean",
                    "decorators": [],
                    "inheritance": {
                        "file": "AbstractFormElementComponent"
                    }
                }

Also, the line number here is wrong: it is the one from component A, not B.

If @ignore is not set on the component B input, the line number is correct:

                {
                    "name": "readOnly",
                    "deprecated": false,
                    "deprecationMessage": "",
                    "rawdescription": "\n\nBlablabla component B\n",
                    "description": "<p>Blablabla component B</p>\n",
                    "line": 50,
                    "type": "boolean",
                    "decorators": [],
                    "inheritance": {
                        "file": "AbstractFormElementComponent"
                    }
                },

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

No branches or pull requests

3 participants