Comfy-Org / Comfy-Org/ComfyUI_frontend

Refactor: Move curve utilities out of src/components/ into a dedicated utility module

Open
#10,716 0 comments 0 reactions 1 assignee Claimed by @jtydhr88 View on GitHub
developer experience
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Summary

The curve utility functions (e.g., `curveDataToFloatLUT`, `curvesToLUT`, `createInterpolator`, `histogramToPath`, etc.) currently live in `src/components/curve/curveUtils.ts`. Since these are pure utility/helper functions with no component-specific logic, they are misplaced inside the `components/` directory.

## Proposed Change

Move the contents of `src/components/curve/curveUtils.ts` (and the associated `src/components/curve/types.ts`) to a more appropriate location such as `src/utils/curve/` or `src/lib/curve/`, and update all imports accordingly.

## Background

Noted as a non-blocking pre-existing convention issue during review of PR #10349:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/10349#discussion_r3006818756

The new `curveDataToFloatLUT` function added in that PR follows the same (pre-existing) convention, so no immediate change is needed — this is intended as a follow-up cleanup.

## Requested by

@christian-byrne

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10716-Refactor-Move-curve-utilities-out-of-src-components-into-a-dedicated-utility-module-3326d73d36508113807edf05edf454ab) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.