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

feat(docs-infra): add stable to the list of api statuses #34981

Closed

Conversation

ajitsinghkaler
Copy link
Contributor

Earlier api can be filtered based on security risk and deprecated now added stable as a status for better user experience

Fixes #30396

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • 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?

Earlier only api can be filtered based on deprecated and security
Issue Number: #30396

What is the new behavior?

Api can be filtered using stable also

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@ajitsinghkaler ajitsinghkaler requested a review from a team as a code owner January 26, 2020 19:46
@gkalpak gkalpak added state: WIP target: patch This PR is targeted for the next patch release feature Issue that requests a new feature comp: docs-infra labels Jan 27, 2020
@ngbot ngbot bot added this to the needsTriage milestone Jan 27, 2020
@gkalpak gkalpak added this to IN PROGRESS in docs-infra Jan 27, 2020
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

Thx, @ajitsinghkaler! Can you also add some tests for the new feature?

@@ -117,7 +118,7 @@ export class ApiListComponent implements OnInit {
const matchesQuery = (item: ApiItem) =>
sectionNameMatches || item.name.indexOf(query!) !== -1;
const matchesStatus = (item: ApiItem) =>
status === 'all' || status === item.stability || (status === 'security-risk' && item.securityRisk);
status === 'all' || status === item.stability || (status === 'security-risk' && item.securityRisk) || (status === item.stability && !item.securityRisk);
Copy link
Member

Choose a reason for hiding this comment

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

The last condition seems superfluous, since the earlier status === item.stability would have matched already.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the last one so that the security risk ones does not mix with the stable ones but you are right this condition is not right.

@gkalpak need your views on this should we add security risk items to the stable filter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gkalpak and tests have already been added on line 82-85 it was just that the menu item needed to be added.

If we remove security risk from the stable API then the tests need to be updated otherwise these seem enough to me please have a look at the tests and tell me if any other tests are needed

Copy link
Member

Choose a reason for hiding this comment

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

Yes, security risk is orthogonal to stability, so stable should include securityRisk items as well. I.e. the condition should remain: status === 'all' || status === item.stability || (status === 'security-risk' && item.securityRisk)

Fair enough about the tests. Ideally we should have e2e tests covering this feature, but we don't 😅.
(If you want to add some e2e tests, I won't stop you, but it isn't required for this PR 😁)

@mary-poppins
Copy link

You can preview f013be0 at https://pr34981-f013be0.ngbuilds.io/.

Earlier api can be filtered based on security risk and deprecated now added stable as a status for better user experience

Fixes angular#30396
@ajitsinghkaler
Copy link
Contributor Author

ajitsinghkaler commented Feb 4, 2020

@gkalpak made the changes I'll add e2e tests later in the weekend will make a new issue for keeping the progress status on it

@mary-poppins
Copy link

You can preview 722132c at https://pr34981-722132c.ngbuilds.io/.

@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed state: WIP labels Feb 4, 2020
@mhevery mhevery closed this in aed5c7c Feb 4, 2020
mhevery pushed a commit that referenced this pull request Feb 4, 2020
Earlier api can be filtered based on security risk and deprecated now added stable as a status for better user experience

Fixes #30396

PR Close #34981
@ajitsinghkaler ajitsinghkaler deleted the api-status-stable branch February 5, 2020 18:52
sonukapoor pushed a commit to sonukapoor/angular that referenced this pull request Feb 13, 2020
Earlier api can be filtered based on security risk and deprecated now added stable as a status for better user experience

Fixes angular#30396

PR Close angular#34981
sonukapoor pushed a commit to sonukapoor/angular that referenced this pull request Feb 17, 2020
Earlier api can be filtered based on security risk and deprecated now added stable as a status for better user experience

Fixes angular#30396

PR Close angular#34981
@gkalpak gkalpak moved this from IN PROGRESS to MERGE in docs-infra Mar 3, 2020
@angular-automatic-lock-bot
Copy link

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 Mar 7, 2020
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 aio: preview cla: yes feature Issue that requests a new feature target: patch This PR is targeted for the next patch release
Projects
Development

Successfully merging this pull request may close these issues.

API reference: filter to include the APIs that I should use
4 participants