diff --git a/components/src/preact/aggregatedData/aggregate.stories.tsx b/components/src/preact/aggregatedData/aggregate.stories.tsx index 521351b7..720deea9 100644 --- a/components/src/preact/aggregatedData/aggregate.stories.tsx +++ b/components/src/preact/aggregatedData/aggregate.stories.tsx @@ -12,7 +12,6 @@ const meta: Meta = { fields: [{ control: 'object' }], width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, initialSortField: { control: 'text' }, initialSortDirection: { control: 'radio', options: ['ascending', 'descending'] }, pageSize: { control: 'object' }, @@ -55,7 +54,6 @@ export const Default: StoryObj = { }, width: '100%', height: '700px', - headline: 'Aggregate', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, diff --git a/components/src/preact/aggregatedData/aggregate.tsx b/components/src/preact/aggregatedData/aggregate.tsx index ece1e51d..4b805d9a 100644 --- a/components/src/preact/aggregatedData/aggregate.tsx +++ b/components/src/preact/aggregatedData/aggregate.tsx @@ -8,7 +8,6 @@ import { LapisUrlContext } from '../LapisUrlContext'; import { CsvDownloadButton } from '../components/csv-download-button'; import { ErrorBoundary } from '../components/error-boundary'; import { ErrorDisplay } from '../components/error-display'; -import Headline from '../components/headline'; import Info from '../components/info'; import { LoadingDisplay } from '../components/loading-display'; import { NoDataDisplay } from '../components/no-data-display'; @@ -22,7 +21,6 @@ export type InitialSort = { field: string; direction: 'ascending' | 'descending' export type AggregateProps = { width: string; height: string; - headline?: string; } & AggregateInnerProps; export interface AggregateInnerProps { @@ -34,20 +32,13 @@ export interface AggregateInnerProps { pageSize: boolean | number; } -export const Aggregate: FunctionComponent = ({ - width, - height, - headline = 'Mutations', - ...innerProps -}) => { +export const Aggregate: FunctionComponent = ({ width, height, ...innerProps }) => { const size = { height, width }; return ( - + - - - + ); diff --git a/components/src/preact/components/error-boundary.stories.tsx b/components/src/preact/components/error-boundary.stories.tsx index 6a4a6c2c..6f5eb672 100644 --- a/components/src/preact/components/error-boundary.stories.tsx +++ b/components/src/preact/components/error-boundary.stories.tsx @@ -10,11 +10,9 @@ const meta: Meta = { argTypes: { size: { control: 'object' }, defaultSize: { control: 'object' }, - headline: { control: 'text' }, }, args: { size: { height: '600px', width: '100%' }, - headline: 'Some headline', }, }; @@ -22,7 +20,7 @@ export default meta; export const ErrorBoundaryWithoutErrorStory: StoryObj = { render: (args) => ( - +
Some content
), @@ -30,13 +28,12 @@ export const ErrorBoundaryWithoutErrorStory: StoryObj = { const canvas = within(canvasElement); const content = canvas.getByText('Some content', { exact: false }); await waitFor(() => expect(content).toBeInTheDocument()); - await waitFor(() => expect(canvas.queryByText('Some headline')).not.toBeInTheDocument()); }, }; export const ErrorBoundaryWithErrorStory: StoryObj = { render: (args) => ( - + ), @@ -44,7 +41,6 @@ export const ErrorBoundaryWithErrorStory: StoryObj = { const canvas = within(canvasElement); const content = canvas.queryByText('Some content.', { exact: false }); await waitFor(() => expect(content).not.toBeInTheDocument()); - await waitFor(() => expect(canvas.getByText('Some headline')).toBeInTheDocument()); await waitFor(() => expect(canvas.getByText('Error')).toBeInTheDocument()); }, }; diff --git a/components/src/preact/components/error-boundary.tsx b/components/src/preact/components/error-boundary.tsx index 2cea682a..5558d53d 100644 --- a/components/src/preact/components/error-boundary.tsx +++ b/components/src/preact/components/error-boundary.tsx @@ -3,17 +3,14 @@ import { useErrorBoundary } from 'preact/hooks'; import { ErrorDisplay } from './error-display'; import { ResizeContainer, type Size } from './resize-container'; -import Headline from '../components/headline'; -export const ErrorBoundary: FunctionComponent<{ size: Size; headline?: string }> = ({ size, headline, children }) => { +export const ErrorBoundary: FunctionComponent<{ size: Size }> = ({ size, children }) => { const [internalError] = useErrorBoundary(); if (internalError) { return ( - - - + ); } diff --git a/components/src/preact/components/headline.stories.tsx b/components/src/preact/components/headline.stories.tsx deleted file mode 100644 index ea835f9a..00000000 --- a/components/src/preact/components/headline.stories.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { type Meta, type StoryObj } from '@storybook/preact'; -import { expect, within } from '@storybook/test'; - -import Headline, { type HeadlineProps } from './headline'; - -const meta: Meta = { - title: 'Component/Headline', - component: Headline, - parameters: { fetchMock: {} }, - argTypes: { - heading: { control: 'text' }, - }, -}; - -export default meta; - -export const HeadlineStory: StoryObj = { - render: (args) => ( - -
Some Content
-
- ), - args: { - heading: 'My Headline', - }, - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - - await expect(canvas.getByText('My Headline')).toBeInTheDocument(); - await expect(canvas.getByText('Some Content')).toBeInTheDocument(); - }, -}; - -export const NoHeadlineStory: StoryObj = { - render: (args) => ( - -
Some Content
-
- ), - args: {}, - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - - await expect(canvas.queryByText('My Headline')).not.toBeInTheDocument(); - await expect(canvas.getByText('Some Content')).toBeInTheDocument(); - }, -}; diff --git a/components/src/preact/components/headline.tsx b/components/src/preact/components/headline.tsx deleted file mode 100644 index 6c33b653..00000000 --- a/components/src/preact/components/headline.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { type FunctionComponent } from 'preact'; -import { useEffect, useRef, useState } from 'preact/hooks'; - -export interface HeadlineProps { - heading?: string; -} - -const Headline: FunctionComponent = ({ heading, children }) => { - if (!heading) { - return <>{children}; - } - - return {children}; -}; - -const ResizingHeadline: FunctionComponent = ({ heading, children }) => { - const ref = useRef(null); - - const [h1Height, setH1Height] = useState('2rem'); - - useEffect(() => { - if (ref.current) { - const h1Height = ref.current.getBoundingClientRect().height; - setH1Height(`${h1Height}px`); - } - }, []); - - return ( -
-

{heading}

-
{children}
-
- ); -}; - -export default Headline; diff --git a/components/src/preact/mutationComparison/mutation-comparison.stories.tsx b/components/src/preact/mutationComparison/mutation-comparison.stories.tsx index 1184ad8c..3c8807a7 100644 --- a/components/src/preact/mutationComparison/mutation-comparison.stories.tsx +++ b/components/src/preact/mutationComparison/mutation-comparison.stories.tsx @@ -29,7 +29,6 @@ const meta: Meta = { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, pageSize: { control: 'object' }, }, parameters: { @@ -85,7 +84,6 @@ const Template: StoryObj = { views={args.views} width={args.width} height={args.height} - headline={args.headline} pageSize={args.pageSize} /> @@ -115,7 +113,6 @@ export const TwoVariants: StoryObj = { views: ['table', 'venn'], width: '100%', height: '700px', - headline: 'Mutation comparison', pageSize: 10, }, }; diff --git a/components/src/preact/mutationComparison/mutation-comparison.tsx b/components/src/preact/mutationComparison/mutation-comparison.tsx index f0e27594..a319049f 100644 --- a/components/src/preact/mutationComparison/mutation-comparison.tsx +++ b/components/src/preact/mutationComparison/mutation-comparison.tsx @@ -11,7 +11,6 @@ import { type DisplayedSegment, SegmentSelector, useDisplayedSegments } from '.. import { CsvDownloadButton } from '../components/csv-download-button'; import { ErrorBoundary } from '../components/error-boundary'; import { ErrorDisplay } from '../components/error-display'; -import Headline from '../components/headline'; import Info from '../components/info'; import { LoadingDisplay } from '../components/loading-display'; import { type DisplayedMutationType, MutationTypeSelector } from '../components/mutation-type-selector'; @@ -27,7 +26,6 @@ export type View = 'table' | 'venn'; export interface MutationComparisonProps extends MutationComparisonInnerProps { width: string; height: string; - headline?: string; } export interface MutationComparisonInnerProps { @@ -37,20 +35,13 @@ export interface MutationComparisonInnerProps { pageSize: boolean | number; } -export const MutationComparison: FunctionComponent = ({ - width, - height, - headline = 'Mutation comparison', - ...innerProps -}) => { +export const MutationComparison: FunctionComponent = ({ width, height, ...innerProps }) => { const size = { height, width }; return ( - + - - - + ); diff --git a/components/src/preact/mutations/mutations.stories.tsx b/components/src/preact/mutations/mutations.stories.tsx index 751a5611..f3d84c78 100644 --- a/components/src/preact/mutations/mutations.stories.tsx +++ b/components/src/preact/mutations/mutations.stories.tsx @@ -24,7 +24,6 @@ const meta: Meta = { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, pageSize: { control: 'object' }, }, }; @@ -41,7 +40,6 @@ const Template = { views={args.views} width={args.width} height={args.height} - headline={args.headline} pageSize={args.pageSize} /> @@ -57,7 +55,6 @@ export const Default: StoryObj = { views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', - headline: 'Mutations', pageSize: 10, }, parameters: { diff --git a/components/src/preact/mutations/mutations.tsx b/components/src/preact/mutations/mutations.tsx index d8a8ff33..0e6da0e2 100644 --- a/components/src/preact/mutations/mutations.tsx +++ b/components/src/preact/mutations/mutations.tsx @@ -18,7 +18,6 @@ import { type DisplayedSegment, SegmentSelector, useDisplayedSegments } from '.. import { CsvDownloadButton } from '../components/csv-download-button'; import { ErrorBoundary } from '../components/error-boundary'; import { ErrorDisplay } from '../components/error-display'; -import Headline from '../components/headline'; import Info from '../components/info'; import { LoadingDisplay } from '../components/loading-display'; import { type DisplayedMutationType, MutationTypeSelector } from '../components/mutation-type-selector'; @@ -41,23 +40,15 @@ export interface MutationsInnerProps { export interface MutationsProps extends MutationsInnerProps { width: string; height: string; - headline?: string; } -export const Mutations: FunctionComponent = ({ - width, - height, - headline = 'Mutations', - ...innerProps -}) => { +export const Mutations: FunctionComponent = ({ width, height, ...innerProps }) => { const size = { height, width }; return ( - + - - - + ); diff --git a/components/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx b/components/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx index 42ca0395..677b391e 100644 --- a/components/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +++ b/components/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx @@ -35,7 +35,6 @@ const Template: StoryObj = { views={args.views} width={args.width} height={args.height} - headline={args.headline} granularity={args.granularity} smoothingWindow={args.smoothingWindow} pageSize={args.pageSize} @@ -50,7 +49,6 @@ const Template: StoryObj = { lapisDateField: 'date', width: '100%', height: '700px', - headline: 'Number of sequences over time', smoothingWindow: 0, granularity: 'month', pageSize: 10, diff --git a/components/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx b/components/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx index 61035868..74632b2e 100644 --- a/components/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +++ b/components/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx @@ -13,7 +13,6 @@ import { LapisUrlContext } from '../LapisUrlContext'; import { CsvDownloadButton } from '../components/csv-download-button'; import { ErrorBoundary } from '../components/error-boundary'; import { ErrorDisplay } from '../components/error-display'; -import Headline from '../components/headline'; import Info, { InfoHeadline1, InfoParagraph } from '../components/info'; import { LoadingDisplay } from '../components/loading-display'; import { NoDataDisplay } from '../components/no-data-display'; @@ -28,7 +27,6 @@ type NumberSequencesOverTimeView = 'bar' | 'line' | 'table'; export interface NumberSequencesOverTimeProps extends NumberSequencesOverTimeInnerProps { width: string; height: string; - headline: string; } interface NumberSequencesOverTimeInnerProps { @@ -40,15 +38,13 @@ interface NumberSequencesOverTimeInnerProps { pageSize: boolean | number; } -export const NumberSequencesOverTime = ({ width, height, headline, ...innerProps }: NumberSequencesOverTimeProps) => { +export const NumberSequencesOverTime = ({ width, height, ...innerProps }: NumberSequencesOverTimeProps) => { const size = { height, width }; return ( - + - - - + ); diff --git a/components/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx b/components/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx index 3cec518d..c234a4cb 100644 --- a/components/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +++ b/components/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx @@ -31,7 +31,6 @@ export default { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, pageSize: { control: 'object' }, yAxisMaxConfig: { control: 'object' }, }, @@ -49,7 +48,6 @@ const Template = { confidenceIntervalMethods={args.confidenceIntervalMethods} width={args.width} height={args.height} - headline={args.headline} lapisDateField={args.lapisDateField} pageSize={args.pageSize} yAxisMaxConfig={args.yAxisMaxConfig} @@ -72,7 +70,6 @@ export const TwoVariants = { confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', - headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, yAxisMaxConfig: { @@ -149,7 +146,6 @@ export const OneVariant = { confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', - headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, yAxisMaxConfig: { diff --git a/components/src/preact/prevalenceOverTime/prevalence-over-time.tsx b/components/src/preact/prevalenceOverTime/prevalence-over-time.tsx index 9525d1b0..ef04e959 100644 --- a/components/src/preact/prevalenceOverTime/prevalence-over-time.tsx +++ b/components/src/preact/prevalenceOverTime/prevalence-over-time.tsx @@ -13,7 +13,6 @@ import { ConfidenceIntervalSelector } from '../components/confidence-interval-se import { CsvDownloadButton } from '../components/csv-download-button'; import { ErrorBoundary } from '../components/error-boundary'; import { ErrorDisplay } from '../components/error-display'; -import Headline from '../components/headline'; import Info, { InfoHeadline1, InfoParagraph } from '../components/info'; import { LoadingDisplay } from '../components/loading-display'; import { NoDataDisplay } from '../components/no-data-display'; @@ -30,7 +29,6 @@ export type View = 'bar' | 'line' | 'bubble' | 'table'; export interface PrevalenceOverTimeProps extends PrevalenceOverTimeInnerProps { width: string; height: string; - headline?: string; } export interface PrevalenceOverTimeInnerProps { @@ -45,20 +43,13 @@ export interface PrevalenceOverTimeInnerProps { yAxisMaxConfig: YAxisMaxConfig; } -export const PrevalenceOverTime: FunctionComponent = ({ - width, - height, - headline = 'Prevalence over time', - ...innerProps -}) => { +export const PrevalenceOverTime: FunctionComponent = ({ width, height, ...innerProps }) => { const size = { height, width }; return ( - + - - - + ); diff --git a/components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx b/components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx index 29c4eb76..3f5fd028 100644 --- a/components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +++ b/components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx @@ -20,7 +20,6 @@ export default { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, yAxisMaxConfig: { control: 'object' }, }, }; @@ -35,7 +34,6 @@ export const Primary = { views={args.views} width={args.width} height={args.height} - headline={args.headline} lapisDateField={args.lapisDateField} yAxisMaxConfig={args.yAxisMaxConfig} /> @@ -48,7 +46,6 @@ export const Primary = { views: ['line'], width: '100%', height: '700px', - headline: 'Relative growth advantage', lapisDateField: 'date', yAxisMaxConfig: { linear: 1, diff --git a/components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx b/components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx index d9fd65c7..ab7eaf9a 100644 --- a/components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +++ b/components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx @@ -10,7 +10,6 @@ import { type LapisFilter } from '../../types'; import { LapisUrlContext } from '../LapisUrlContext'; import { ErrorBoundary } from '../components/error-boundary'; import { ErrorDisplay } from '../components/error-display'; -import Headline from '../components/headline'; import Info, { InfoHeadline1, InfoHeadline2, InfoLink, InfoParagraph } from '../components/info'; import { LoadingDisplay } from '../components/loading-display'; import { NoDataDisplay } from '../components/no-data-display'; @@ -26,7 +25,6 @@ export type View = 'line'; export interface RelativeGrowthAdvantageProps extends RelativeGrowthAdvantagePropsInner { width: string; height: string; - headline?: string; } export interface RelativeGrowthAdvantagePropsInner { @@ -41,17 +39,14 @@ export interface RelativeGrowthAdvantagePropsInner { export const RelativeGrowthAdvantage: FunctionComponent = ({ width, height, - headline = 'Relative growth advantage', ...innerProps }) => { const size = { height, width }; return ( - + - - - + ); diff --git a/components/src/web-components/visualization/gs-aggregate.stories.ts b/components/src/web-components/visualization/gs-aggregate.stories.ts index f55af266..feaef843 100644 --- a/components/src/web-components/visualization/gs-aggregate.stories.ts +++ b/components/src/web-components/visualization/gs-aggregate.stories.ts @@ -14,7 +14,6 @@ const codeExample = ` fields='["division", "host"]' filter='{"country": "USA"}' views='["table"]' - headline="Aggregate" width='100%' height='700px' initialSortField="count" @@ -33,7 +32,6 @@ const meta: Meta> = { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, pageSize: { control: 'object' }, initialSortField: { control: 'text' }, initialSortDirection: { @@ -80,7 +78,6 @@ export const Table: StoryObj> = { .views=${args.views} .width=${args.width} .height=${args.height} - .headline=${args.headline} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} @@ -95,7 +92,6 @@ export const Table: StoryObj> = { }, width: '100%', height: '700px', - headline: 'Aggregate', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, diff --git a/components/src/web-components/visualization/gs-aggregate.tsx b/components/src/web-components/visualization/gs-aggregate.tsx index 2c5db78f..865e11a9 100644 --- a/components/src/web-components/visualization/gs-aggregate.tsx +++ b/components/src/web-components/visualization/gs-aggregate.tsx @@ -61,12 +61,6 @@ export class AggregateComponent extends PreactLitAdapterWithGridJsStyles { @property({ type: String }) height: string = '700px'; - /** - * The headline of the component. Set to an empty string to hide the headline. - */ - @property({ type: String }) - headline: string = 'Aggregate'; - /** * The field by which the table is initially sorted. * Must be one of the fields specified in the fields property, 'count', or 'proportion'. @@ -95,7 +89,6 @@ export class AggregateComponent extends PreactLitAdapterWithGridJsStyles { filter={this.filter} width={this.width} height={this.height} - headline={this.headline} initialSortField={this.initialSortField} initialSortDirection={this.initialSortDirection} pageSize={this.pageSize} diff --git a/components/src/web-components/visualization/gs-mutation-comparison.stories.ts b/components/src/web-components/visualization/gs-mutation-comparison.stories.ts index dac494d5..76eeb4f6 100644 --- a/components/src/web-components/visualization/gs-mutation-comparison.stories.ts +++ b/components/src/web-components/visualization/gs-mutation-comparison.stories.ts @@ -16,7 +16,6 @@ const codeExample = String.raw` lapisFilters='[{ "displayName": "Data in Switzerland", "lapisFilter": { "country": "Switzerland" }}, { "displayName": "Data in Germany", "lapisFilter": { "country": "Germany" }}]' sequenceType="nucleotide" views='["table", "venn"]' - headline="Mutation comparison" width='100%' height='700px' pageSize="10" @@ -37,7 +36,6 @@ const meta: Meta> = { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, pageSize: { control: 'object' }, }, parameters: withComponentDocs({ @@ -61,7 +59,6 @@ const Template: StoryObj> = { .views=${args.views} .width=${args.width} .height=${args.height} - .headline=${args.headline} .pageSize=${args.pageSize} > @@ -93,7 +90,6 @@ export const Default: StoryObj> = { views: ['table', 'venn'], width: '100%', height: '700px', - headline: 'Mutation comparison', pageSize: 10, }, parameters: { diff --git a/components/src/web-components/visualization/gs-mutation-comparison.tsx b/components/src/web-components/visualization/gs-mutation-comparison.tsx index 4f1c5ff4..a2e538c4 100644 --- a/components/src/web-components/visualization/gs-mutation-comparison.tsx +++ b/components/src/web-components/visualization/gs-mutation-comparison.tsx @@ -75,12 +75,6 @@ export class MutationComparisonComponent extends PreactLitAdapterWithGridJsStyle @property({ type: String }) height: string = '700px'; - /** - * The headline of the component. Set to an empty string to hide the headline. - */ - @property({ type: String }) - headline: string = 'Mutation comparison'; - /** * The maximum number of rows to display in the table view. * Set to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10). @@ -96,7 +90,6 @@ export class MutationComparisonComponent extends PreactLitAdapterWithGridJsStyle views={this.views} width={this.width} height={this.height} - headline={this.headline} pageSize={this.pageSize} /> ); diff --git a/components/src/web-components/visualization/gs-mutations.stories.ts b/components/src/web-components/visualization/gs-mutations.stories.ts index e98992e1..03db9da3 100644 --- a/components/src/web-components/visualization/gs-mutations.stories.ts +++ b/components/src/web-components/visualization/gs-mutations.stories.ts @@ -16,7 +16,6 @@ const codeExample = String.raw` lapisFilter='{ "country": "Switzerland", "pangoLineage": "B.1.1.7", "dateTo": "2022-01-01" }' sequenceType="nucleotide" views='["grid", "table", "insertions"]' - headline="Mutations" width='100%' height='700px' pageSize="10" @@ -37,7 +36,6 @@ const meta: Meta> = { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, pageSize: { control: 'object' }, }, args: { @@ -46,7 +44,6 @@ const meta: Meta> = { views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', - headline: 'Mutations', pageSize: 10, }, parameters: withComponentDocs({ @@ -70,7 +67,6 @@ const Template: StoryObj> = { .views=${args.views} .width=${args.width} .height=${args.height} - .headline=${args.headline} .pageSize=${args.pageSize} > diff --git a/components/src/web-components/visualization/gs-mutations.tsx b/components/src/web-components/visualization/gs-mutations.tsx index df4fdba5..6c1f11ce 100644 --- a/components/src/web-components/visualization/gs-mutations.tsx +++ b/components/src/web-components/visualization/gs-mutations.tsx @@ -70,12 +70,6 @@ export class MutationsComponent extends PreactLitAdapterWithGridJsStyles { @property({ type: String }) height: string = '700px'; - /** - * The headline of the component. Set to an empty string to hide the headline. - */ - @property({ type: String }) - headline: string = 'Mutations'; - /** * The maximum number of rows to display in the table view. * Set to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10). @@ -91,7 +85,6 @@ export class MutationsComponent extends PreactLitAdapterWithGridJsStyles { views={this.views} width={this.width} height={this.height} - headline={this.headline} pageSize={this.pageSize} /> ); diff --git a/components/src/web-components/visualization/gs-number-sequences-over-time.stories.ts b/components/src/web-components/visualization/gs-number-sequences-over-time.stories.ts index f7108048..442d3461 100644 --- a/components/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +++ b/components/src/web-components/visualization/gs-number-sequences-over-time.stories.ts @@ -18,7 +18,6 @@ const codeExample = String.raw` lapisFilter='[{ "displayName": "EG", "lapisFilter": { "country": "USA", "pangoLineage": "EG*" }}, { "displayName": "JN.1", "lapisFilter": { "country": "USA", "pangoLineage": "JN.1*" }}]' lapisDateField="date" views='["bar", "line", "table"]' - headline="Number of sequences over time" width="100%" height="700px" granularity="month" @@ -61,7 +60,6 @@ const Template: StoryObj = { .views=${args.views} .width=${args.width} .height=${args.height} - .headline=${args.headline} .granularity=${args.granularity} .smoothingWindow=${args.smoothingWindow} .pageSize=${args.pageSize} @@ -76,7 +74,6 @@ const Template: StoryObj = { lapisDateField: 'date', width: '100%', height: '700px', - headline: 'Number of sequences over time', smoothingWindow: 0, granularity: 'month', pageSize: 10, diff --git a/components/src/web-components/visualization/gs-number-sequences-over-time.tsx b/components/src/web-components/visualization/gs-number-sequences-over-time.tsx index b513c2a4..0f658c17 100644 --- a/components/src/web-components/visualization/gs-number-sequences-over-time.tsx +++ b/components/src/web-components/visualization/gs-number-sequences-over-time.tsx @@ -61,12 +61,6 @@ export class NumberSequencesOverTimeComponent extends PreactLitAdapterWithGridJs @property({ type: Array }) views: ('bar' | 'line' | 'table')[] = ['bar', 'line', 'table']; - /** - * The headline of the component. Set to an empty string to hide the headline. - */ - @property({ type: String }) - headline: string = 'Number of sequences of time'; - /** * The width of the component. * @@ -114,7 +108,6 @@ export class NumberSequencesOverTimeComponent extends PreactLitAdapterWithGridJs lapisFilter={this.lapisFilter} lapisDateField={this.lapisDateField} views={this.views} - headline={this.headline} width={this.width} height={this.height} granularity={this.granularity} diff --git a/components/src/web-components/visualization/gs-prevalence-over-time.stories.ts b/components/src/web-components/visualization/gs-prevalence-over-time.stories.ts index 1bb8f8f4..916fd33d 100644 --- a/components/src/web-components/visualization/gs-prevalence-over-time.stories.ts +++ b/components/src/web-components/visualization/gs-prevalence-over-time.stories.ts @@ -23,7 +23,6 @@ const codeExample = String.raw` smoothingWindow="0" views='["bar", "line", "bubble", "table"]' confidenceIntervalMethods='["wilson"]' - headline="Prevalence over time" width="100%" height="700px" lapisDateField="date" @@ -53,7 +52,6 @@ const meta: Meta> = { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, pageSize: { control: 'object' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, @@ -82,7 +80,6 @@ const Template: StoryObj> = { .confidenceIntervalMethods=${args.confidenceIntervalMethods} .width=${args.width} .height=${args.height} - .headline=${args.headline} .lapisDateField=${args.lapisDateField} .pageSize=${args.pageSize} .yAxisMaxLinear=${args.yAxisMaxLinear} @@ -106,7 +103,6 @@ export const TwoDatasets: StoryObj> = confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', - headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, @@ -181,7 +177,6 @@ export const OneDataset: StoryObj> = confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', - headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, diff --git a/components/src/web-components/visualization/gs-prevalence-over-time.tsx b/components/src/web-components/visualization/gs-prevalence-over-time.tsx index 62e70961..23c17459 100644 --- a/components/src/web-components/visualization/gs-prevalence-over-time.tsx +++ b/components/src/web-components/visualization/gs-prevalence-over-time.tsx @@ -109,12 +109,6 @@ export class PrevalenceOverTimeComponent extends PreactLitAdapterWithGridJsStyle @property({ type: Array }) confidenceIntervalMethods: ('wilson' | 'none')[] = ['wilson']; - /** - * The headline of the component. Set to an empty string to hide the headline. - */ - @property({ type: String }) - headline: string = 'Prevalence over time'; - /** * The width of the component. * @@ -179,7 +173,6 @@ export class PrevalenceOverTimeComponent extends PreactLitAdapterWithGridJsStyle confidenceIntervalMethods={this.confidenceIntervalMethods} width={this.width} height={this.height} - headline={this.headline} lapisDateField={this.lapisDateField} pageSize={this.pageSize} yAxisMaxConfig={{ diff --git a/components/src/web-components/visualization/gs-relative-growth-advantage.stories.ts b/components/src/web-components/visualization/gs-relative-growth-advantage.stories.ts index add721da..c75a3306 100644 --- a/components/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +++ b/components/src/web-components/visualization/gs-relative-growth-advantage.stories.ts @@ -18,7 +18,6 @@ const codeExample = String.raw` views='["line"]' width='100%' height='700px' - headline="Relative growth advantage" lapisDateField="date" yAxisMaxLinear="1" yAxisMaxLogarithmic="limitTo1" @@ -37,7 +36,6 @@ const meta: Meta = { }, width: { control: 'text' }, height: { control: 'text' }, - headline: { control: 'text' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, @@ -63,7 +61,6 @@ const Template: StoryObj> = { .views=${args.views} .width=${args.width} .height=${args.height} - .headline=${args.headline} .lapisDateField=${args.lapisDateField} .yAxisMaxLinear=${args.yAxisMaxLinear} .yAxisMaxLogarithmic=${args.yAxisMaxLogarithmic} @@ -86,8 +83,6 @@ export const Default: StoryObj> views: ['line'], width: '100%', height: '700px', - headline: 'Relative growth advantage', - lapisDateField: 'date', yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, diff --git a/components/src/web-components/visualization/gs-relative-growth-advantage.tsx b/components/src/web-components/visualization/gs-relative-growth-advantage.tsx index 70e63037..834d740b 100644 --- a/components/src/web-components/visualization/gs-relative-growth-advantage.tsx +++ b/components/src/web-components/visualization/gs-relative-growth-advantage.tsx @@ -69,12 +69,6 @@ export class RelativeGrowthAdvantageComponent extends PreactLitAdapter { @property({ type: Array }) views: 'line'[] = ['line']; - /** - * The headline of the component. Set to an empty string to hide the headline. - */ - @property({ type: String }) - headline: string = 'Relative growth advantage'; - /** * The width of the component. * @@ -130,7 +124,6 @@ export class RelativeGrowthAdvantageComponent extends PreactLitAdapter { views={this.views} width={this.width} height={this.height} - headline={this.headline} lapisDateField={this.lapisDateField} yAxisMaxConfig={{ linear: this.yAxisMaxLinear, diff --git a/examples/React/src/App.tsx b/examples/React/src/App.tsx index 88548c86..a547031a 100644 --- a/examples/React/src/App.tsx +++ b/examples/React/src/App.tsx @@ -61,17 +61,21 @@ function App() { fields='["region", "country", "division", "location"]' > -
- -
+
+
+

Prevalence over time

+ +
+
+

Prevalence over time

+

Prevalence over time

+

Relative Growth Advantage

);