Skip to content
Snippets Groups Projects
Unverified Commit 2d4edfb1 authored by Nick Fitzpatrick's avatar Nick Fitzpatrick Committed by GitHub
Browse files

Adding missing placeholders to various viz settings (#25649)

* Adding missing placeholders to various viz settings

* Removing translation from $

* PR Feedback
parent b2ed9abb
No related merge requests found
......@@ -376,6 +376,7 @@ const RuleEditor = ({
type="number"
value={rule.value}
onChange={value => onChange({ ...rule, value })}
placeholder="0"
/>
) : hasOperand ? (
<input
......@@ -383,6 +384,7 @@ const RuleEditor = ({
className={INPUT_CLASSNAME}
value={rule.value}
onChange={e => onChange({ ...rule, value: e.target.value })}
placeholder={t`Column value`}
/>
) : null}
<h3 className="mt3 mb1">{t`…turn its background this color:`}</h3>
......
......@@ -390,6 +390,9 @@ export const NUMBER_COLUMN_SETTINGS = {
title: t`Minimum number of decimal places`,
widget: "number",
variant: "form-field",
props: {
placeholder: "1",
},
},
scale: {
title: t`Multiply by a number`,
......@@ -403,11 +406,17 @@ export const NUMBER_COLUMN_SETTINGS = {
title: t`Add a prefix`,
widget: "input",
variant: "form-field",
props: {
placeholder: "$",
},
},
suffix: {
title: t`Add a suffix`,
widget: "input",
variant: "form-field",
props: {
placeholder: t`dollars`,
},
},
// Optimization: build a single NumberFormat object that is used by formatting.js
_numberFormatter: {
......
......@@ -177,6 +177,9 @@ export default Object.assign(ListViz, {
getHidden: (_: unknown, settings: VisualizationSettings) =>
settings["view_as"] !== "link" && settings["view_as"] !== "email_link",
readDependencies: ["view_as"],
props: {
placeholder: t`Link to {{bird_id}}`,
},
};
settings["link_url"] = {
......@@ -187,6 +190,9 @@ export default Object.assign(ListViz, {
getHidden: (_: unknown, settings: VisualizationSettings) =>
settings["view_as"] !== "link",
readDependencies: ["view_as"],
props: {
placeholder: t`http://toucan.example/{{bird_id}}`,
},
};
return settings;
......
......@@ -292,6 +292,9 @@ export default class Table extends Component {
getHidden: (_, settings) =>
settings["view_as"] !== "link" && settings["view_as"] !== "email_link",
readDependencies: ["view_as"],
props: {
placeholder: t`Link to {{bird_id}}`,
},
};
settings["link_url"] = {
......@@ -301,6 +304,9 @@ export default class Table extends Component {
default: null,
getHidden: (_, settings) => settings["view_as"] !== "link",
readDependencies: ["view_as"],
props: {
placeholder: t`http://toucan.example/{{bird_id}}`,
},
};
return settings;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment