Skip to content

Commit

Permalink
Merged upstream master branch to resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sronveaux committed Mar 21, 2023
2 parents fc2936a + 7ae7747 commit f9b0828
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Wegue (WebGIS with OpenLayers and Vue.js)
Template and re-usable components for webmapping applications with OpenLayers and Vue.js

![GitHub Workflow Status](https://img.shields.io/github/workflow/status/wegue-oss/wegue/ci-tests?label=Tests)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/wegue-oss/wegue/ci-tests.yml?branch=master)
[![Known Vulnerabilities](https://snyk.io/test/github/wegue-oss/wegue/badge.svg)](https://snyk.io/test/github/wegue-oss/wegue)
[![license: 2-Clause BSD](https://img.shields.io/badge/license-2--Clause%20BSD-brightgreen.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![Join the chat at https://gitter.im/wegue/community](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/wegue/community)
Expand Down
9 changes: 7 additions & 2 deletions app-starter/components/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ export default {
WguEventBus.$on('sidebar-scroll', comp => {
this.scrollTo(comp);
});
WguEventBus.$on('sidebar-toggle', () => {
this.sidebarOpen = !this.sidebarOpen;
WguEventBus.$on('sidebar-toggle', (open) => {
// toggle or force a opening state of the sidebar
if (typeof open === 'boolean') {
this.sidebarOpen = open;
} else {
this.sidebarOpen = !this.sidebarOpen;
}
});
},
methods: {
Expand Down
3 changes: 2 additions & 1 deletion app-starter/static/app-conf-sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@
"win": "sidebar",
"icon": "layers",
"visible": true,
"minimizable": true
"minimizable": true,
"closable": false
},
"wgu-measuretool": {
"target": "menu",
Expand Down
5 changes: 3 additions & 2 deletions app-starter/static/app-conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"format": "MVT",
"attribution": "Kindly provided by @ahocevar",
"visible": false,
"opacityControl": true,
"opacityControl": true,
"style": {
"strokeColor": "gray",
"strokeWidth": 1,
Expand Down Expand Up @@ -287,7 +287,8 @@
"sample-module": {
"target": "toolbar",
"win": "floating",
"icon": "star"
"icon": "star",
"closable": false
}
}
}
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Wegue <small>1.1.0</small>
# Wegue <small>1.2.0</small>

> Simple Webmapping with OpenLayers and Vue.js
Expand Down
1 change: 1 addition & 0 deletions docs/module-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The following properties can be applied to all module types:
| **win** | Value to mark if the module has a window as sub component and where to show the module UI elements. Valid options are `floating` and `sidebar`. If the value is omitted, then the module is not associated with a window. | `"win": "floating"` |
| icon | Provide a customized icon for the module. | `"icon": "info"` |
| minimizable | Indicates whether the module window can be minimized. Only applies if a module window is present as indicated by the `win` parameter. | `"minimizable": true` |
| closable | Indicates whether the module window can be closed by a "X" icon in the window's header bar. Only applies if a module window is present as indicated by the `win` parameter. | `"closable": false` |
| backgroundImage | Optional background image for the window header. Only applies if a module window is present as indicated by the `win` parameter. | `"backgroundImage": "static/icon/myImage.png"}` |
| visible | Configures the initial visiblity of a module window on application start. Only applies if a module window is present as indicated by the `win` parameter. | `"visible": true` |

Expand Down
8 changes: 4 additions & 4 deletions docs/workshop.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Workshop

This workshop uses Wegue version [`v1.1.0`](https://github.com/wegue-oss/wegue/releases/tag/v1.1.0) but works for higher versions with no or little adaptation.
This workshop uses Wegue version [`v1.2.0`](https://github.com/wegue-oss/wegue/releases/tag/v1.2.0) but works for higher versions with no or little adaptation.

## Prerequisites

Expand All @@ -12,7 +12,7 @@ You should have basic knowledge of using a commandline and a basic understanding

For this workshop or to quickly try something, you can use the online-environment Gitpod. For this you need a browser and you need to register at Gitpod. That can be done with an existing GitHub account.

To get started navigate to [**gitpod.io/#https://github.com/wegue-oss/wegue/tree/v1.1.0**](https://gitpod.io/#https://github.com/wegue-oss/wegue/tree/v1.1.0). Ideally, you will see a terminal running commands to set up Wegue. After some moments (~1 minute) you should see a running Wegue instance in one of the editor's panes like in this screenshot.
To get started navigate to [**gitpod.io/#https://github.com/wegue-oss/wegue/tree/v1.2.0**](https://gitpod.io/#https://github.com/wegue-oss/wegue/tree/v1.2.0). Ideally, you will see a terminal running commands to set up Wegue. After some moments (~1 minute) you should see a running Wegue instance in one of the editor's panes like in this screenshot.

![Wegue running in Gitpod](_media/workshop/gitpod-wegue.png)

Expand All @@ -37,10 +37,10 @@ We need to download Wegue. This can be done in two ways:
cd wegue
# checkout the version of the Workshop
git checkout v1.1.0
git checkout v1.2.0
```
- Alternatively download a zip-archive of Wegue via GitHub using this [link](https://github.com/wegue-oss/wegue/archive/refs/tags/v1.1.0.zip) and extract it.
- Alternatively download a zip-archive of Wegue via GitHub using this [link](https://github.com/wegue-oss/wegue/archive/refs/tags/v1.2.0.zip) and extract it.
## Start Wegue
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wegue",
"version": "1.1.0",
"version": "1.2.0",
"description": "Template project for a WebGIS client with OpenLayers and Vue.js",
"author": "Christian Mayer <[email protected]>",
"contributors": [
Expand Down
3 changes: 2 additions & 1 deletion src/components/modulecore/ModuleCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<v-icon v-if="minimized">web_asset</v-icon>
<v-icon v-else>remove</v-icon>
</v-btn>
<v-btn color="onprimary" icon small class="mr-0"
<v-btn color="onprimary" v-if="closable" icon small class="mr-0"
@click="toggleUi">
<v-icon>close</v-icon>
</v-btn>
Expand Down Expand Up @@ -51,6 +51,7 @@ export default {
icon: { type: String, required: true },
win: { type: String, required: false, default: 'floating' },
minimizable: { type: Boolean, required: false, default: false },
closable: { type: Boolean, required: false, default: true },
backgroundImage: { type: String, required: false, default: undefined },
visible: { type: Boolean, required: false, default: false },
// Positioning / sizing properties will be ignored for sidebar cards.
Expand Down
36 changes: 36 additions & 0 deletions tests/unit/specs/components/AppSidebar.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import AppSidebar from 'APP/components/AppSidebar';
import { WguEventBus } from '@/WguEventBus';
import { shallowMount } from '@vue/test-utils';

describe('AppSidebar.vue', () => {
describe('data', () => {
let comp;
let vm;
beforeEach(() => {
comp = shallowMount(AppSidebar);
vm = comp.vm;
});

it('has correct default data', () => {
expect(vm.sidebarOpen).to.equal(true);
});
});

describe('events', () => {
let comp;
let vm;
beforeEach(() => {
comp = shallowMount(AppSidebar);
vm = comp.vm;
});

it('event "sidebar-toggle" forces correct open state', () => {
// force closing sidebar by adding 'false' parameter
WguEventBus.$emit('sidebar-toggle', false);
expect(vm.sidebarOpen).to.equal(false);
// toggle sidebar open state by skipping parameter
WguEventBus.$emit('sidebar-toggle');
expect(vm.sidebarOpen).to.equal(true);
});
});
});

0 comments on commit f9b0828

Please sign in to comment.