Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for #1561 #1562

Merged
merged 1 commit into from
Dec 6, 2024
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
14 changes: 9 additions & 5 deletions src/components/sequencing/form/ArgTitle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
let title: string = '';
let typeInfo: string = '';
let formattedRange: string = '';
let isSymbolAllowed: boolean = true;
$: typeInfo = compactType(argDef);
$: title = getArgTitle(argDef, typeInfo);
$: formattedRange = formatRange(argDef);
$: isSymbolAllowed = !isFswCommandArgumentRepeat(argDef);
function compactType(argDef: FswCommandArgument): string {
if (isFswCommandArgumentUnsigned(argDef)) {
Expand Down Expand Up @@ -96,12 +98,14 @@
</div>
{/if}

<div>Value Type</div>
{#if isSymbolAllowed}
duranb marked this conversation as resolved.
Show resolved Hide resolved
<div>Value Type</div>

<select class="st-select" required bind:value={argumentValueCategory} on:change={onValueTypeChange}>
<option value="Literal"> Literal </option>
<option value="Symbol"> Symbol </option>
</select>
<select class="st-select" required bind:value={argumentValueCategory} on:change={onValueTypeChange}>
<option value="Literal"> Literal </option>
<option value="Symbol"> Symbol </option>
</select>
{/if}
</div>
</Collapse>

Expand Down
3 changes: 1 addition & 2 deletions src/components/sequencing/form/EnumEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<script lang="ts">
import type { CommandDictionary, FswCommandArgumentEnum } from '@nasa-jpl/aerie-ampcs';
import type { SelectedDropdownOptionValue } from '../../../types/dropdown';
import { quoteEscape } from '../../../utilities/codemirror/codemirror-utils';
import SearchableDropdown from '../../ui/SearchableDropdown.svelte';
const SEARCH_THRESHOLD = 100;
Expand Down Expand Up @@ -31,7 +30,7 @@
function onSelectReferenceModel(event: CustomEvent<SelectedDropdownOptionValue>) {
const { detail: enumVal } = event;
if (typeof enumVal === 'string') {
setInEditor(quoteEscape(enumVal));
setInEditor(enumVal);
duranb marked this conversation as resolved.
Show resolved Hide resolved
}
}
</script>
Expand Down
Loading