Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier tab width #7346

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"trailingComma": "none"
"trailingComma": "none",
"tabWidth": 2
}
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### next release (8.7.11)

- Explicitly set prettier tab-width
- [The next improvement]

#### 8.7.10 - 2024-11-29
Expand Down
10 changes: 5 additions & 5 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[TerriaJS](http://terria.io) is an open-source framework for web-based geospatial catalog explorers.

- [Getting Started](getting-started.md): Quick start guide to building your first TerriaJS application.
- [Customizing](customizing/README.md): Configure and tweak a TerriaJS application, including skinning and setting up the catalog.
- [Connecting to Data](connecting-to-data/README.md): Connect TerriaJS to your servers and data.
- [Deploying](deploying/README.md): Deploy a TerriaJS application in simple and advanced scenarios.
- [Contributing](contributing/README.md): Add new features to TerriaJS, be part of the TerriaJS development team, set up a development environment, write tests, and perform code reviews.
- [Getting Started](getting-started.md): Quick start guide to building your first TerriaJS application.
- [Customizing](customizing/README.md): Configure and tweak a TerriaJS application, including skinning and setting up the catalog.
- [Connecting to Data](connecting-to-data/README.md): Connect TerriaJS to your servers and data.
- [Deploying](deploying/README.md): Deploy a TerriaJS application in simple and advanced scenarios.
- [Contributing](contributing/README.md): Add new features to TerriaJS, be part of the TerriaJS development team, set up a development environment, write tests, and perform code reviews.

!!! note

Expand Down
10 changes: 5 additions & 5 deletions doc/connecting-to-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Before beginning, it is very important to understand [Cross-Origin Resource Shar

TerriaJS can interface with three broad types if data:

- [Catalog Group](../connecting-to-data/catalog-groups.md): A group (folder) of items. Different group types allow the contents to be manually specified or to be automatically determined by querying various types of server. TerriaJS can use many different types of servers to populate a group, including CKAN, CSW, WMS, and more. For example, if you define a catalog group that points at a Web Map Service (WMS) server, TerriaJS will query the WMS `GetCapabilities` when the group is opened and fill the group with all of the layers advertised by the WMS server.
- [Catalog Item](../connecting-to-data/catalog-items.md): Actual geospatial or chart data from a file or service, in various formats. TerriaJS supports WMS, KML, GeoJSON, ArcGIS MapServer, and many more files and services as catalog items.
- [Catalog Function](../connecting-to-data/catalog-functions.md): A parameterized service, such as a Web Processing Service (WPS). The user supplies the parameters and gets back some result.
- [Catalog Reference](../connecting-to-data/catalog-references.md): Resolves to a Catalog Group, Item or Function.
- [Catalog item search](item-search.md): A mechanism for searching inside catalog items.
- [Catalog Group](../connecting-to-data/catalog-groups.md): A group (folder) of items. Different group types allow the contents to be manually specified or to be automatically determined by querying various types of server. TerriaJS can use many different types of servers to populate a group, including CKAN, CSW, WMS, and more. For example, if you define a catalog group that points at a Web Map Service (WMS) server, TerriaJS will query the WMS `GetCapabilities` when the group is opened and fill the group with all of the layers advertised by the WMS server.
- [Catalog Item](../connecting-to-data/catalog-items.md): Actual geospatial or chart data from a file or service, in various formats. TerriaJS supports WMS, KML, GeoJSON, ArcGIS MapServer, and many more files and services as catalog items.
- [Catalog Function](../connecting-to-data/catalog-functions.md): A parameterized service, such as a Web Processing Service (WPS). The user supplies the parameters and gets back some result.
- [Catalog Reference](../connecting-to-data/catalog-references.md): Resolves to a Catalog Group, Item or Function.
- [Catalog item search](item-search.md): A mechanism for searching inside catalog items.
2 changes: 1 addition & 1 deletion doc/connecting-to-data/cross-origin-resource-sharing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Failing to do this may result in an error like this:

Next, you should add servers that _do_ support Cross-Origin Resource Sharing (CORS) to the `corsDomains` list in your [initialization file](../customizing/initialization-files.md). Servers in this list are contacted directly instead of going through the proxy... except:

- if an HTTPS web page is accessing an HTTP server (this way we avoid a mixed content warning from the browser).
- if an HTTPS web page is accessing an HTTP server (this way we avoid a mixed content warning from the browser).

If your server does _not_ support CORS, then you still need to add it to the `allowProxyFor` whitelist, but do not add it to the `corsDomains` list. It will then be proxied.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ The preferred way to format numbers is using the `formats` option, eg:

The supported format options are:

- `"maximumFractionDigits": X`: To reduce the number of decimal places to a maximum of X digits.
- `"minimumFractionDigits": X`: To increase the number of decimal places to a minimum of X digits.
- `"useGrouping": true`: To show thousands separators.
- `"style": "percent"`: To show 0.15 as 15%.
- `"maximumFractionDigits": X`: To reduce the number of decimal places to a maximum of X digits.
- `"minimumFractionDigits": X`: To increase the number of decimal places to a minimum of X digits.
- `"useGrouping": true`: To show thousands separators.
- `"style": "percent"`: To show 0.15 as 15%.

A second method is to use `terria.formatNumber` directly in the template. This accepts an initial JSON string describing the same options as above. To simplify the notation, the quotes around the keys are optional here.

Expand Down Expand Up @@ -128,9 +128,9 @@ As with number you can also use `terria.dateTimeformat` directly in the template

You can replace text by directly using `terria.partialByName` in the template and providing partials for matching and replacement. For example, with the following template and partials,

- If the value of `feature.data.layerId` matches a property name in the `partials`, it will be replaced by corresponding value.
- If there is no matching in the `partials`, the original value will be used.
- Any unsafe values in the `partials` will be stripped off when being rendered.
- If the value of `feature.data.layerId` matches a property name in the `partials`, it will be replaced by corresponding value.
- If there is no matching in the `partials`, the original value will be used.
- Any unsafe values in the `partials` will be stripped off when being rendered.

```json
"featureInfoTemplate": {
Expand All @@ -154,17 +154,17 @@ For features with time-varying table-based data structures (eg. CSV, SOS2, SDMX-

You can place this chart in your template using `{{terria.timeSeries.chart}}`. Alternatively, you can access the following component information:

- `{{terria.timeSeries.xName}}` - the x-column name
- `{{terria.timeSeries.yName}}` - the y-column name
- `{{terria.timeSeries.title}}`
- `{{terria.timeSeries.id}}`
- `{{terria.timeSeries.units}}` - the column units as a comma-separated string.
- `{{terria.timeSeries.data}}` - the data as a comma-separated string.
- `{{terria.timeSeries.xName}}` - the x-column name
- `{{terria.timeSeries.yName}}` - the y-column name
- `{{terria.timeSeries.title}}`
- `{{terria.timeSeries.id}}`
- `{{terria.timeSeries.units}}` - the column units as a comma-separated string.
- `{{terria.timeSeries.data}}` - the data as a comma-separated string.

Please note:

- If any of the component information above contains double-quotes, double quotes will be removed before TerriaJS processes the template further.
- If any of the component information above is used as part of tag attributes, it must be surrounded by double-quotes. e.g. `<chart y-column="{{terria.timeSeries.yName}}"></chart>`
- If any of the component information above contains double-quotes, double quotes will be removed before TerriaJS processes the template further.
- If any of the component information above is used as part of tag attributes, it must be surrounded by double-quotes. e.g. `<chart y-column="{{terria.timeSeries.yName}}"></chart>`

So you could reconstruct the chart manually as:

Expand Down
62 changes: 31 additions & 31 deletions doc/connecting-to-data/customizing-data-appearance/imagery-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ Here's an example json file which places some sample WMS items in an open group

```json
{
"catalog": [
"catalog": [
{
"name": "WMS example",
"type": "group",
"isPromoted": true,
"isOpen": true,
"items": [
{
"name": "WMS example",
"type": "group",
"isPromoted": true,
"isOpen": true,
"items": [
{
"name": "Solar Satellite DNI & GHI with datetime picker",
"layers": "Solar_Satellite_DNI_2014",
"url": "http://gis.aremi.nationalmap.gov.au/bom/wms",
"type": "wms",
"maxRefreshIntervals": 9000,
"showDatetimePicker": true,
"useOwnClock": true,
"featureInfoTemplate": {
"name": "{{GRAY_INDEX}} W/m2"
}
},
{
"name": "Solar Satellite DNI & GHI with initialTimeSource",
"layers": "Solar_Satellite_DNI_2014",
"url": "http://gis.aremi.nationalmap.gov.au/bom/wms",
"type": "wms",
"maxRefreshIntervals": 9000,
"initialTimeSource": "2014-06-30T22:00:00Z",
"featureInfoTemplate": {
"name": "{{GRAY_INDEX}} W/m2"
}
}
]
"name": "Solar Satellite DNI & GHI with datetime picker",
"layers": "Solar_Satellite_DNI_2014",
"url": "http://gis.aremi.nationalmap.gov.au/bom/wms",
"type": "wms",
"maxRefreshIntervals": 9000,
"showDatetimePicker": true,
"useOwnClock": true,
"featureInfoTemplate": {
"name": "{{GRAY_INDEX}} W/m2"
}
},
{
"name": "Solar Satellite DNI & GHI with initialTimeSource",
"layers": "Solar_Satellite_DNI_2014",
"url": "http://gis.aremi.nationalmap.gov.au/bom/wms",
"type": "wms",
"maxRefreshIntervals": 9000,
"initialTimeSource": "2014-06-30T22:00:00Z",
"featureInfoTemplate": {
"name": "{{GRAY_INDEX}} W/m2"
}
}
]
]
}
]
}
```

Expand Down
118 changes: 59 additions & 59 deletions doc/connecting-to-data/customizing-data-appearance/model-dimensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ For example - this renders a new drop down called "Color" that changes the `colo

```json
{
"type": "csv",
"url": "test/NSW_LGA_NEXIS_201212.csv",
"name": "NSW LGA NEXIS 2012",
"modelDimensions": [
"type": "csv",
"url": "test/NSW_LGA_NEXIS_201212.csv",
"name": "NSW LGA NEXIS 2012",
"modelDimensions": [
{
"id": "cols",
"name": "Color",
"selectedId": "Red",
"options": [
{
"id": "cols",
"name": "Color",
"selectedId": "Red",
"options": [
{
"id": "Red",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "Reds"
}
}
}
},
{
"id": "Blue",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "Blues"
}
}
}
}
]
"id": "Red",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "Reds"
}
}
}
},
{
"id": "Blue",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "Blues"
}
}
}
}
]
]
}
]
}
```

Expand All @@ -51,37 +51,37 @@ Model dimensions also supports the use of [Mustache templates](https://mustache.

```json
{
"type": "csv",
"url": "test/NSW_LGA_NEXIS_201212.csv",
"name": "NSW LGA NEXIS 2012",
"modelDimensions": [
"type": "csv",
"url": "test/NSW_LGA_NEXIS_201212.csv",
"name": "NSW LGA NEXIS 2012",
"modelDimensions": [
{
"id": "Cols",
"selectedId": "Red",
"options": [
{
"id": "Cols",
"selectedId": "Red",
"options": [
{
"id": "Red",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "{{modelDimensions.0.selectedId}}"
}
}
}
},
{
"id": "Blue",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "{{modelDimensions.0.selectedId}}"
}
}
}
}
]
"id": "Red",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "{{modelDimensions.0.selectedId}}"
}
}
}
},
{
"id": "Blue",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "{{modelDimensions.0.selectedId}}"
}
}
}
}
]
]
}
]
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and can be included there too.

This section explains how you can use such a file to improve the look of your data:

- [Customizing the Appearance of Tabular Data](./tabular-data.md)
- [Customizing the Appearance of Imagery Data](./imagery-data.md)
- [Customizing the Feature Info Template](./feature-info-template.md)
- [Using Model Dimensions to customise the Workbench](./model-dimensions.md)
- [Customizing the Appearance of Tabular Data](./tabular-data.md)
- [Customizing the Appearance of Imagery Data](./imagery-data.md)
- [Customizing the Feature Info Template](./feature-info-template.md)
- [Using Model Dimensions to customise the Workbench](./model-dimensions.md)
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ Please note this documentation is still being developed, and does not cover ever
that is possible.
The definitive source of what you can do with `tableStyle` is this pair:

- [TableStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableStyle.js)
- [TableColumnStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableColumnStyle.js)
- [TableStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableStyle.js)
- [TableColumnStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableColumnStyle.js)

## Referencing your data

Expand Down Expand Up @@ -132,9 +132,9 @@ If you want to change the appearance of individual columns, use `tableStyle`'s `

This example shows a few possibilities:

- A column called "original name" is displayed with the name "better name".
- The legend for that column is shown without any decimal places (`maximumFractionDigits` 0).
- A column in the original data called "bad" is hidden from the workbench.
- A column called "original name" is displayed with the name "better name".
- The legend for that column is shown without any decimal places (`maximumFractionDigits` 0).
- A column in the original data called "bad" is hidden from the workbench.

The full list of options is in [TableColumnStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableColumnStyle.js).

Expand Down
6 changes: 3 additions & 3 deletions doc/connecting-to-data/item-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TerriaJS provides an `ItemSearchProvider` API for defining custom search provide

## Available search providers

- [Indexed item search provider](item-search/indexed-item-search.md)
- [Indexed item search provider](item-search/indexed-item-search.md)

## Configuring the catalog item for searching

Expand Down Expand Up @@ -50,8 +50,8 @@ The search tool can be opened from the expand menu for the catalog item in the w

## Future implementations

- GeoJSON search provider, for searching inside a geojson catalog item using its properties.
- WPS search provider, for searching any item using a remote server.
- GeoJSON search provider, for searching inside a geojson catalog item using its properties.
- WPS search provider, for searching any item using a remote server.

## Implementing your own search provider

Expand Down
Loading
Loading