Skip to content

Commit

Permalink
Merge branch 'master' into wfs-qgis-filter-support
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasSp committed Feb 20, 2024
2 parents 7be7efd + e208a42 commit d38cdf8
Show file tree
Hide file tree
Showing 175 changed files with 147,872 additions and 135,568 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"env": {
"browser": true
},
"parserOptions": {
"ecmaVersion": "latest"
},

"rules": {
"comma-dangle": [
"error",
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,26 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +63,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
17 changes: 17 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Lint
on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run lint
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ Your pull request should:

* Be able to merge without conflicts.

* The subject of the PR has to start with one of these prefix:
* dep: updated dependencies
* docs: editing .md-files in this repo
* feature: for new features
* fix: bugfix or rewritten code that doesn't add new functionality

### Commit messages guidelines

We are using the same guidelines for commit messages as the [OpenLayers project](https://github.com/openlayers/openlayers).
Expand Down
12 changes: 8 additions & 4 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Developing with Origo

## Language
Origo uses JavaScript ECMAScript 6, HTML5 and CSS3. Dependencies to other frameworks shall be avoided. Utilizing other libraries and components are however allowed. The ambition is to use smaller libraries as building blocks rather than building Origo into a big and complex framework such as ExtJS or AngularJS. When using third party libraries or components it is important to ensure that the license is compatible with the license for Origo, see the [license file](LICENSE.txt).
Origo uses JavaScript ECMAScript 6, HTML5 and CSS3. Dependencies to other frameworks shall be avoided. Utilizing other libraries and components are however allowed. The ambition is to use smaller libraries as building blocks rather than building Origo into a big and complex framework such as ExtJS or AngularJS. When using third party libraries or components it is important to ensure that the license is compatible with the license for Origo, see the [license file](LICENSE.txt).

Origo uses OpenLayers as the map component. Development in Origo shall support versions according to package.json at GitHub. Origo shall support the most commonly used web browsers such as Internet Explorer 11, Edge, FireFox, Chrome and Safari.
Origo uses OpenLayers as the map component. Development in Origo shall support versions according to package.json at GitHub. Origo shall support the most commonly used web browsers such as Edge, FireFox, Chrome and Safari.

When developing, progressive enhancement is an encouraged strategy. That means that it is allowed to adopt new technology that may not be widely supported today but enhances the user experience in modern web browsers under the condition that the functionality is not critical.

## JavaScript
Origo follows the [Airbnb's JavaScript Style Guide](https://github.com/airbnb/javascript) for EcmaScript 6.
Origo follows the [Airbnb's JavaScript Style Guide](https://github.com/airbnb/javascript) for EcmaScript 6. There are npm scripts that can be used
to verify that the code complies with the rules: `npm run lint`to check the code, `npm run lint-run` to run the _webpack dev server_ with lint enabled and
`npm run lint-build` to lint and build. As the lint rules are also enforced when creating a pull request, there must be no errors in the code. If an error can not be avoided
it must be ignored by adding a _eslint_ ignore comment: `// eslint-disable-next-line <name-of-error>`. There should also be a comment that
clearly states why it is ignored instead of fixed.

We wish to promote modular development, and in order to do this we have chosen [webpack](https://github.com/webpack/webpack) as the bundler.

Expand All @@ -20,7 +24,7 @@ Origo uses [Handlebars.js](http://handlebarsjs.com/) as templating system to bui
## CSS
The [CSS/SASS guidelines from Airbnb](https://github.com/airbnb/css) shall be followed.

Origo uses SASS to enable modular development of CSS. That means changes and additions to CSS are made in .scss files only. When changes are made it must be verified they are not in conflict with existing css.
Origo uses SASS to enable modular development of CSS. That means changes and additions to CSS are made in .scss files only. When changes are made it must be verified they are not in conflict with existing css.

The classes and IDs of CSS selectors shall have the prefix 'o-'.

Expand Down
16 changes: 14 additions & 2 deletions PLUGINS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

# Origo plugins
More information about how to develop and utilize plugins with Origo will be added soon.
Plugins are to be developed when a feature or function is not appropriate to be included in the origo core. Common reasons are external dependencies or a specific feature or function not requested by the average user.
## Guidelines development

**[Barebone](https://github.com/origo-map/barebone-plugin)** is an example plugin to provide an initial structure of how you can start developing your plugin.

Origo core has a lot of dependencies by default which are available to use from the plugins. They should be utilized first before loading more external libraries.

Smaller adjustment to the core might be necessary but should be avoided to make the plugin as standalone as possible.

## Available plugins
Below is a list of available plugins. More information about each plugin can be found in the plugin's own repository.
Expand All @@ -27,3 +33,9 @@ Search for Lantmäteriet Direct services via Origoserver API.

**[Multiselect plugin](https://github.com/origo-map/multiselect-plugin)**
Plugin to select features with different methods such as circle, polygon and buffer.

**[OIDC plugin](https://github.com/SigtunaGIS/oidc-plugin)**
A plugin for openid connect authorization with Origo.

**[Swiper plugin](https://github.com/SigtunaGIS/swiper-plugin)**
A plugin to compare two different views.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ More information about Origo plugins can be found in the [PLUGINS.md](https://gi
The project is licensed under the BSD 2-clause license. It is specified in the [license file](LICENSE.txt).

## Contact
If you want to get in contact with us, please join our chat on slack.com using this invitation: [origo-map.slack.com](https://join.slack.com/t/origo-map/shared_invite/enQtMjU0OTQ5MzcxMDQ3LTIwYzFiZjdmODJiYmQwZTUxNmIxZWM2NzljOWRiZTUyOWNlMWUxYzQ5ZGQwMTRkYzdkM2IyMGE5ZTQ4MTM4NDM).
If you want to get in contact with us and other users of Origo then please join our chat on discord using this invitation: [origo.map](https://discord.gg/NWRAkWAXQ3).

On [https://origo-map.github.io/archive/](https://origo-map.github.io/archive/) you can take part of our newsletter and read about our meetups.
Loading

0 comments on commit d38cdf8

Please sign in to comment.