Skip to content

Commit

Permalink
Merge pull request #36 from concord-consortium/187321079-remove-seque…
Browse files Browse the repository at this point in the history
…nce-max-length

update: Remove sequence length limit and change default delimiter [PT-187321079]
  • Loading branch information
dougmartin authored Apr 4, 2024
2 parents 3cb92bf + 0ef359a commit d1845d7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import "./app.scss";
type GenerationMode = "ready" | "playing" | "paused" | "stepping";

const AnyStartingState = "(any)";
const MaxLengthLimit = 25;
const AnimationDelay = 1000;

type SequenceGroup = {
Expand Down Expand Up @@ -56,7 +55,7 @@ const SequenceOutputHeader = ({ group }: { group: SequenceGroup }) => {

export const App = () => {
const [lengthLimit, setLengthLimit] = useState<number | undefined>(5);
const [delimiter, setDelimiter] = useState("");
const [delimiter, setDelimiter] = useState(" ");
const [startingState, setStartingState] = useState("");
const [sequenceGroups, setSequenceGroups] = useState<SequenceGroup[]>([]);
const [selectedNodeId, _setSelectedNodeId] = useState<string>();
Expand Down Expand Up @@ -216,7 +215,7 @@ export const App = () => {

const handleChangeLengthLimit = (e: React.ChangeEvent<HTMLInputElement>) => {
const numberValue = parseInt(e.target.value, 10);
setLengthLimit(isNaN(numberValue) ? undefined : Math.min(MaxLengthLimit, numberValue));
setLengthLimit(isNaN(numberValue) ? undefined : numberValue);
};

const handleChangeDelimiter = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -289,7 +288,6 @@ export const App = () => {
value={lengthLimit}
onChange={handleChangeLengthLimit}
min={1}
max={MaxLengthLimit}
disabled={disabled}
/>
</div>
Expand Down

0 comments on commit d1845d7

Please sign in to comment.