-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
209 changed files
with
5,271 additions
and
2,347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,17 +31,6 @@ jobs: | |
node-version-file: .node-version | ||
cache: "pnpm" | ||
|
||
- uses: actions/cache/restore@v4 | ||
name: Download cache | ||
id: cache | ||
with: | ||
path: | | ||
**/.eslintcache | ||
node_modules/.cache/prettier | ||
key: ${{ runner.os }}-gui-${{ github.run_id }} | ||
restore-keys: | | ||
${{ runner.os }}-gui | ||
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') | ||
name: Installing wasm-pack | ||
uses: jetli/[email protected] | ||
|
@@ -51,10 +40,15 @@ jobs: | |
- name: 📦 Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: 📝 Prettier | ||
id: prettier | ||
continue-on-error: true | ||
run: pnpm run ci:prettier | ||
- uses: actions/cache/restore@v4 | ||
name: Download cache | ||
id: cache | ||
with: | ||
path: | | ||
**/.eslintcache | ||
key: ${{ runner.os }}-gui-${{ github.run_id }} | ||
restore-keys: | | ||
${{ runner.os }}-gui | ||
# Next Tasks are depend on Typecheck, because we build libraries at this stage | ||
- name: 🧠 Typecheck | ||
|
@@ -88,7 +82,6 @@ jobs: | |
- name: ❌ Fail if any check failed | ||
if: always() && (steps.prettier.outcome == 'failure' || steps.lint.outcome == 'failure' || steps.typecheck.outcome == 'failure' || steps.unit-tests.outcome == 'failure') | ||
run: | | ||
echo "Prettier outcome: ${{ steps.prettier.outcome }}" | ||
echo "Lint outcome: ${{ steps.lint.outcome }}" | ||
echo "Typecheck outcome: ${{ steps.typecheck.outcome }}" | ||
echo "Unit tests outcome: ${{ steps.unit-tests.outcome }}" | ||
|
@@ -102,7 +95,6 @@ jobs: | |
key: ${{ steps.cache.outputs.cache-primary-key }} | ||
path: | | ||
**/.eslintcache | ||
node_modules/.cache/prettier | ||
playwright: | ||
name: 🎭 Playwright Tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,52 @@ jobs: | |
echo "$file was changed" | ||
done | ||
prettier: | ||
name: 🧹 Prettier | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: 📦 Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
name: ⎔ Setup Node | ||
with: | ||
node-version-file: .node-version | ||
cache: "pnpm" | ||
|
||
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') | ||
name: Installing wasm-pack | ||
uses: jetli/[email protected] | ||
with: | ||
version: v0.12.1 | ||
|
||
- name: 📦 Install dependencies | ||
run: pnpm install --frozen-lockfile --ignore-scripts | ||
|
||
- uses: actions/cache/restore@v4 | ||
name: Download cache | ||
id: cache | ||
with: | ||
path: | | ||
node_modules/.cache/prettier | ||
key: ${{ runner.os }}-gui-${{ github.run_id }} | ||
restore-keys: | | ||
${{ runner.os }}-gui | ||
- name: Run prettier | ||
run: pnpm run ci:prettier | ||
|
||
- name: 💾 Save cache | ||
uses: actions/cache/save@v4 | ||
if: always() && steps.cache.outputs.cache-hit != 'true' | ||
id: save-cache | ||
with: | ||
key: ${{ steps.cache.outputs.cache-primary-key }} | ||
path: | | ||
node_modules/.cache/prettier | ||
checks: | ||
name: 🧰 Checks | ||
uses: ./.github/workflows/gui-checks.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
app/gui/src/project-view/components/CodeEditor/CodeEditorTooltip.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<script setup lang="ts"> | ||
import { type NodeId } from '@/stores/graph' | ||
import { type GraphDb } from '@/stores/graph/graphDatabase' | ||
import { type SuggestionDbStore } from '@/stores/suggestionDatabase' | ||
import { computed } from 'vue' | ||
const { nodeId, syntax, graphDb, suggestionDbStore } = defineProps<{ | ||
nodeId: NodeId | undefined | ||
syntax: string | ||
graphDb: GraphDb | ||
suggestionDbStore: SuggestionDbStore | ||
}>() | ||
const expressionInfo = computed(() => nodeId && graphDb.getExpressionInfo(nodeId)) | ||
const typeName = computed( | ||
() => expressionInfo.value && (expressionInfo.value.typename ?? 'Unknown'), | ||
) | ||
const executionTimeMs = computed( | ||
() => | ||
expressionInfo.value?.profilingInfo[0] && | ||
(expressionInfo.value.profilingInfo[0].ExecutionTime.nanoTime / 1_000_000).toFixed(3), | ||
) | ||
const method = computed(() => expressionInfo.value?.methodCall?.methodPointer) | ||
const group = computed(() => { | ||
const id = method.value && suggestionDbStore.entries.findByMethodPointer(method.value) | ||
if (id == null) return | ||
const suggestionEntry = suggestionDbStore.entries.get(id) | ||
if (!suggestionEntry) return | ||
const groupIndex = suggestionEntry.groupIndex | ||
if (groupIndex == null) return | ||
const group = suggestionDbStore.groups[groupIndex] | ||
if (!group) return | ||
return { | ||
name: `${group.project}.${group.name}`, | ||
color: group.color, | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div v-if="nodeId">AST ID: {{ nodeId }}</div> | ||
<div v-if="typeName">Type: {{ typeName }}</div> | ||
<div v-if="executionTimeMs != null">Execution Time: {{ executionTimeMs }}ms</div> | ||
<div>Syntax: {{ syntax }}</div> | ||
<div v-if="method">Method: {{ method.module }}.{{ method.name }}</div> | ||
<div v-if="group" :style="{ color: group.color }">Group: {{ group.name }}</div> | ||
</template> |
Oops, something went wrong.