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] Refactor categoryLinkSource option and usage #100

Merged
merged 3 commits into from
May 23, 2022

Conversation

sserrata
Copy link
Member

@sserrata sserrata commented May 23, 2022

Description

Cleaned up the logic/behavior and usage of categoryLinkSource option when grouping paths by tag.

New expected behavior is as follows:

Scenario 1

categoryLinkSource: undefined
Multi or single spec? single
Expected result: Category link configs should be generated-index with no description. The "Introduction" doc should be the first item in the sidebar and NOT contain DocCardList in the footer.

Scenario 2

categoryLinkSource: "tag"
Multi or single spec? single
Expected result: Category link configs should be generated-index with description(s) set to tag description(s). The "Introduction" doc should be the first item in the sidebar and NOT contain DocCardList in the footer.

Scenario 3

categoryLinkSource: "info"
Multi or single spec? multi (micro-specs)
Expected result: Category link configs should link to respective info/intro docs with DocCardList in the footer. No root level "Introduction" doc should appear in the sidebar.

Anti-pattern 1

categoryLinkSource: "info"
Multi or single spec? single
Expected result: Category link configs will link to the same info/intro doc. No root-level "Introduction" will be included in the sidebar. This is considered an anti-pattern and will be documented as such.

Note that categoryLinkSource: "info" should be reserved for micro-spec use case

Test Plan/Checklist

  • Scenario 1 - Tested with Petstore API
Screen.Recording.2022-05-23.at.9.21.44.AM.mov
  • Scenario 2 - Tested with Petstore API
Screen.Recording.2022-05-23.at.9.24.11.AM.mov
  • Scenario 3 - Tested with CSPM API

image

Note that the undefined fields have been resolved and is currently a pending merge #98

  • Anti-pattern 1 - Tested with Petstore API
    image

@github-actions
Copy link

Size Change: +90 B (0%)

Total Size: 2.38 MB

