Skip to content

feat(aio): add "suggest edits" feature to all docs - #24378

Closed
martinsik wants to merge 4 commits into
angular:masterfrom
martinsik:issue-23981
Closed

martinsik wants to merge 4 commits into
angular:masterfrom
martinsik:issue-23981

Conversation

@martinsik

@martinsik martinsik commented Jun 8, 2018 •

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

The "Suggest Edits" pencil icon is only in the API subsection.

Issue Number: #23981

What is the new behavior?

The "Suggest Edits" pencil icon is on all pages under /docs.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

@gkalpak gkalpak added action: review The PR is still awaiting reviews from at least one requested reviewer comp: docs-infra target: patch This PR is targeted for the next patch release labels Jun 8, 2018
@mary-poppins

Copy link
Copy Markdown

You can preview a8b1b67 at https://pr24378-a8b1b67.ngbuilds.io/.

@gkalpak
gkalpak requested a review from petebacondarwin June 8, 2018 16:44

@gkalpak gkalpak left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please change the scope in commit messages to docs-infra.
Other than that, it looks good from a quick look 💯

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

aio is not an appropriate scope (it is only for documentation of the docs-viewer app itself or the documentation tooling; and it has been renamed to docs-infra to make it clear).
For guides and tutorial, it should be just docs: ...

@gkalpak

gkalpak commented Jun 8, 2018

Copy link
Copy Markdown
Member

One more thing: I would like the button style to be closer to #24000 😁

@petebacondarwin

Copy link
Copy Markdown
Contributor

One more, more thing: I would rather keep helper template files (i.e. ones that are not used directly as templates) such as the githubLinks.html file out of the main folder. I understand you moved it because it is shared outside the API stuff now. Perhaps you could create a lib folder directly below the templates folder for this file?

@martinsik

martinsik commented Jun 9, 2018 •

Copy link
Copy Markdown
Contributor Author

@gkalpak I updated commit messages. The aio scope is actually mentioned here https://github.com/angular/angular/blob/master/CONTRIBUTING.md#scope. Now the links use just docs: prefix. My changes will probably conflict with #24000 but I think visually the buttons look the same if that's what you meant.

@petebacondarwin I moved the githubLinks.html file to a new lib dir.

I also added e2e tests for the "Suggest edit" buttons under /docs.

There was one very confusing thing. The doc.fileInfo template variable has different structure for doc.docType === 'content' and for everything else.

With content its structure comes from here https://github.com/angular/dgeni-packages/blob/8c856f3d75bb527248f86e6c70d3c6ed81e7740c/base/processors/read-files.js#L70 while all the other page types use this https://github.com/angular/dgeni-packages/blob/c7d1b54c808931394912fcf062df25aeeb572883/typescript/src/services/TsParser/FileInfo.ts. The first one has projectRelativePath while the second one realProjectRelativePath so that's why I had to add an extra condition for this.

@mary-poppins

Copy link
Copy Markdown

You can preview 727934c at https://pr24378-727934c.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 3d093b2 at https://pr24378-3d093b2.ngbuilds.io/.

Comment thread aio/tests/e2e/app.e2e-spec.ts Outdated

@lacolaco lacolaco Jun 11, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this feature will be released, some angular.io localization sites (at least our angular.jp) will customize it to jump to its own repository.
So I want this specs not to depend on angular/angular repository.

@martinsik martinsik Jun 11, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Exactly. After I've send the above comment, I found it's e2e testing so it doesn't affect to build aio. Sorry, and thank you. 🙌

@gkalpak

gkalpak commented Jun 11, 2018

Copy link
Copy Markdown
Member

The aio scope is actually mentioned here https://github.com/angular/angular/blob/master/CONTRIBUTING.md#scope.

Ooops, we missed it in #24295. It should be docs-infra. (Submitted #24410.)

My changes will probably conflict with #24000 but I think visually the buttons look the same if that's what you meant.

AFAICT, the buttons here are blue (gray on hover), while the buttons on #24000 are gray (blue on hover).

@martinsik

Copy link
Copy Markdown
Contributor Author

@gkalpak When I check the latest #24000 build at https://pr24000-9697d53.ngbuilds.io/ I see blue buttons (and grey on hover).

screen shot 2018-06-11 at 12 03 07

@gkalpak

gkalpak commented Jun 11, 2018

Copy link
Copy Markdown
Member

Nevermind. I was referring to the buttons for methods. I didn't realize/remember we have differently styled buttons for the whole doc. This is a different discussion, so the buttons are fine as you have them (for this PR's purpose). 👍

@petebacondarwin petebacondarwin added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 15, 2018

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - please rebase and fix the conflicts.

@petebacondarwin petebacondarwin added this to the Backlog milestone Jun 15, 2018
@ngbot ngbot Bot modified the milestones: Backlog, needsTriage Jun 15, 2018
@martinsik

martinsik commented Jun 19, 2018 •

Copy link
Copy Markdown
Contributor Author

@petebacondarwin @gkalpak rebased and conflicts fixed.

@mary-poppins

Copy link
Copy Markdown

You can preview 2ae87a0 at https://pr24378-2ae87a0.ngbuilds.io/.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the motivation for this change? Other than the marketing docs, which docs should not have this link?

@martinsik martinsik Aug 29, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@petebacondarwin It's been a while since I did this but I think this is because the edit icon should be visible almost everywhere including pages in the top level navigation such as /docs but not at /features or /resources (I think all these pages use the same content.template.html)

@petebacondarwin petebacondarwin added merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Aug 29, 2018
@petebacondarwin

petebacondarwin commented Aug 29, 2018 •

Copy link
Copy Markdown
Contributor

Caretaker: it appears that the rebase caused this PR's CLA status to go red. It looks to me as though it should be green. Also the last pending Travis task is flaky and nothing to do with this PR.

@petebacondarwin petebacondarwin added the action: merge The PR is ready for merge by the caretaker label Aug 29, 2018
@ngbot

ngbot Bot commented Aug 29, 2018

Copy link
Copy Markdown

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure missing required label: "cla: yes"
    failure forbidden label detected: cla: no
    pending status "continuous-integration/travis-ci/pr" is pending

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@googlebot

Copy link
Copy Markdown

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@mhevery mhevery closed this in 9533cc9 Aug 31, 2018
mhevery pushed a commit that referenced this pull request Aug 31, 2018
mhevery pushed a commit that referenced this pull request Aug 31, 2018
mhevery pushed a commit that referenced this pull request Aug 31, 2018
mhevery pushed a commit that referenced this pull request Aug 31, 2018
@gkalpak

gkalpak commented Sep 5, 2018

Copy link
Copy Markdown
Member

🎉

@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants