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(quasar): add docsUrl to API definition #4045

Merged
merged 24 commits into from
Nov 26, 2019

Conversation

lucasfernog
Copy link
Contributor

@lucasfernog lucasfernog commented May 4, 2019

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch and not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on a Electron app
  • Any necessary documentation has been added or updated in the docs (for faster update click on "Suggest an edit on GitHub" at bottom of page) or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

The quasar docs command receives a Quasar component/directive/plugin and opens the docs page. It also supports app extensions. It also has a --api option, which uses the API table anchor as URL.

Credits to @hawkeye64 for the idea.

EDIT: added options to open sections (components, plugins, directives and extensions), e.g. quasar docs components

@nothingismagick
Copy link
Contributor

nothingismagick commented May 4, 2019 via email

@lucasfernog
Copy link
Contributor Author

Thanks. Will adjust it to support quasar docs components/plugins/directives.

@nothingismagick
Copy link
Contributor

nothingismagick commented May 4, 2019 via email

@lucasfernog
Copy link
Contributor Author

Just a dumb question: how hard would it be to have $ quasar api search ${search_term}

That's a VERY nice idea, and not hard at all. Just a matter of reading all API file names (quasar/dist/api/*.json) and string filtering them. If it will be another command, I can make another PR.

@nothingismagick
Copy link
Contributor

nothingismagick commented May 4, 2019 via email

@lucasfernog
Copy link
Contributor Author

Another thing that is missing here: can this command read the Quasar build config and get the user preferred browser? I've tried but couldn't do it.

@lucasfernog
Copy link
Contributor Author

Another thing that is missing here: can this command read the Quasar build config and get the user preferred browser? I've tried but couldn't do it.

Fixed with latest commits. Also fixed running with app extension API. This PR is now done unless you want something else.

@lucasfernog
Copy link
Contributor Author

TODO: move default "docs" values to the build command.

@lucasfernog lucasfernog force-pushed the feature/docs-command branch from 7707ffc to b8d7b16 Compare May 14, 2019 00:17
@lucasfernog lucasfernog changed the title feat(quasar): add quasar docs command feat(quasar): add docsUrl to API definition Nov 6, 2019
app/bin/quasar Outdated Show resolved Hide resolved
app/bin/quasar-describe Outdated Show resolved Hide resolved
docs/src/components/DocApi.vue Outdated Show resolved Hide resolved
@@ -117,6 +118,11 @@ const objectTypes = {
required: [ 'desc' ]
},

meta: {
props: [ 'docsRoute', 'docsPage', 'docsApiAnchor' ],
Copy link
Member

@rstoenescu rstoenescu Nov 26, 2019

Choose a reason for hiding this comment

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

Let's use one prop only "docsUrl" with full URL. For now, point to https://v1.quasar.dev. Example:

meta: {
  docsUrl: 'https://v1.quasar.dev/......'
}

ui/src/components/btn/QBtn.json Outdated Show resolved Hide resolved
ui/src/components/pagination/QPagination.json Outdated Show resolved Hide resolved
ui/src/components/table/QTable.json Outdated Show resolved Hide resolved
app/bin/quasar-describe Outdated Show resolved Hide resolved
@rstoenescu rstoenescu merged commit 9555037 into quasarframework:dev Nov 26, 2019
@lucasfernog lucasfernog deleted the feature/docs-command branch November 26, 2019 15:52
mesqueeb pushed a commit to mesqueeb/quasar that referenced this pull request Feb 2, 2020
* quasar docs command

* add docs

* add sections

* add sections to command

* fix open browser

* pass supplier to docs function

* read quasar conf for open browser

* fix command with app extensions API

* open-browser using its own logger

* fix Ripple docs

* move "docs" defaults to build.api.js

* fix DocApi trying to render docs field

* fix QUploaderAddTrigger page

* feat(api) change "docs" key to "meta"

* fix(api) definitions for meta

* fix(api) definitions for meta & `quasar docs` usage

* feat(api) move docs opening to describe command and prefix API with "docs"

* feat(docs) add new quasar describe option

* fix(quasar) code review updates

* fix(app) describe command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants