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: searchable api #1253

Merged
merged 13 commits into from Aug 22, 2022
Merged

docs: searchable api #1253

merged 13 commits into from Aug 22, 2022

Conversation

Shinigami92
Copy link
Member

This is a draft to make the API searchable like https://vuejs.org/api/

@Shinigami92 Shinigami92 added the c: docs Improvements or additions to documentation label Aug 10, 2022
@Shinigami92 Shinigami92 self-assigned this Aug 10, 2022
@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #1253 (0bdd6ea) into main (f684a14) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1253      +/-   ##
==========================================
- Coverage   99.63%   99.62%   -0.01%     
==========================================
  Files        2160     2160              
  Lines      240431   240431              
  Branches     1008     1006       -2     
==========================================
- Hits       239542   239532      -10     
- Misses        868      878      +10     
  Partials       21       21              
Impacted Files Coverage Δ
src/modules/internet/user-agent.ts 81.74% <0.00%> (-2.65%) ⬇️

docs/api/ApiIndex.vue Show resolved Hide resolved
docs/api/ApiIndex.vue Show resolved Hide resolved
docs/api/api-data.json Outdated Show resolved Hide resolved
docs/api/index.md Show resolved Hide resolved
docs/api/api-data.json Outdated Show resolved Hide resolved
docs/.vitepress/config.ts Outdated Show resolved Hide resolved
@Shinigami92
Copy link
Member Author

Current State

image

@ST-DDT
Copy link
Member

ST-DDT commented Aug 10, 2022

Amazing! Do we want to search for only the names or do we also want to search for some (hidden) aliases/tags?

@Shinigami92
Copy link
Member Author

Amazing!

thx :3

Do we want to search for only the names or do we also want to search for some (hidden) aliases/tags?

Not sure, I would start with simple solution
But I think I need to normalize some stuff (like _Date => Date)

@ST-DDT
Copy link
Member

ST-DDT commented Aug 10, 2022

I think we already have the normalization somewhere for the api docs themselves.

const moduleName = module.name.replace('_', '');

Maybe we should extract it to a separate method (normalizeModuleName).

For method names we have that to a certain extend already:

export function prettifyMethodName(method: string): string {

(We might have to separate between id-names and title-names though)

@Shinigami92
Copy link
Member Author

Okay, I think I need to generate at build-time a data json for the search page, because I would like to prevent the need of recreating the search data object everytime someone visit the search page on their client

Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

Blocked by #1272 and then it needs to be rebased to use the new methods so we have consistent api docs and search index.

scripts/apidoc/apiDocsWriter.ts Show resolved Hide resolved
@ST-DDT ST-DDT added needs rebase There is a merge conflict s: on hold Blocked by something or frozen to avoid conflicts labels Aug 15, 2022
@Shinigami92 Shinigami92 removed the s: on hold Blocked by something or frozen to avoid conflicts label Aug 17, 2022
@Shinigami92 Shinigami92 removed the needs rebase There is a merge conflict label Aug 17, 2022
docs/api/.gitignore Outdated Show resolved Hide resolved
docs/api/ApiIndex.vue Outdated Show resolved Hide resolved
docs/api/api-types.ts Show resolved Hide resolved
@Shinigami92 Shinigami92 marked this pull request as ready for review August 20, 2022 11:04
@Shinigami92 Shinigami92 requested a review from a team August 20, 2022 11:04
@Shinigami92 Shinigami92 requested a review from a team as a code owner August 20, 2022 11:04
@Shinigami92
Copy link
Member Author

Current State

image

Anything else to get that merged? Or could we maybe enhance it in later PRs if needed and serve now the doc-user UX?

@Shinigami92 Shinigami92 requested review from ST-DDT, import-brain and a team August 22, 2022 10:34
@Shinigami92 Shinigami92 merged commit 0866ee9 into main Aug 22, 2022
@Shinigami92 Shinigami92 deleted the docs-api-search branch August 22, 2022 15:38
@ST-DDT ST-DDT added this to the v7 - Current Major milestone Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: docs Improvements or additions to documentation
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants