Skip to content

Allow custom decorators to be anywhere in the decorator chain - #872

Closed
juanmendes wants to merge 1 commit into
compodoc:developfrom
juanmendes:custom-decorators-along-ng-decorators
Closed

juanmendes wants to merge 1 commit into
compodoc:developfrom
juanmendes:custom-decorators-along-ng-decorators

Conversation

@juanmendes

Copy link
Copy Markdown

Code was previously only looking at the first decorator. Fix is
to make sure we scan all decorators before giving up and returning
default class data.

Closes #868

Code was previously only looking at the first decorator. Fix is
to make sure we scan all decorators before giving up and returning
default class data.

Closes# 868
@juanmendes

Copy link
Copy Markdown
Author

Testing Done:

Made sure that both

@Example({path: "combo-box"})
@Component({...})
export class ComboBox {
  @Input() prop = "value";
}

and

@Component({...})
@Example({path: "combo-box"})
export class ComboBox {
  @Input() prop = "value";
}

output the inputsClass in the exported JSON

@juanmendes

Copy link
Copy Markdown
Author

I realize this doesn't have any tests and I would like to write some but it's unclear where the test should go.

I thought I could do:

  • a unit test on ClassHelper (but there are no existing tests)
  • a cli call using -e json (seems like an integration test is too much)

@vogloblinsky can you please advise?

@stale

stale Bot commented Jan 13, 2020

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix label Jan 13, 2020
@juanmendes

Copy link
Copy Markdown
Author

@vogloblinsky Adding a note to keep this from going stale since I got a notification that this had been marked as stale. Is compodoc still taking PRs?

@stale stale Bot removed the wontfix label Jan 14, 2020

@antontemchenko antontemchenko left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good.

@juanmendes

Copy link
Copy Markdown
Author

@antontemchenko Any way you can give me some guidance on how to write tests for this? As I mentioned, I couldn't find the best place to do this

@juanmendes

Copy link
Copy Markdown
Author

@vogloblinsky I has been over 4 months since I create this PR. Can you comment on whether this can be merged? Also, if tests are needed, where they should go?

@stale

stale Bot commented May 23, 2020

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix label May 23, 2020
@stale

stale Bot commented May 30, 2020

Copy link
Copy Markdown

This issue has been automatically closed because it has not had recent activity. Please file a new issue if you are encountering a similar or related problem. Thank you for your contributions.

@stale stale Bot closed this May 30, 2020
@seanlawrenz

Copy link
Copy Markdown

This is very much a problem. And this seems to fix it.

@antontemchenko @vogloblinsky or anyone else who has merge privileges can this be merged?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Allow custom decorators along with @Component

3 participants