Skip to content

Commit

Permalink
Merge branch 'main' into fixed-mermaid
Browse files Browse the repository at this point in the history
  • Loading branch information
MIA-Deltat1995 committed May 18, 2023
2 parents 2170b36 + c3b5a48 commit 8c99a2b
Show file tree
Hide file tree
Showing 27 changed files with 781 additions and 834 deletions.
6 changes: 5 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,11 @@
"FD_AAAA_Eyxxx",
"otel",
"otlp",
"xunit"
"xunit",
"Roboto",
"Neue",
"Noto",
"Segoe"
],
"dictionaries": [
"softwareTerms",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: Install
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
Expand All @@ -52,7 +52,7 @@ jobs:
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: Build site
env:
NODE_ENV: "production"
Expand Down
38 changes: 19 additions & 19 deletions docs/fast_data/configuration/cast_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ To define your own custom cast functions click on the *Create* button above the

| Name | Type | Required | Description |
|---------------|-------------|----------|-----------------------------------------------------------------------------------------------------|
| Name | String | True | Name of the cast function. No spaces or special characters |
| Returned Type | Select | True | The type of the value that has to be returned |
| Expression | JS Function | False | The javascript implementation of the cast function. It needs to be an exported function as default. |
| Name | String | ✓ | Name of the cast function. No spaces or special characters |
| Returned Type | Select | ✓ | The type of the value that has to be returned |
| Expression | JS Function | - | The javascript implementation of the cast function. It needs to be an exported function as default. |

### Let's see an example

Expand Down Expand Up @@ -62,35 +62,35 @@ By default, your project is provided with a set of default cast functions you ca

What happens when the Console changes the default cast function?

Let’s analyze each case:
Let’s analyze each case in the next sections:

### The implementation of a default cast Function is changed, but the name `castFunctionId` is unchanged
- ### The implementation of a default cast Function is changed, but the name `castFunctionId` is unchanged.

In this case, nothing will change in your configuration. You will continue to use the same implementation you had before.
In this case, nothing will change in your configuration. You will continue to use the same implementation you had before.

### A new default cast function is added
- ### A new default cast function is added

In this case, the new cast function will be added to your configuration.
In this case, the new cast function will be added to your configuration.

![Fast Data new default castFunction](../img/fastdata-new-default-castfunction.png)
![Fast Data new default castFunction](../img/fastdata-new-default-castfunction.png)

If a new default cast function is added on the Console, it will be available in the Cast Function section when you visit the Design area (even if it is not yet stored on your git provider in your `fastdata-config.json`). When you save the configuration it will be stored in the configuration file.
If a new default cast function is added on the Console, it will be available in the Cast Function section when you visit the Design area (even if it is not yet stored on your git provider in your `fastdata-config.json`). When you save the configuration it will be stored in the configuration file.

### A default cast function is deleted
- ### A default cast function is deleted

In this case, although a default cast function has been deleted from which Console generates, it will still be available in your configuration (e.g.: Console removes `defaultCastUnitTimestampToISOString`).
Let's see an example:
In this case, although a default cast function has been deleted from which Console generates, it will still be available in your configuration (e.g.: Console removes `defaultCastUnitTimestampToISOString`).
Let's see an example:

- Default cast functions as seen in *your* project
- Default cast functions as seen in *your* project

![Fast Data with deleted default cast function](../img/fastdata-delete-castfunction-all.png)
![Fast Data with deleted default cast function](../img/fastdata-delete-castfunction-all.png)

- Default cast functions generated for *new* projects
- Default cast functions generated for *new* projects

![Fast Data without deleted default castFunction](../img/fastdata-delete-castfunction-without-deleted.png)
![Fast Data without deleted default castFunction](../img/fastdata-delete-castfunction-without-deleted.png)

As you can see, in your project you are still able to use all the default cast functions, although `defaultCastUnitTimestampToISOString`, in our example, is no longer supported.
If you create a new project, this default cast function will not be provided instead.
As you can see, in your project you are still able to use all the default cast functions, although `defaultCastUnitTimestampToISOString`, in our example, is no longer supported.
If you create a new project, this default cast function will not be provided instead.

## Technical limitation

Expand Down
Loading

0 comments on commit 8c99a2b

Please sign in to comment.