mirror of
https://github.com/xodio/xod.git
synced 2026-03-25 01:56:54 +01:00
Merge pull request #1522 from xodio/fix-1503-labels-for-variadic-pins-in-inspector
Add missing labels for variadic pins in Inspector
This commit is contained in:
@@ -28,7 +28,6 @@ const getPinWidgetProps = R.applySpec({
|
||||
keyName: XP.getPinKey,
|
||||
type: XP.getPinType,
|
||||
label: XP.getPinLabel,
|
||||
normalizedLabel: R.prop('normalizedLabel'),
|
||||
value: R.prop('value'),
|
||||
direction: XP.getPinDirection,
|
||||
isConnected: R.prop('isConnected'),
|
||||
@@ -59,6 +58,7 @@ const createPinWidgetsConfig = R.compose(
|
||||
R.apply(R.concat),
|
||||
R.map(R.sort(R.ascend(XP.getPinOrder))),
|
||||
R.juxt([R.filter(XP.isInputPin), R.filter(XP.isOutputPin)]),
|
||||
XP.normalizeEmptyPinLabels,
|
||||
R.values,
|
||||
R.prop('pins')
|
||||
);
|
||||
|
||||
@@ -10,7 +10,6 @@ function BoolWidget(props) {
|
||||
<PinWidget
|
||||
elementId={props.elementId}
|
||||
label={props.label}
|
||||
normalizedLabel={props.normalizedLabel}
|
||||
dataType={props.dataType}
|
||||
isConnected={props.isConnected}
|
||||
isInvalid={props.isInvalid}
|
||||
@@ -37,7 +36,6 @@ function BoolWidget(props) {
|
||||
BoolWidget.propTypes = {
|
||||
elementId: PropTypes.string.isRequired,
|
||||
label: PropTypes.string,
|
||||
normalizedLabel: PropTypes.string.isRequired,
|
||||
dataType: PropTypes.string,
|
||||
isConnected: PropTypes.bool,
|
||||
isInvalid: PropTypes.bool,
|
||||
|
||||
@@ -7,7 +7,6 @@ const DisabledInputWidget = props => (
|
||||
<PinWidget
|
||||
elementId={props.elementId}
|
||||
label={props.label}
|
||||
normalizedLabel={props.normalizedLabel}
|
||||
dataType={props.dataType}
|
||||
isConnected={props.isConnected}
|
||||
isLastVariadicGroup={props.isLastVariadicGroup}
|
||||
@@ -18,7 +17,6 @@ const DisabledInputWidget = props => (
|
||||
|
||||
DisabledInputWidget.propTypes = {
|
||||
elementId: PropTypes.string.isRequired,
|
||||
normalizedLabel: PropTypes.string.isRequired,
|
||||
label: PropTypes.string,
|
||||
dataType: PropTypes.string,
|
||||
isConnected: PropTypes.bool,
|
||||
|
||||
@@ -7,7 +7,6 @@ const GenericPinWidget = props => (
|
||||
<PinWidget
|
||||
elementId={props.elementId}
|
||||
label={props.label}
|
||||
normalizedLabel={props.normalizedLabel}
|
||||
dataType={props.dataType}
|
||||
isConnected={props.isConnected}
|
||||
isInvalid={props.isInvalid}
|
||||
@@ -31,7 +30,6 @@ const GenericPinWidget = props => (
|
||||
|
||||
GenericPinWidget.propTypes = {
|
||||
elementId: PropTypes.string.isRequired,
|
||||
normalizedLabel: PropTypes.string.isRequired,
|
||||
label: PropTypes.string,
|
||||
dataType: PropTypes.string,
|
||||
isConnected: PropTypes.bool,
|
||||
|
||||
@@ -11,7 +11,6 @@ const NumberWidget = props => {
|
||||
<PinWidget
|
||||
elementId={props.elementId}
|
||||
label={props.label}
|
||||
normalizedLabel={props.normalizedLabel}
|
||||
dataType={props.dataType}
|
||||
isConnected={props.isConnected}
|
||||
isInvalid={props.isInvalid}
|
||||
@@ -35,7 +34,6 @@ const NumberWidget = props => {
|
||||
|
||||
NumberWidget.propTypes = {
|
||||
elementId: PropTypes.string.isRequired,
|
||||
normalizedLabel: PropTypes.string.isRequired,
|
||||
label: PropTypes.string,
|
||||
dataType: PropTypes.string,
|
||||
isConnected: PropTypes.bool,
|
||||
|
||||
@@ -50,7 +50,7 @@ function PinWidget(props) {
|
||||
props.children
|
||||
);
|
||||
return (
|
||||
<div className="Widget PinWidget" data-pinlabel={props.normalizedLabel}>
|
||||
<div className="Widget PinWidget" data-pinlabel={props.label}>
|
||||
{input}
|
||||
<PinIcon
|
||||
id={props.elementId}
|
||||
@@ -60,14 +60,14 @@ function PinWidget(props) {
|
||||
deducedType={props.deducedType}
|
||||
isLastVariadicGroup={props.isLastVariadicGroup}
|
||||
/>
|
||||
<label htmlFor={props.elementId}>{props.normalizedLabel}</label>
|
||||
<label htmlFor={props.elementId}>{props.label}</label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
PinWidget.propTypes = {
|
||||
elementId: PropTypes.string.isRequired,
|
||||
normalizedLabel: PropTypes.string.isRequired,
|
||||
label: PropTypes.string.isRequired,
|
||||
dataType: PropTypes.string,
|
||||
isConnected: PropTypes.bool,
|
||||
isInvalid: PropTypes.bool,
|
||||
|
||||
@@ -14,7 +14,6 @@ const PulseWidget = props => {
|
||||
<PinWidget
|
||||
elementId={props.elementId}
|
||||
label={props.label}
|
||||
normalizedLabel={props.normalizedLabel}
|
||||
dataType={props.dataType}
|
||||
isConnected={props.isConnected}
|
||||
isInvalid={props.isInvalid}
|
||||
@@ -43,7 +42,6 @@ const PulseWidget = props => {
|
||||
|
||||
PulseWidget.propTypes = {
|
||||
elementId: PropTypes.string.isRequired,
|
||||
normalizedLabel: PropTypes.string.isRequired,
|
||||
label: PropTypes.string,
|
||||
dataType: PropTypes.string,
|
||||
isConnected: PropTypes.bool,
|
||||
|
||||
@@ -23,7 +23,6 @@ const StringWidget = withState('focused', 'setFocus', false)(props => {
|
||||
<PinWidget
|
||||
elementId={props.elementId}
|
||||
label={props.label}
|
||||
normalizedLabel={props.normalizedLabel}
|
||||
dataType={props.dataType}
|
||||
isConnected={props.isConnected}
|
||||
isInvalid={props.isInvalid}
|
||||
@@ -51,7 +50,6 @@ const StringWidget = withState('focused', 'setFocus', false)(props => {
|
||||
|
||||
StringWidget.propTypes = {
|
||||
elementId: PropTypes.string.isRequired,
|
||||
normalizedLabel: PropTypes.string.isRequired,
|
||||
label: PropTypes.string,
|
||||
dataType: PropTypes.string,
|
||||
isConnected: PropTypes.bool,
|
||||
|
||||
Reference in New Issue
Block a user