Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
.footer {
display: flex;
flex-direction: row;
padding: 10px;
padding: 5px;
padding-left: 20px;
gap: 20px;
align-items: stretch;
Expand Down
14 changes: 12 additions & 2 deletions src/components/GradientInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,26 @@ const GradientInput = (props: GradientInputProps): JSX.Element => {
<strong>{gradientStrengthData.displayName}</strong>
<small>{gradientStrengthData.description}</small>
</div>
<div className="input-content">
<div className="input-strength">
<Slider
id={gradientStrengthData.displayName}
min={gradientStrengthData.min}
max={gradientStrengthData.max}
onChange={(val) => handleStrengthChange(val)}
value={gradientStrengthData.uiValue}
step={0.01}
style={{ width: "100%" }}
style={{ marginBottom: 0 }}
/>
<div className="slider-labels">
<small className="slider-label-left">
<span>{gradientStrengthData.min}</span>
<span>weak</span>
</small>
<small className="slider-label-right" style={{ marginRight: "5px" }}>
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline styles should be avoided when possible. Consider moving this marginRight style to the CSS class definition for consistency with the rest of the codebase.

Copilot uses AI. Check for mistakes.
<span>{gradientStrengthData.max}</span>
<span>strong</span>
</small>
</div>
</div>
</div>
)}
Expand Down
5 changes: 5 additions & 0 deletions src/components/GradientInput/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.input-strength {
display: flex;
flex-direction: column;
width: 60%;
}
37 changes: 24 additions & 13 deletions src/components/InputSwitch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,32 +80,44 @@ const InputSwitch = (props: InputSwitchProps): JSX.Element => {
const step = dataType === "integer" ? 1 : 0.01;
let maxValue = (max ?? 1) * conversion;
maxValue = Number(maxValue.toFixed(4));
const minValue = min ?? 0;

return (
<div className="input-switch">
<div className="input-label">
<strong>{displayName}</strong>{" "}
<strong>
{displayName} {unit && <span>({unit})</span>}
</strong>
<small>{description}</small>
</div>
<div className="input-content">
<Slider
min={min}
max={maxValue}
step={step}
onChange={handleInputChange}
value={numericValue}
style={{ width: "60%" }}
/>
<div className="slider-input-wrapper">
<Slider
min={minValue}
max={maxValue}
step={step}
onChange={handleInputChange}
value={numericValue}
style={{ marginBottom: 0 }}
/>
<div className="slider-labels">
<small className="slider-label-left">
{minValue}
</small>
<small className="slider-label-right">
{maxValue}
</small>
</div>
</div>
<InputNumber
min={min}
min={minValue}
max={maxValue}
step={step}
style={{ margin: "0 6px" }}
style={{ margin: "0 0 10px 10px" }}
value={numericValue}
onChange={handleInputChange}
type="number"
/>
{unit && <span>{unit}</span>}
</div>
</div>
);
Expand All @@ -127,7 +139,6 @@ const InputSwitch = (props: InputSwitchProps): JSX.Element => {
options={selectOptions}
value={String(value)}
onChange={handleInputChange}
style={{ width: 200, marginLeft: 10 }}
/>
</div>
</div>
Expand Down
36 changes: 35 additions & 1 deletion src/components/InputSwitch/style.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.input-switch {
display: flex;
flex-direction: row;
align-items: center;
align-items: flex-start;
justify-content: center;
margin-top: 10px;
margin-bottom: 20px;
}

.input-label {
Expand All @@ -18,3 +19,36 @@
flex-direction: row;
width: 60%;
}

.slider-input-wrapper {
width: 70%;
display: flex;
flex-direction: column;
flex-grow: 1;
}

.slider-labels {
margin-left: 5px;
margin-right: 0;
margin-top: 4px;
line-height: 1.2;
}

.slider-label-left {
float: left;
text-align: left;
display: flex;
flex-direction: column;
}

.slider-label-right {
float: right;
text-align: right;
display: flex;
flex-direction: column;
}

.ant-select-outlined {
width: 100% !important;
margin: 0 !important;
}
2 changes: 1 addition & 1 deletion src/components/PackingInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const PackingInput = (props: PackingInputProps): JSX.Element => {
loadingText
) : (
<Tabs defaultActiveKey="1" className="recipe-content">
<Tabs.TabPane tab="Edit" key="1">
<Tabs.TabPane tab="Editable fields" key="1">
<RecipeForm onStartPacking={handleStartPacking} />
</Tabs.TabPane>
<Tabs.TabPane tab="Full Recipe" key="2">
Expand Down
1 change: 0 additions & 1 deletion src/components/RecipeForm/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.recipe-form {
display: flex;
padding: 10px;
flex-direction: column;
justify-content: space-between;
height: calc(
Expand Down