The Wayback Machine - https://web.archive.org/web/20200225151905/https://github.com/angular/angular/issues/31132
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

Docs: Remove TODO comments from examples regarding removal of bang symbol #31132

Open
brandonroberts opened this issue Jun 19, 2019 · 17 comments
Open

Comments

@brandonroberts
Copy link
Collaborator

@brandonroberts brandonroberts commented Jun 19, 2019

Related to #24571. After talking with @IgorMinar, its acceptable for these to be in the codebase, but they don't need to be displayed in examples shown on the docs site. Rather than adding docregions to hide them, we are going to remove the TODO comments from the package examples.

The examples are in the packages/examples folder.

One example: https://github.com/angular/angular/blob/master/packages/examples/core/di/ts/provider_spec.ts#L58

@AXEL1988

This comment has been minimized.

Copy link

@AXEL1988 AXEL1988 commented Jun 28, 2019

I want to colaborate.

@kapunahelewong

This comment has been minimized.

Copy link
Contributor

@kapunahelewong kapunahelewong commented Jul 10, 2019

Hey @jbogarthyde^^

Thanks, @AXEL1988!

@kapunahelewong kapunahelewong added this to Committed - Selected for development in docs Jul 10, 2019
@jbogarthyde

This comment has been minimized.

Copy link
Contributor

@jbogarthyde jbogarthyde commented Jul 10, 2019

That's great -- We just need to remove the comments, it looks like the code doesn't need to change at all. The only tricky part is finding them all - there seem to be a lot of them!

  • The imported examples for guide pages are under angular/aio/content/examples/
  • The ones for the API reference pages are under angular/packages/examples/

We've only noticed it in the API examples, I don't know if it occurs in the guide examples.

@Menuka5

This comment has been minimized.

Copy link

@Menuka5 Menuka5 commented Jul 18, 2019

Hi all,
is this issue has a PR?
If not I would like to help.

@kapunahelewong kapunahelewong self-assigned this Jul 18, 2019
@kapunahelewong

This comment has been minimized.

Copy link
Contributor

@kapunahelewong kapunahelewong commented Jul 18, 2019

Hi @Menuka5! That'd be great! I can help you with the process if you like. :)

@Menuka5

This comment has been minimized.

Copy link

@Menuka5 Menuka5 commented Jul 20, 2019

@kapunahelewong Yes, please 😄
For clarification, I just need to remove // #enddocregion from all angular code or all todo comment which include docregion?

@kapunahelewong

This comment has been minimized.

Copy link
Contributor

@kapunahelewong kapunahelewong commented Jul 20, 2019

@Menuka5 I think the only comments to remove are:

// TODO(issue/24571): remove '!'

Take a look at #24571 to see a screenshot. The tricky part is finding all of them. I believe though, that they are only in the API docs, not the guide documentation.

I think you want to leave the docregions because without them things will break. @petebacondarwin can you confirm that I'm giving @Menuka5 the right direction?

@Menuka5

This comment has been minimized.

Copy link

@Menuka5 Menuka5 commented Jul 20, 2019

I found over 100+ entries lines contains above line in the project.
I will remove them after you guys give confirmation 😃

@jbogarthyde

This comment has been minimized.

Copy link
Contributor

@jbogarthyde jbogarthyde commented Jul 20, 2019

Do NOT remove any ‘docregion’ or ‘enddocregion’ comments. Remove ONLY the ‘TODO’ comments.

@Menuka5

This comment has been minimized.

Copy link

@Menuka5 Menuka5 commented Jul 21, 2019

Got it. Will send a pull request after around 1 hour.

@Menuka5 Menuka5 mentioned this issue Jul 21, 2019
2 of 3 tasks complete
@Menuka5

This comment has been minimized.

Copy link

@Menuka5 Menuka5 commented Jul 21, 2019

I opened a pull request. Hopefully, I didn't violate your PR rules 😃

@petebacondarwin

This comment has been minimized.

Copy link
Member

@petebacondarwin petebacondarwin commented Jul 21, 2019

I left a comment on the PR.

@Menuka5

This comment has been minimized.

Copy link

@Menuka5 Menuka5 commented Jul 21, 2019

@brandonroberts @kapunahelewong @jbogarthyde Can please answer the concern of @petebacondarwin In PR #31713

@kapunahelewong

This comment has been minimized.

Copy link
Contributor

@kapunahelewong kapunahelewong commented Jul 21, 2019

@Menuka5, we'll need to follow @petebacondarwin's guidance here. As far as how to refactor to fix the underlying code (that is, to do the "TODO"), we'd need engineering input unless you know how to refactor the code to fix it. The place I can help you most effectively is the process of getting the PR through review, git questions, pinging the right experts, etc. Please let me know your thoughts.

@Menuka5

This comment has been minimized.

Copy link

@Menuka5 Menuka5 commented Jul 22, 2019

I don't understand the new requirement. I am a beginner to angular.
Can you elaborate more on how to fix this? An example would be nice.

@petebacondarwin

This comment has been minimized.

Copy link
Member

@petebacondarwin petebacondarwin commented Jul 22, 2019

@Menuka5 - I don't know if this is a beginner's task. We need to work out on a case-by-case basis how to remove the ! operator without the TS compiler complaining and without breaking the functioning of the code.

Some are fairly easy, such as this https://github.com/angular/angular/pull/31713/files#r305699323, where we simply provide an initializer.

- public easing !: string | null;
+ public easing: string | null = null;

But in each case you must think through the necessary change.

@jbogarthyde

This comment has been minimized.

Copy link
Contributor

@jbogarthyde jbogarthyde commented Jul 22, 2019

I agree that deciding whether the ! actually needs to be removed is not a beginners task.
The task should be to remove only the TODO comments, and only in doc examples.

I recommend closing the existing PR and starting over. Look only in the examples directories, and remove only those TODO comments that come between // #docregion and // #enddocregion comments.

  • The imported examples for guide pages are under angular/aio/content/examples/
  • The ones for the API reference pages are under angular/packages/examples/

To reduce the review burden (since the examples touch so many different areas, which need to be reviewed by different code-owners), it might be best to do a separate PR for each examples/_package-or-area_ subfolder.

@jbogarthyde jbogarthyde moved this from Committed - Selected for development to Need Assistance in docs Jul 23, 2019
@kapunahelewong kapunahelewong moved this from Need Assistance from Eng. to Pending - Top of backlog in docs Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
docs
Pending - Top of backlog
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.