Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions src/components/source-editor-card/SourceEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export class SourceEditor {
doc: initialDoc,
extensions: [
theme === 'dark' ? vscodeDark : vscodeLight,
EditorView.theme({
'&': {
minHeight: '6lh'
}
}),
this._languageCompartment.of(languageExtension),
this._editableCompartment.of(EditorView.editable.of(true)),
syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
Expand Down
14 changes: 8 additions & 6 deletions src/components/source-editor-card/SourceEditorCard.styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
display: flex;
flex-direction: column;
width: 100%;
padding: 20px;
align-items: flex-start;
gap: 20px;
border-radius: 10px;
background: var(--solid-ui-color-white, #FFFFFF);
box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.25);
align-items: stretch;
}

.sourcePaneEditor {
box-sizing: border-box;
align-self: stretch;
min-width: 0;
width: 100%;
}

.sourcePaneCardLoading {
Expand Down
10 changes: 1 addition & 9 deletions src/components/source-editor-card/SourceEditorCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { WebComponent } from 'solid-ui'
import { getStatusSection } from '../../StatusSection'
import 'solid-ui/components/button'
import { compactable } from '../../compactableFormats'
import { SourceContext } from '../../primitives/context'
import { sourceContext } from '../../primitives/context'
import { sourceContext, SourceContext } from '../../primitives/context'

@customElement('solid-panes-source-editor-card')
export default class SourceEditorCard extends WebComponent {
Expand Down Expand Up @@ -103,13 +102,6 @@ export default class SourceEditorCard extends WebComponent {
await this._initializeEditor()
}

protected updated (changedProperties: Map<string, any>) {
super.updated(changedProperties)
if (!this._editor && this.sourceContext && this._editorMount) {
void this._initializeEditor()
}
}

disconnectedCallback() {
super.disconnectedCallback()
if (this._editor) {
Expand Down
1 change: 1 addition & 0 deletions src/components/source-provider/SourceProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const defaultSourcePaneState: SourcePaneState = {

@customElement('source-pane-source-provider')
export default class SourceProvider extends WebComponent {

@property({ attribute: false })
accessor context: DataBrowserContext | undefined = undefined

Expand Down
20 changes: 15 additions & 5 deletions src/sourcePane.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
.sourcePane {
display: flex;
flex-direction: column;
align-items: center;
gap: 23px;
padding-bottom: 29px;
display: block;
width: 100%;
border-radius: 5px;
border: 1px solid var(--color-border, var(--gray-200, #E5E7EB));
}
Expand All @@ -29,6 +26,19 @@
width: 100%;
}

/* This code is here because currently the shadow DOM isn't
working just yet because I need to implement the header as a web component first
once I do that I can move this to the host css of the source-provider */
Comment thread
SharonStrats marked this conversation as resolved.
source-pane-source-provider {
display: flex;
flex-direction: column;
width: 100%;
align-self: stretch;
box-sizing: border-box;
padding: 20px 20px 29px;
gap: 23px;
}

.sourcePaneCompactButton {
box-sizing: border-box;
display: inline-flex;
Expand Down
Loading