Skip to content

Commit a880bc7

Browse files
committed
feat: Remove experimental flags
1 parent 175fb46 commit a880bc7

File tree

5 files changed

+8
-29
lines changed

5 files changed

+8
-29
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ You can also check the
1313

1414
- Features
1515
- Added option for hiding legend titles using a toggle switch
16+
- Bar charts, dashboard text blocks and Markdown inputs are not hidden behind
17+
flags anymore
1618
- Fixes
1719
- Color swatches inside the color picker dynamically adjust to the colors of
1820
the selected palette

app/components/markdown.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import rehypeRaw from "rehype-raw";
44
import rehypeSanitize from "rehype-sanitize";
55
import remarkGfm from "remark-gfm";
66

7-
import { useFlag } from "@/flags";
8-
97
const components: ComponentProps<typeof ReactMarkdown>["components"] = {
108
h1: ({ children, style, ...props }) => (
119
<h1 style={{ ...style, marginTop: 0 }} {...props}>
@@ -52,16 +50,12 @@ const components: ComponentProps<typeof ReactMarkdown>["components"] = {
5250
export const Markdown = (
5351
props: Omit<ComponentProps<typeof ReactMarkdown>, "components">
5452
) => {
55-
const enable = useFlag("enable-experimental-features");
56-
57-
return enable ? (
53+
return (
5854
<ReactMarkdown
5955
components={components}
6056
remarkPlugins={[remarkGfm]}
6157
rehypePlugins={[rehypeRaw, rehypeSanitize]}
6258
{...props}
6359
/>
64-
) : (
65-
<>{props.children}</>
6660
);
6761
};

app/configurator/components/chart-type-selector.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { ControlSectionSkeleton } from "@/configurator/components/chart-controls
1717
import { IconButton } from "@/configurator/components/icon-button";
1818
import { useAddOrEditChartType } from "@/configurator/config-form";
1919
import { ConfiguratorStateWithChartConfigs } from "@/configurator/configurator-state";
20-
import { useFlag } from "@/flags";
2120
import { useDataCubesComponentsQuery } from "@/graphql/hooks";
2221
import { useLocale } from "@/locales/use-locale";
2322

@@ -40,7 +39,6 @@ export const ChartTypeSelector = (props: ChartTypeSelectorProps) => {
4039
chartKey,
4140
...rest
4241
} = props;
43-
const enableBarChart = useFlag("enable-experimental-features");
4442
const locale = useLocale();
4543
const chartConfig = getChartConfig(state);
4644
const [{ data }] = useDataCubesComponentsQuery({
@@ -123,11 +121,7 @@ export const ChartTypeSelector = (props: ChartTypeSelectorProps) => {
123121
message: "Regular",
124122
})}
125123
currentChartType={chartType}
126-
chartTypes={
127-
enableBarChart
128-
? regularChartTypes
129-
: regularChartTypes.filter((chartType) => chartType !== "bar")
130-
}
124+
chartTypes={regularChartTypes}
131125
possibleChartTypesDict={possibleChartTypesDict}
132126
onClick={handleClick}
133127
testId="chart-type-selector-regular"

app/configurator/components/field.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ import {
9494
isMostRecentValue,
9595
VISUALIZE_MOST_RECENT_VALUE,
9696
} from "@/domain/most-recent-value";
97-
import { useFlag } from "@/flags";
9897
import { useTimeFormatLocale } from "@/formatters";
9998
import { TimeUnit } from "@/graphql/query-hooks";
10099
import { Locale } from "@/locales/locales";
@@ -686,17 +685,15 @@ export const MetaInputField = ({
686685
value?: string;
687686
}) => {
688687
const field = useMetaField({ type, metaKey, locale, value });
689-
const enableMarkdown = useFlag("enable-experimental-features");
690688

691689
switch (inputType) {
692690
case "text":
693691
return <Input label={label} {...field} />;
694692
case "markdown":
695-
if (enableMarkdown) {
696-
return <MarkdownInput label={label} {...field} />;
697-
} else {
698-
return <Input label={label} {...field} />;
699-
}
693+
return <MarkdownInput label={label} {...field} />;
694+
default:
695+
const _exhaustiveCheck: never = inputType;
696+
return _exhaustiveCheck;
700697
}
701698
};
702699

app/configurator/components/layout-configurator.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ import {
6262
TemporalDimension,
6363
TemporalEntityDimension,
6464
} from "@/domain/data";
65-
import { useFlag } from "@/flags";
6665
import { useTimeFormatLocale, useTimeFormatUnit } from "@/formatters";
6766
import { useConfigsCubeComponents } from "@/graphql/hooks";
6867
import { Icon } from "@/icons";
@@ -577,17 +576,10 @@ const LayoutBlocksConfigurator = () => {
577576
const { layout } = state;
578577
const { blocks } = layout;
579578
const classes = useLayoutBlocksStyles();
580-
581579
const onClick = useEvent((blockKey: string) => {
582580
dispatch({ type: "LAYOUT_ACTIVE_FIELD_CHANGED", value: blockKey });
583581
});
584582

585-
const enabled = useFlag("enable-experimental-features");
586-
587-
if (!enabled) {
588-
return null;
589-
}
590-
591583
return layout.type === "dashboard" ? (
592584
<ControlSection role="tablist" aria-labelledby="controls-blocks" collapse>
593585
<SubsectionTitle titleId="controls-blocks" gutterBottom={false}>

0 commit comments

Comments
 (0)