Skip to content

Commit 3a640e6

Browse files
committed
Merge branch 'main' of github.com:visualize-admin/visualization-tool into feat/new-footer
2 parents f85038a + 781852a commit 3a640e6

File tree

206 files changed

+12963
-5204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+12963
-5204
lines changed

.github/workflows/gitlab-mirror.yml

+17-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,26 @@ name: GitLab Mirror
22

33
on: [push, delete]
44

5+
# Ensures that only one mirror task will run at a time.
6+
concurrency:
7+
group: to_gitlab
8+
59
jobs:
610
to_gitlab:
711
runs-on: ubuntu-latest
8-
steps: # <-- must use actions/checkout@v4 before mirroring!
9-
- uses: actions/checkout@v4
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
1015
with:
1116
fetch-depth: 0
12-
- uses: pixta-dev/repository-mirroring-action@v1
17+
- name: Logging
18+
run: |
19+
git remote show origin
20+
git for-each-ref
21+
- name: Mirror to GitLab
22+
uses: wearerequired/git-mirror-action@v1
23+
env:
24+
SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
1325
with:
14-
target_repo_url: [email protected]:interactivethings/visualization-tool.git
15-
ssh_private_key: # <-- use 'secrets' to pass credential information.
16-
${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
26+
source-repo: "[email protected]:visualize-admin/visualization-tool.git"
27+
destination-repo: "[email protected]:interactivethings/visualization-tool.git"

CHANGELOG.md

+131-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,133 @@ You can also check the
1111

1212
# Unreleased
1313

14-
Nothing yet.
14+
- Features
15+
- It's now possible to preview charts by passing configurator state as a query
16+
parameter
17+
- It's now possible to add custom WMS layers coming from wms.geo.admin.ch to
18+
map charts
19+
- Statistics page was enhanced with `Charts` and `Cubes` sections, including
20+
some general improvements
21+
- Application now collect data on chart previews, not only views
22+
- Fixes
23+
- Limits that are connected to values that are filtered out do not render in
24+
the chart anymore
25+
26+
# [5.3.0] - 2025-02-25
27+
28+
- Features
29+
- It's now possible to add custom WMTS layers coming from wmts.geo.admin.ch to
30+
map charts
31+
- Limits can now be displayed in bar charts
32+
- Exact limit values are now displayed in legend
33+
- Fixes
34+
- Line chart dots are now based on data, eliminating misaligned dots
35+
- Added a fallback to color selector
36+
- Added dynamic descriptions for custom color palette types
37+
- Show line dot sizes are now translated
38+
39+
# [5.2.6] - 2025-02-18
40+
41+
- Features
42+
- Added a way to display limit values and targets coming from the data with
43+
compatible chart types
44+
- Fixes
45+
- Color picker's HEX code input now stays up-to-date with the selected color
46+
- Markdown links now open in a new tab
47+
- Publishing of a dashboard with text blocks doesn't crash the application in
48+
some rare cases anymore
49+
50+
# [5.2.5] - 2025-02-18
51+
52+
- Features
53+
- Added option for hiding legend titles using a toggle switch
54+
- Bar charts, dashboard text blocks and Markdown inputs are not hidden behind
55+
flags anymore
56+
- Added improved Iframe view for the use of ODS
57+
- Fixes
58+
- Added button translations for custom color palette update and create button
59+
- Color swatches inside the color picker dynamically adjust to the colors of
60+
the selected palette
61+
- All colors of a selected custom color palette are displayed when selected at
62+
all times regardless of the color type
63+
- Dashboard text block are now automatically resized also in published charts
64+
- Added (required) hint for palette titles and disabled the "add color button"
65+
if the color palette title is missing
66+
- Added dynamic translations for color contrast checking warnings
67+
- Added error displaying for title names that already exists on the custom
68+
color palette form inside the user profile only when adding palettes
69+
- Fixed button translations for custom color palette update and create button.
70+
- Fixed errors regarding switching form existing categorical palette to a
71+
diverging color palette
72+
- Improved filter section styling
73+
- Removed legend titles tooltip on the toggle switch
74+
- Fixed Map Symbol Layer custom color palette support for all palette types
75+
- Added color palettes to bar chart type
76+
- Maintenance
77+
- Added authentication method to e2e tests
78+
- Added authentication to Vercel previews for easier testing
79+
80+
# [5.2.4] - 2025-02-06
81+
82+
- Fixes
83+
- Duplicating chart in layout mode works correctly again
84+
85+
# [5.2.3] - 2025-02-05
86+
87+
- Fixes
88+
- Charts that use most recent date filter and interactive time range filter
89+
are initialized correctly now
90+
91+
# [5.2.2] - 2025-02-05
92+
93+
- Fixes
94+
- Weekly-based temporal dimensions now work correctly when used in dashboard
95+
filters
96+
- Fixed color changes when changing segment dimension
97+
- Fixed Filter selection made it so that color are showing again correctly for
98+
selected filters
99+
- Chart area doesn't overflow anymore when changing chart types in editing
100+
mode in Chrome
101+
- Tall dashboard layouts now correctly align chart elements between columns in
102+
published mode
103+
- Map legend items do not overlap anymore in PNG image downloads
104+
- PNG image download now correctly retains Y axis label colors in combo charts
105+
- NaN values are not displayed in map tooltip anymore
106+
- Fixed color shuffling & resetting to work again with custom color palettes
107+
- Dual-axis chart y axis titles do not overlap with other chart elements in
108+
specific cases anymore
109+
- Changing locale when editing a chart with temporal entity-based X axis now
110+
correctly updates the chart
111+
- Style
112+
- Improved vertical spacing between map legend items
113+
- Fixed the spacing between navigation and header in the /profile view
114+
- Regular charts now have consistent margin between the Y axis label and ticks
115+
- Combo legend items now wrap below each other when there's not enough space
116+
- Maintenance
117+
- Increased the number of charts pre-loaded to Varnish cache from 25 to 250
118+
119+
# [5.2.1] - 2025-01-29
120+
121+
- Features
122+
123+
- Created by visualize.admin.ch Link now navigates users to the corresponding
124+
Chart
125+
126+
- Fixes
127+
- Bar chart tooltip doesn't go off the screen anymore during scroll
128+
- Bar chart interactive switch on y axis
129+
- Preview via API using iframe (`/preview`) now ignores invalid messages sent
130+
from the parent window
131+
- Selected values are now correctly displayed in the filter panel
132+
- Chart tooltip now wraps in case of long text, instead of going off the
133+
screen
134+
- Pie chart tooltip is now positioned closer to the chart to prevent it from
135+
going off the screen in case of iframe embed
136+
- PNG image download now correctly retains interactive legend's colors
137+
- Charts based on a new cube are not hidden anymore in the layouting step
138+
- Scroll bars are not shown in the chart area when not needed
139+
- Scatterplot overlap with the y axis label
140+
- Input fields do not extend anymore when hitting Enter
15141

16142
# [5.2.0] - 2025-01-22
17143

@@ -27,6 +153,10 @@ Nothing yet.
27153
- Downloading images of bar charts now includes the whole chart, not just the
28154
visible part
29155
- Bar charts are now hidden behind a an enable-experimental-features flag
156+
- Users can now create custom color palettes in the editor and save it to
157+
their profile where they can update, add, delete and manage their colors
158+
palettes (available for categorical, sequential and diverging types, fully
159+
available for all chart except tables)
30160
- Fixes
31161
- Preview via API now works correctly for map charts
32162
- GraphQL debug panel now displays the queries correctly when in debug mode

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ yarn dev:ssl # If you are working with the login process
7171
> the app after login. You can either remove the trailing s in the URL after the
7272
> redirection, or use the `yarn dev:ssl` command to use HTTPs for the
7373
> development server. Also, make sure to set the `NEXTAUTH_URL` environment
74-
> variable to `https://localhost:3000` in your `.env.local` file.
74+
> variable to `https://localhost:3000` in your `.env.local` file. if you'd like
75+
> to use `yarn e2e:ui:ssl` or `yarn e2e:dev:ssl` in order to run tests locally
76+
> on pages that are protected by authentication please add `E2E_ENV=true` to
77+
> your environment
7578
7679
> 👉 In [Visual Studio Code](https://code.visualstudio.com/), you also can run
7780
> the **default build task** (CMD-SHIFT-B) to start the dev server, database

app/browser/dataset-preview.tsx

+45-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import { ParsedUrlQuery } from "querystring";
2+
13
import { Trans } from "@lingui/macro";
24
import { Box, Button, Paper, Theme, Typography } from "@mui/material";
35
import { makeStyles } from "@mui/styles";
46
import Head from "next/head";
57
import Link from "next/link";
8+
import { useRouter } from "next/router";
69
import React, { useEffect } from "react";
710

811
import { DataSetPreviewTable } from "@/browse/datatable";
@@ -17,8 +20,13 @@ import {
1720
useDataCubePreviewQuery,
1821
} from "@/graphql/query-hooks";
1922
import { DataCubePublicationStatus } from "@/graphql/resolver-types";
23+
import SvgIcLinkExternal from "@/icons/components/IcLinkExternal";
2024
import { useLocale } from "@/locales/use-locale";
2125

26+
export const isOdsIframe = (query: ParsedUrlQuery) => {
27+
return query["odsiframe"] === "true";
28+
};
29+
2230
const useStyles = makeStyles<Theme, { descriptionPresent: boolean }>(
2331
(theme) => ({
2432
root: {
@@ -108,6 +116,7 @@ export const DataSetPreview = ({
108116
}) => {
109117
const footnotesClasses = useFootnotesStyles({ useMarginTop: false });
110118
const locale = useLocale();
119+
const router = useRouter();
111120
const variables = {
112121
sourceType: dataSource.type,
113122
sourceUrl: dataSource.url,
@@ -165,23 +174,44 @@ export const DataSetPreview = ({
165174
onClick={(ev) => onCreateChartFromDataset?.(ev, dataSetIri)}
166175
className={classes.createChartButton}
167176
component="a"
177+
endIcon={isOdsIframe(router.query) ? <SvgIcLinkExternal /> : null}
178+
target={isOdsIframe(router.query) ? "_blank" : undefined}
168179
>
169-
<Trans id="browse.dataset.create-visualization">
170-
Create visualization from dataset
171-
</Trans>
180+
{!isOdsIframe(router.query) ? (
181+
<Trans id="browse.dataset.create-visualization">
182+
Create visualization from dataset
183+
</Trans>
184+
) : (
185+
<Trans id="browse.dataset.create-visualization-visualize">
186+
Create with visualize.admin
187+
</Trans>
188+
)}
172189
</Button>
173190
) : (
174191
<Link
175192
href={`/create/new?cube=${
176193
dataCubeMetadata.iri
177194
}&dataSource=${sourceToLabel(dataSource)}`}
178195
passHref
179-
legacyBehavior
196+
legacyBehavior={!isOdsIframe(router.query)}
197+
target={isOdsIframe(router.query) ? "_blank" : undefined}
180198
>
181-
<Button className={classes.createChartButton} component="a">
182-
<Trans id="browse.dataset.create-visualization">
183-
Create visualization from dataset
184-
</Trans>
199+
<Button
200+
endIcon={
201+
isOdsIframe(router.query) ? <SvgIcLinkExternal /> : null
202+
}
203+
className={classes.createChartButton}
204+
component="a"
205+
>
206+
{!isOdsIframe(router.query) ? (
207+
<Trans id="browse.dataset.create-visualization">
208+
Create visualization from dataset
209+
</Trans>
210+
) : (
211+
<Trans id="browse.dataset.create-visualization-visualize">
212+
Create with visualize.admin
213+
</Trans>
214+
)}
185215
</Button>
186216
</Link>
187217
)}
@@ -206,11 +236,13 @@ export const DataSetPreview = ({
206236
</Flex>
207237
<Flex className={classes.footnotesWrapper}>
208238
<Flex className={footnotesClasses.actions}>
209-
<DataDownloadMenu
210-
dataSource={dataSource}
211-
title={dataCubeMetadata.title}
212-
filters={variables.cubeFilter}
213-
/>
239+
{!isOdsIframe(router.query) && (
240+
<DataDownloadMenu
241+
dataSource={dataSource}
242+
title={dataCubeMetadata.title}
243+
filters={variables.cubeFilter}
244+
/>
245+
)}
214246
</Flex>
215247
<FirstTenRowsCaption />
216248
</Flex>

0 commit comments

Comments
 (0)