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
1 change: 1 addition & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
--recipe-select-height: 52px;
--tab-height: 62px;
--footer-height: 64px;
--description-height: 102px;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm working on a dynamic fix for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

awesome - Thao had some comments in slack in cellpack-site about improvements for the scrollable area, I'm just not a strong enough front end developer to knock that out in time today without introducing other bugs, so I did this bandaid fix for now

}

.app-container {
Expand Down
5 changes: 1 addition & 4 deletions src/components/GradientInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface GradientInputProps {
};

const GradientInput = (props: GradientInputProps): JSX.Element => {
const { displayName, description, gradientOptions, defaultValue } = props;
const { displayName, gradientOptions, defaultValue } = props;
const selectedRecipeId = useSelectedRecipeId();
const editRecipe = useEditRecipe();
const getCurrentValue = useGetCurrentValue();
Expand Down Expand Up @@ -55,7 +55,6 @@ const GradientInput = (props: GradientInputProps): JSX.Element => {
<div className="input-switch">
<div className="input-label">
<strong>{displayName}</strong>
<small>{description}</small>
</div>
<div className="input-content">
<Select
Expand Down Expand Up @@ -85,11 +84,9 @@ const GradientInput = (props: GradientInputProps): JSX.Element => {
<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" }}>
<span>{gradientStrengthData.max}</span>
<span>strong</span>
</small>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/RecipeForm/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
justify-content: space-between;
height: calc(
100vh - var(--header-height) - var(--recipe-select-height) -
var(--tab-height) - var(--footer-height)
var(--tab-height) - var(--footer-height) - var(--description-height)
Copy link
Contributor

Choose a reason for hiding this comment

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

super nit: when switching from any recipe to multi-spheres, the re-run button shifts slightly (not fully fixed) because that recipe has more editable fields. I don’t think it’s blocking, just something I noticed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good catch. I think that we'll address this in some follow up work for improvements to the scrollable area next week, I'm kinda leaving it at "the re-run button is consistently viewable, that's good enough for today"

);
}
5 changes: 3 additions & 2 deletions src/utils/gradient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function deriveGradientStrength(
if (!opt?.strength_path) return undefined;

const storeMin = opt.strength_min ?? 0;
const storeMax = opt.strength_max ?? 5;
const storeMax = opt.strength_max ?? 1;

const uiMin = storeMin;
const uiMax = storeMax;
Expand All @@ -81,10 +81,11 @@ export function deriveGradientStrength(
? storeRaw
: opt.strength_default ?? storeMin;
const uiValue = round2(clampUi(storeNum));
const strengthDescription = opt.strength_description || "Smaller decay length indicates stronger bias"

return {
displayName: `Decay Length`,
description: "Higher values will increase the decay length",
description: strengthDescription,
path: opt.strength_path,
uiValue,
min: uiMin,
Expand Down