Skip to content

Commit

Permalink
docs: improve doc and match identity
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadrien Froger committed Nov 8, 2024
1 parent c97020a commit 6565fd2
Show file tree
Hide file tree
Showing 33 changed files with 423 additions and 556 deletions.
140 changes: 140 additions & 0 deletions website/docs/contribute/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
sidebar_position: 2
description: The code we expect you to follow to contribute
---

# Contributor Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[support@octree.ch](mailto:support@octree.ch).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

:::info
## Attribution

This Code of Conduct is adapted from the Contributor Covenant homepage,
version 2.1, available at
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by
Mozilla's code of conduct enforcement ladder, Mozilla CoC.

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
>
* homepage: https://www.contributor-covenant.org
* v2.1: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
* Mozilla CoC: https://github.com/mozilla/diversity
* FAQ: https://www.contributor-covenant.org/faq
* translations: https://www.contributor-covenant.org/translations

:::
24 changes: 22 additions & 2 deletions website/docs/contribute/translations.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
---
sidebar_position: 5
---
sidebar_position: 3
description: How to translate this module
---

# Translate!
[![Crowdin](https://badges.crowdin.net/decidim-geo/localized.svg)](https://crowdin.com/project/decidim-geo)

We appreciate your interest in contributing to the translation of Decidim Geo. Our aim is to make Decidim Geo accessible to users worldwide, and your help in this endeavor is invaluable.

Decidim Geo utilizes [Crowdin](https://crowdin.com/project/decidim-geo), a leading platform for collaborative translation projects. Currently, we have translations in over 3 languages, and hope we will get more soon.

If you're interested in joining this global effort, here's how you can contribute:

* Join the project: Access [the Crowdin project page](https://crowdin.com/project/decidim-geo), and click "Go to Editor". You will need to create an account in Crowdin if you haven't already one.

* Start translating: After opening the editor, you can start translating. Whether you're helping to translate a new language or improving existing translations, your contribution will make a significant impact.

* Your work will be reviewed and merge in the next minor version. Usually, we take up to 10 working days to release new minor versions. If you are in hurry, please send us an email at [support@octree.ch](mailto:support@octree.ch)

By contributing to the translation of Decidim Geo, you're not just translating words; you're helping to break down language barriers and making this module more accessible to users around the world.

Thank you for your interest, and we look forward to your contribution!
51 changes: 49 additions & 2 deletions website/docs/dev-documentation/install.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
---
sidebar_position: 5
---
sidebar_position: 1
title: Install Decidim Geo
description: Installation instructions
---

### Support Table
| Decidim Version | Supported? |
|-----------------|-------------|
| 0.24 | no |
| 0.26 | no |
| 0.27 | yes |
| 0.28 | coming soon |
| 0.29 | coming soon |

To install Decidim Geo, you need a [Posgis](https://postgis.net/) extension installed.

### Install Decidim Geo

Add the gem to your Gemfile
```
gem "decidim-decidim_geo", version: "~> 0.2.6"
```

Add javascripts libraries
```
bundle exec rails decidim_geo:webpacker:install
```

Copy migrations and migrate
```
bundle exec rails decidim_geo:migration:install
bundle exec rails db:migrate
```

### Check your installation
Check javascript libraries got installed
```
# Should have javascript libraries placed in your package.json
cat package.json | grep @maptiler/leaflet-maptilersdk
```
All migrations should be up
```
bundle exec rails db:migrate:status | grep down
# Should display nothing
```
Assets compilations should pass.
```
bundle exec rails assets:precompile
```
18 changes: 18 additions & 0 deletions website/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ Decidim Geo module add interactive maps with great mobile experience to your pla
- Configure custom map tiles
- Mobile-First UI.

## Want to start?

<div style={{ "display": "flex", "gap": 32, "flex-wrap": "wrap", "textAlign": "center", justifyContent: "space-between", marginTop: 32 }}>
<a href="https://geo.demo.voca.city" target="_blank" style={{ flex: 1, maxWidth: "180px"}}>
<img src="./img/demo-btn.png" /><br />
<h3 style={{marginTop: 12}}>Go to demo</h3>
</a>
<a href="https://geo.demo.voca.city" target="_blank" style={{ flex: 1, maxWidth: "180px"}}>
<img src="./img/call-btn.png" /><br />
<h3 style={{marginTop: 12}}>Book a 1-1 call</h3>
</a>
<a href="https://geo.demo.voca.city" target="_blank" style={{ flex: 1, maxWidth: "180px"}}>
<img src="./img/play-btn.png" /><br />
<h3 style={{marginTop: 12}}>Watch the demo video</h3>
</a>
</div>


## Used & Supported by pionneers

![City of Lausanne and Zürich supports development of Decidim Geo](/partners.png)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/user-documentation/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "For Admins",
"label": "How it works",
"position": 2,
"link": {
"type": "generated-index",
Expand Down
16 changes: 7 additions & 9 deletions website/docs/user-documentation/automatic-scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@ description: Magically assign points to a scope
---

# Automatic Scopes
A recurrent task can assign auto-magically points to a region. This allows you to ask one thing less for the participant, and still map correctly the information.

## What it does?
A recurring task can automatically assign points to a region. This removes an extra step for participants while ensuring accurate mapping of information.

Following the following rules, an automatic check will bind a resource to a shape.
## What It Does

An automatic check will bind a resource to a shape based on the following conditions:

- If the space (assembly, process) does not have scope enabled
- If the component does not have any scope enabled
- Then: All meetings, debates, accountability results, proposals that have a geolocation will be mapped automatically to a scope.

- Then, all meetings, debates, accountability results, and proposals with geolocation will be mapped automatically to a scope.

### Use case: Participatory Budget
### Use Case: Participatory Budget

On a proposal phase for a participatory budget, you can active geolocated proposals.
Once participant propose, they will be able to map an address.
After a while beeing published, an external process will check if this point is inside one of your scopes, and will assign it.
In a proposal phase for participatory budgeting, you can enable geolocated proposals. When participants submit proposals, they can map an address. After publication, an external process will verify if the point falls within one of your scopes and will assign it accordingly.
49 changes: 21 additions & 28 deletions website/docs/user-documentation/configure-shapefiles.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,39 @@
---
sidebar_position: 2
title: Configure Shapes
description: Upload, configure and define shapes in decidim geo
description: Upload, configure, and define shapes in Decidim Geo
---

# Scope with a geografical area

Decidim-Geo allows you to upload a shapefile, file that contains many shapes.
After the upload, you can assign each shape to a decidim scope, creating a transversal nagivation for your whole platform.

# Scope with a Geographical Area

Decidim Geo allows you to upload a shapefile, a file containing multiple shapes. After uploading, you can assign each shape to a Decidim scope, creating a transversal navigation across your platform.

:::info
Configuring shapefiles and attribute shapes to scopes are optional.
If you never used Decidim Scopes before, you can safly skip this page.
Configuring shapefiles and assigning shapes to scopes are optional.
If you haven’t used Decidim Scopes before, you can safely skip this page.
:::

## Prerequisites
Your shapefile must meet the following requirements:

# Prerequisite
Your shapefile needs to fullfill the following constraints:

- Shapes needs to have a `NAME` metadata. This name will be the label to use in your admin side.
- The shapefile is a zip file containing nothing else but shape files data. No .DS_Store or other distribution specific files are supported
- The shapes needs to be exported in WSG-84 projection.

# Upload the zip file
To upload the zipfile, go in you administration dashboard and click on the "Geo" icon.
![Click on the Geo in the lateral menu to configure Decidim geo](./upload-shapefile/screenshot-01.png)
- Shapes must contain a `NAME` metadata field. This name will be the label used on your admin side.
- The shapefile must be a zip file containing only shape data files. No additional files (e.g., .DS_Store or other system-specific files) are supported.
- Shapes must be exported in the WSG-84 projection.

On the lateral Menu, click on the Shapefile tab, and upload your zipfile.
The upload may be loading for a while, to save all the shapes in the database, so please be patient.
## Upload the Zip File
To upload the zip file, go to your administration dashboard and click on the "Geo" icon.
![Click on the Geo icon in the lateral menu to configure Decidim Geo](./upload-shapefile/screenshot-01.png)

![Click on the Geo in the lateral menu to configure Decidim geo](./upload-shapefile/screenshot-02.png)
In the lateral menu, click on the Shapefile tab and upload your zip file. The upload may take a moment as all shapes are saved to the database, so please be patient.

## Link Shapefile to a scope type
Once uploaded, you can link a shapefile to a scope type. Once done, all scopes of the scopetypes will be geo-compatible.
![Upload your shapefile through the Geo configuration menu](./upload-shapefile/screenshot-02.png)

![Click on the Geo in the lateral menu to configure Decidim geo](./upload-shapefile/screenshot-03.png)
## Link Shapefile to a Scope Type
Once uploaded, you can link a shapefile to a scope type. Once linked, all scopes of that scope type will be geo-compatible.

![Link shapefiles to a scope type in Decidim Geo](./upload-shapefile/screenshot-03.png)

## Link the scopes to the Shapedata
Once you have specified a geo-friendly scope type, all the scopes associates will have a field named "Shape Data".
This allows you to select for each scope the matching scope data.
## Link Scopes to Shape Data
After specifying a geo-friendly scope type, all associated scopes will include a field named "Shape Data." This allows you to select the corresponding shape data for each scope.

![Click on the Geo in the lateral menu to configure Decidim geo](./upload-shapefile/screenshot-04.png)
![Configure scope-specific shape data](./upload-shapefile/screenshot-04.png)
2 changes: 1 addition & 1 deletion website/docs/user-documentation/customize-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ To use map tiler, you can create a new custom map in MapTiler, and once saved, u


:::info
We might change the internal library (leaflet) to have a native support on vector tiles (Map Liber).
We might change the internal library (leaflet) to have a native support on vector tiles (Map Libre).
But this is unplanned for now.
:::
19 changes: 10 additions & 9 deletions website/docs/user-documentation/customize-space-pages.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
sidebar_position: 3
title: Customize space pages
description: Customize processes pages or assemblies
title: Customize Space Pages
description: Customize pages for processes or assemblies
---

# Customize Space pages (Assemblies, Processes)
To have a broader perspective when you access to the main assemblies or processes pages, you can configure Decidim Geo to display on spaces on the map.
# Customize Space Pages (Assemblies, Processes)

- Display only assemblies in Assemblies: on the assemblies main page, display in Decidim Geo only the assemblies
- Display only processes in Processes: on the processes main page, display in Decidim Geo only the processes
To provide a focused view when accessing the main pages for assemblies or processes, you can configure Decidim Geo to display only specific types of spaces on the map.

To define this option, check the options in the Decidim Geo configuration page from the admin dashboard.
- **Display only assemblies on the Assemblies page:** On the main assemblies page, Decidim Geo will show only assemblies.
- **Display only processes on the Processes page:** On the main processes page, Decidim Geo will show only processes.

To set this option, go to the Decidim Geo configuration page in the admin dashboard.
![Admin panel options](./customize-space-pages/screenshot-01.png)

**When active, the _type_ filter won't appear in Decidim Geo**<br />
If you activate this option, the filter for type won't show up, as these maps will display only the assembly or process type.
**When Active, the _Type_ Filter Won't Appear in Decidim Geo**
If this option is enabled, the type filter will be hidden, as these maps will display only the selected assembly or process type.
![Filter option on Decidim Geo front end](./customize-space-pages/screenshot-02.png)
Loading

0 comments on commit 6565fd2

Please sign in to comment.