Skip to content

Commit

Permalink
Fixed SongEditor effect sidebar layout
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaltby committed May 22, 2024
1 parent 7bcd9f6 commit 20fef9d
Showing 1 changed file with 48 additions and 47 deletions.
95 changes: 48 additions & 47 deletions src/components/music/SongEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,28 +242,30 @@ export const SongEditor = () => {
</FormRow>
</SidebarColumn>
</SidebarColumns>
<SidebarColumn>
<FormContainer>
{selectedEffectCell !== null ? (

<FormContainer>
{selectedEffectCell !== null ? (
<div style={{ marginTop: -1 }}>
<PatternCellEditor
id={selectedEffectCell}
patternId={patternId}
pattern={song?.patterns[patternId][selectedEffectCell]}
/>
) : instrumentData ? (
<>
<FormHeader>
<EditableText
name="instrumentName"
placeholder={instrumentName(
instrumentData,
selectedInstrument.type
)}
value={instrumentData.name || ""}
onChange={onChangeInstrumentName(selectedInstrument.type)}
/>
</div>
) : instrumentData ? (
<>
<FormHeader>
<EditableText
name="instrumentName"
placeholder={instrumentName(
instrumentData,
selectedInstrument.type
)}
value={instrumentData.name || ""}
onChange={onChangeInstrumentName(selectedInstrument.type)}
/>

{/* <DropdownButton
{/* <DropdownButton
size="small"
variant="transparent"
menuDirection="right"
Expand All @@ -275,39 +277,38 @@ export const SongEditor = () => {
{l10n("MENU_VARIABLE_COPY_EMBED_CHAR")}
</MenuItem>
</DropdownButton> */}
</FormHeader>
</FormHeader>

<StickyTabs>
<TabBar
value={instrumentEditorTab}
values={instrumentEditorTabs}
onChange={onInstrumentEditorChange}
<StickyTabs>
<TabBar
value={instrumentEditorTab}
values={instrumentEditorTabs}
onChange={onInstrumentEditorChange}
/>
</StickyTabs>
<InstrumentEditorWrapper>
{instrumentEditorTab === "main" ? (
<>
{renderInstrumentEditor(
selectedInstrument.type,
instrumentData,
song.waves
)}
</>
) : (
<InstrumentSubpatternEditor
enabled={instrumentData.subpattern_enabled}
subpattern={instrumentData.subpattern}
instrumentId={instrumentData.index}
instrumentType={selectedInstrument.type}
/>
</StickyTabs>
<InstrumentEditorWrapper>
{instrumentEditorTab === "main" ? (
<>
{renderInstrumentEditor(
selectedInstrument.type,
instrumentData,
song.waves
)}
</>
) : (
<InstrumentSubpatternEditor
enabled={instrumentData.subpattern_enabled}
subpattern={instrumentData.subpattern}
instrumentId={instrumentData.index}
instrumentType={selectedInstrument.type}
/>
)}
</InstrumentEditorWrapper>
</>
) : (
""
)}
</FormContainer>
</SidebarColumn>
)}
</InstrumentEditorWrapper>
</>
) : (
""
)}
</FormContainer>
</Sidebar>
);
};

0 comments on commit 20fef9d

Please sign in to comment.