ℹ️ View Unchanged
Filename Size Change
demo/.docusaurus/globalData.json 9.82 kB 0 B
demo/build/assets/css/styles.********.css 85.5 kB 0 B
demo/build/assets/js/03d773ca.********.js 528 B 0 B
demo/build/assets/js/05098950.********.js 9.84 kB +3 B (0%)
demo/build/assets/js/0e384e19.********.js 2.39 kB 0 B
demo/build/assets/js/135394ac.********.js 11.6 kB +3 B (0%)
demo/build/assets/js/13f7b013.********.js 15.3 kB +3 B (0%)
demo/build/assets/js/14eb3368.********.js 8.66 kB 0 B
demo/build/assets/js/17896441.********.js 11.2 kB 0 B
demo/build/assets/js/18c41134.********.js 14.7 kB 0 B
demo/build/assets/js/1a71454d.********.js 190 B 0 B
demo/build/assets/js/1a9c2752.********.js 16.5 kB +3 B (0%)
demo/build/assets/js/1be78505.********.js 10.8 kB 0 B
demo/build/assets/js/1e4232ab.********.js 3.45 kB 0 B
demo/build/assets/js/1f391b9e.********.js 958 B 0 B
demo/build/assets/js/1f41b3da.********.js 11.8 kB 0 B
demo/build/assets/js/267885ec.********.js 20.1 kB +3 B (0%)
demo/build/assets/js/271404ad.********.js 15.8 kB +3 B (0%)
demo/build/assets/js/29e917ab.********.js 427 B 0 B
demo/build/assets/js/2b85808b.********.js 427 B 0 B
demo/build/assets/js/393be207.********.js 920 B 0 B
demo/build/assets/js/3a924100.********.js 17.9 kB +3 B (0%)
demo/build/assets/js/3d193392.********.js 2.55 kB +3 B (0%)
demo/build/assets/js/3f30461f.********.js 11 kB +3 B (0%)
demo/build/assets/js/3f7c113d.********.js 29.5 kB +3 B (0%)
demo/build/assets/js/4151a9a3.********.js 20.6 kB +3 B (0%)
demo/build/assets/js/49f5d377.********.js 5.62 kB 0 B
demo/build/assets/js/4c5e977b.********.js 31.2 kB 0 B
demo/build/assets/js/4da2255a.********.js 1.8 kB 0 B
demo/build/assets/js/533a09ca.********.js 2.79 kB 0 B
demo/build/assets/js/5547b4e6.********.js 17.6 kB +3 B (0%)
demo/build/assets/js/5c868d36.********.js 3.52 kB 0 B
demo/build/assets/js/6119.********.js 1.09 kB 0 B
demo/build/assets/js/6e5387e3.********.js 8.72 kB +3 B (0%)
demo/build/assets/js/70090257.********.js 20.4 kB +3 B (0%)
demo/build/assets/js/73ed6c6b.********.js 489 B 0 B
demo/build/assets/js/7608cde2.********.js 1.17 kB +3 B (0%)
demo/build/assets/js/7df67612.********.js 16.4 kB +3 B (0%)
demo/build/assets/js/7fb2c1f3.********.js 2.45 kB +3 B (0%)
demo/build/assets/js/8038.********.js 1.09 MB 0 B
demo/build/assets/js/822bd8ab.********.js 3.19 kB 0 B
demo/build/assets/js/8411.********.js 12.8 kB 0 B
demo/build/assets/js/888b62d9.********.js 1.3 kB +3 B (0%)
demo/build/assets/js/8906f45a.********.js 9.96 kB +3 B (0%)
demo/build/assets/js/8a18f3bf.********.js 17.1 kB +3 B (0%)
demo/build/assets/js/8c7cea15.********.js 19.6 kB +3 B (0%)
demo/build/assets/js/935f2afb.********.js 3.54 kB 0 B
demo/build/assets/js/960b46e9.********.js 22.3 kB +3 B (0%)
demo/build/assets/js/9719473f.********.js 1.17 kB +3 B (0%)
demo/build/assets/js/99178e05.********.js 11 kB +3 B (0%)
demo/build/assets/js/a8b9f4aa.********.js 10.3 kB +3 B (0%)
demo/build/assets/js/bfdd0584.********.js 9.62 kB +3 B (0%)
demo/build/assets/js/c4f5d8e4.********.js 72.3 kB 0 B
demo/build/assets/js/c771eeef.********.js 11.8 kB +3 B (0%)
demo/build/assets/js/c97f956e.********.js 2.15 kB +3 B (0%)
demo/build/assets/js/cc12b702.********.js 407 B 0 B
demo/build/assets/js/cf404dba.********.js 442 B 0 B
demo/build/assets/js/common.********.js 125 kB 0 B
demo/build/assets/js/d5bd4b02.********.js 4.41 kB +3 B (0%)
demo/build/assets/js/d865a166.********.js 434 B 0 B
demo/build/assets/js/dff1c289.********.js 4.18 kB 0 B
demo/build/assets/js/e05c9529.********.js 1.68 kB 0 B
demo/build/assets/js/e44a2883.********.js 5.43 kB 0 B
demo/build/assets/js/e5cbb61f.********.js 191 B 0 B
demo/build/assets/js/e7f14080.********.js 6.92 kB +3 B (0%)
demo/build/assets/js/ecc39b49.********.js 190 B 0 B
demo/build/assets/js/f55d3e7a.********.js 3.01 kB 0 B
demo/build/assets/js/main.********.js 405 kB 0 B
demo/build/assets/js/runtime~main.********.js 6.77 kB 0 B
demo/build/index.html 72.8 kB 0 B

compressed-size-action

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 48030e6):

https://docusaurus-openapi-36b86--pr100-b0oq5061.web.app

(expires Wed, 22 Jun 2022 15:08:34 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@sserrata
Copy link
Member Author

@csestito @blindaa121 Please help validate the expected behaviors described above and any other scenarios I might have missed. Thanks!

Copy link
Collaborator

@blindaa121 blindaa121 left a comment

Choose a reason for hiding this comment

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

All scenarios have been tested and updated accordingly in the description 👍

@sserrata sserrata added the bug Something isn't working label May 23, 2022
@sserrata sserrata merged commit 80f13bf into main May 23, 2022
@sserrata sserrata deleted the fix-linksource-option branch May 23, 2022 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants