-
Notifications
You must be signed in to change notification settings - Fork 323
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
Function definition editor widget #11655
base: develop
Are you sure you want to change the base?
Conversation
🧪 Storybook is successfully deployed!📊 Dashboard:
|
/** | ||
* Find smallest index at which two arrays differ. Returns an index past the array (i.e. array length) when both arrays are equal. | ||
*/ | ||
export function findDifferenceIndex<T>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use some tests, like expect(findDifferenceIndex([null], [null])).toBe(1)
margin: 4px 8px; | ||
padding: 4px; | ||
|
||
/* TODO */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. I completely forgot about it. I'm not sure what to do about it though at this point, since we don't have a known output type that would be used to color the node. I will just expand the comment here for now, explaining the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually ended up looking for defined group or output node's color, if available. I think this will be complete enough for current implementation.
@@ -80,6 +72,7 @@ const innerInput = computed(() => { | |||
* handling deletions of arguments and rewriting the applications to named as appropriate. | |||
*/ | |||
function handleArgUpdate(update: WidgetUpdate): boolean { | |||
console.log('handleArgUpdate', update) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover logging (here and in other files)
@@ -745,8 +745,8 @@ config.setToolbar( | |||
overflow: hidden; | |||
} | |||
.TableVisualization > .ag-theme-alpine > :deep(.ag-root-wrapper.ag-layout-normal) { | |||
border-radius: 0 0 var(--radius-default) var(--radius-default); | |||
.TableVisualization:deep(.ag-root-wrapper) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this still need a :deep
selector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the .ag-root-wrapper
is generated outside of vue's context, so it doesn't logically belong to a component. That makes :deep
necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the deep selector, :deep(.ag-root-wrapper)
. Not just the :deep
pseudoclass part of the selector.
@@ -12,9 +12,7 @@ export type WidgetComponent<T extends WidgetInput> = Component<WidgetProps<T>> | |||
|
|||
export namespace WidgetInput { | |||
/** Returns widget-input data for the given AST expression or token. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs are outdated, here and below
] as const satisfies TabButton[] | ||
const isFullscreen = ref(false) | ||
|
||
const mainMarkdownDocs = new Y.Doc().getText() // TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a stub
|
||
const props = defineProps<{ aiMode: boolean }>() | ||
|
||
// type Tabs = (typeof tabButtons)[number]['tab'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented code
const width = toRef(persisted, 'graphRightDockWidth') | ||
|
||
const cbVisible = ref(true) | ||
const cbTab = ref('help') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tab names seem to be magic strings, which risks bugs if we change the available tabs in the future.
Pull Request Description
Fixes #11406
Also refactored the right panel state into its own store, so it is less coupled with the graph editor.
The function definition widget tree displays the icon, name and all arguments. The name is editable, everything else right now is just read-only. The icons next to the arguments are just placeholders intended to be replaced with a "drag handle" icon.
Also fixed issues with missing rounded corners on the ag-grid widget.