Skip to content

Commit

Permalink
feat(glossaire): add glossary page and tooltip(#1269)
Browse files Browse the repository at this point in the history
* feat(glossary): add glossary page

* fix(data): use datafiller as glossary's datasource

* feat(glossary): add glossary pages

* update toc

* refactor(glossary): move data into dataset/datafiller

* fix(glossary): transform multiline value into array

* fix(glossary): fix url display

* fix(readme): add missing title

* feat(glossary): add tooltip for text content

* test(glossary): update snapshot

* fix(glossary): remove variants / abbrs

* chore(glossary): update data

* test(glossary): update snapshots

* ci(k8s): update liveness value

* chore(glossary): rebase master

* fix rebase

* fix(glossary): improve matching words

* doc(datafiller): fix readme

* test(glossary): add tooltip tests

* fix(glossary): udpate matching strategy for glossary term

* fix(glossary): change ref wording

* chore(glossary): udpate data

* fiiiiiiix

fix #1186
  • Loading branch information
lionelB committed Sep 19, 2019
1 parent 557e184 commit 7defed9
Show file tree
Hide file tree
Showing 25 changed files with 8,267 additions and 3,704 deletions.
4 changes: 2 additions & 2 deletions .k8s/elasticsearch/statefulset.dev.yml
Expand Up @@ -56,14 +56,14 @@ spec:
scheme: HTTP
path: /_cluster/health
port: ${PORT}
initialDelaySeconds: 30
initialDelaySeconds: 60
periodSeconds: 5
readinessProbe:
httpGet:
scheme: HTTP
path: /_cluster/health?local=true
port: ${PORT}
initialDelaySeconds: 30
initialDelaySeconds: 60
ports:
- containerPort: ${PORT}
name: es-http
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Expand Up @@ -27,6 +27,7 @@ COPY ./packages/react-fiche-service-public/package.json /app/packages/react-fich
COPY ./packages/code-du-travail-data/dataset/preavis-demission/package.json /app/packages/code-du-travail-data/dataset/preavis-demission/package.json
COPY ./packages/sources/package.json /app/packages/sources/package.json


# PERF(douglasduteil): put packages that are more likely to change in order here
# By order of "more likely to change" the frontend, the api, etc... are changing
# more often than the dataset.
Expand Down
41 changes: 37 additions & 4 deletions packages/code-du-travail-data/dataset/datafiller/README.md
@@ -1,9 +1,9 @@
# Indexation des données du datafiller
# Indexing data from datafiller

Afin de pouvoir proposer à l'utilisateur des réponses pré-qualifiées issues du [datafiller](https://github.com/SocialGouv/datafiller/), il faut récupérer ces données pour les mettre [à disposition de l'API](../code-du-travail-api/routes/search/search.prequalified.js).

Pour générer le fichier qui servira à l'indexation, la commande
## Prequalified data
In order to present to the user pre-qualified answers coming from the [datafiller](https://github.com/SocialGouv/datafiller/), we need to extract them and provide them to our [API](../code-du-travail-api/routes/search/search.prequalified.js).

### Generate the prequalified data file
```sh
$ yarn start
```
Expand All @@ -14,3 +14,36 @@ va générer :
- le fichier `themes.data.json` qui sera ensuite utilisé par [l'API](../code-du-travail-api/routes/themes/index.js).

Le serveur elastic peut être configuré avec `process.env.ELASTICSEARCH_URL` et utilise `http://127.0.0.1:9200` par défaut.

## Glossary

This project extracts glossary terms from a [google spreadsheet](https://docs.google.com/spreadsheets/d/1WrmotMiu4kBxRTKW47Q3CzNjxc0GycfAilSHcXH_hfA/edit#gid=0) and transform the result into a json file.

### Generate the glossary file

```bash
$ yarn glossary
```

### Sample content
```json
[
{
"term": "Accord interentreprises",
"definition_cdtn": "Accord collectif conclu au niveau de plusieurs entreprises n'appartenant pas au même groupe."
},
{
"term": "accord national interprofessionnel",
"abbrev": "ANI",
"synonym": "accords de grenelle \naccords matignon \naccords parodi",
"definition": "Accord collectif négocié au niveau national, couvrant l’ensemble des secteurs d’activités professionnelles et validé selon des modalités précisées par l’article L. 2232-2 du code du travail",
"definition_cdtn": "Accord collectif conclu au niveau national qui s'applique à plusieurs branches professionnelles. "
},
{
"term": "protocole d'accord préélectoral",
"abbrev": "PAP",
"synonym": "protocole préélectoral\naccord préélectoral",
"definition_cdtn": " Accord spécifique négocié entre l'employeur et les syndicats pour organiser les élections professionnelles des représentants du personnel (modalités d'organisation et de déroulement des élections, répartition des sièges...)"
}
]
```

0 comments on commit 7defed9

Please sign in to comment.