Skip to content

Commit

Permalink
docs: better web component reference
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgarel committed Jul 11, 2024
1 parent 7d65d07 commit 84588b1
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
if: steps.wait-build-front-image.outputs.conclusion == 'timed_out'
run: echo Timeout && false # fail if build time out

# Getting web-components docs: extract json and add html to expose them
- name: Getting web-components docs from frontend image
# Getting web-components docs: extract json to expose them
- name: Getting web-components json from frontend image
run: |
# download docker image corresponding to the tag
image_name=ghcr.io/${{ github.repository }}/search_front_image:${{ env.TAG_NAME }}
Expand Down
90 changes: 88 additions & 2 deletions docs/users/ref-web-components.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,89 @@
# Reference for Search-a-licious Web components
# Reference for Search-a-licious Web Components

**IMPORTANT:** do not edit this file, it is replaced by web-components.html at documentation generation time.
This page documents [web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components)
provided by Search-a-licious
to quickly build your interfaces.

## Main components

### searchalicious-bar

<api-viewer src="./dist/custom-elements.json" only="searchalicious-bar"></api-viewer>

### searchalicious-results
<api-viewer src="./dist/custom-elements.json" only="searchalicious-results"></api-viewer>

### searchalicious-pages

<api-viewer src="./dist/custom-elements.json" only="searchalicious-pages">

### searchalicious-facets

<api-viewer src="./dist/custom-elements.json" only="searchalicious-sort">

### searchalicious-chart

<api-viewer src="./dist/custom-elements.json" only="searchalicious-chart">

### searchalicious-sort

<api-viewer src="./dist/custom-elements.json" only="searchalicious-sort">

### searchalicious-sort-field

<api-viewer src="./dist/custom-elements.json" only="searchalicious-field">

### searchalicious-sort-script

<api-viewer src="./dist/custom-elements.json" only="searchalicious-script">

### searchalicious-button

<api-viewer src="./dist/custom-elements.json" only="searchalicious-button">

### searchalicious-count

<api-viewer src="./dist/custom-elements.json" only="searchalicious-count">


## Internal components

### searchalicious-facet-terms

<api-viewer src="./dist/custom-elements.json" only="searchalicious-facet-terms">

### searchalicious-suggestion-entry

<api-viewer src="./dist/custom-elements.json" only="searchalicious-suggestion-entry">

### searchalicious-checkbox

<api-viewer src="./dist/custom-elements.json" only="searchalicious-checkbox">

### searchalicious-radio

<api-viewer src="./dist/custom-elements.json" only="searchalicious-radio">

### searchalicious-toggle

<api-viewer src="./dist/custom-elements.json" only="searchalicious-toggle">

### searchalicious-secondary-button

<api-viewer src="./dist/custom-elements.json" only="searchalicious-secondary-button">

### searchalicious-button-transparent

<api-viewer src="./dist/custom-elements.json" only="searchalicious-button-transparent">

### searchalicious-icon-cross

<api-viewer src="./dist/custom-elements.json" only="searchalicious-icon-cross">

### searchalicious-suggestion-entry

<api-viewer src="./dist/custom-elements.json" only="searchalicious-suggestion-entry">


<!-- api-viewer element library -->
<script type="module" src="https://jspm.dev/api-viewer-element"></script>
2 changes: 1 addition & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This enables supporting multiple searches in the same page
* **searchalicious-facet-terms** renders the facet for terms (list of entries, with number of docs).
* it must be in a `searchalicious-facets`
* the user can select facets to filter the search
* **searchalicious-checkbox** is a component that displays a list of suggestions
* **searchalicious-suggestion-entry** is a component that displays a list of suggestions
* it must be in a `searchalicious-facet`
* it will influence the search adding terms to the search
* **searchalicious-checkbox** is a simple checkbox
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ plugins:
- exclude:
glob:
- reports/
- "*_TODO.md"
- "*_TODO.md"

0 comments on commit 84588b1

Please sign in to comment.