diff --git a/alfred/ci.py b/alfred/ci.py index 2cda18aba..c7864c3fa 100644 --- a/alfred/ci.py +++ b/alfred/ci.py @@ -8,12 +8,12 @@ @alfred.command("ci", help="continuous integration pipeline") -@alfred.option('--front', '-f', help="run for frontend only", is_flag=True, default=False) -@alfred.option('--docs', '-d', help="run for docs only", is_flag=True, default=False) -@alfred.option('--back', '-b', help="run for backend only", is_flag=True, default=False) -@alfred.option('--e2e', '-e', help="run for end-to-end only", default=None) +@alfred.option("--front", "-f", help="run for frontend only", is_flag=True, default=False) +@alfred.option("--docs", "-d", help="run for docs only", is_flag=True, default=False) +@alfred.option("--back", "-b", help="run for backend only", is_flag=True, default=False) +@alfred.option("--e2e", "-e", help="run for end-to-end only", default=None) def ci(front, back, e2e, docs): - no_flags = (not front and not back and not e2e and not docs) + no_flags = not front and not back and not e2e and not docs if front or no_flags: alfred.invoke_command("npm.lint") @@ -27,21 +27,28 @@ def ci(front, back, e2e, docs): if e2e: alfred.invoke_command("npm.e2e", browser=e2e) + @alfred.command("ci.mypy", help="typing checking with mypy on ./src/writer") def ci_mypy(): alfred.run("mypy ./src/writer --exclude app_templates/*") + @alfred.command("ci.ruff", help="linting with ruff") -@alfred.option('--fix', '-f', help="fix linting errors", is_flag=True, default=False) +@alfred.option("--fix", "-f", help="fix linting errors", is_flag=True, default=False) def ci_ruff(fix): if fix: alfred.run("ruff check --fix") else: alfred.run("ruff check") + @alfred.command("ci.pytest", help="run pytest on ./tests") def ci_test(): os.chdir("tests") alfred.run("pytest") +@alfred.command("ci.pytest.blocks", help="run pytest on ./tests") +def ci_test_blocks(): + os.chdir("tests") + alfred.run("pytest backend/blocks") diff --git a/pyproject.toml b/pyproject.toml index 079d8a2ba..0a3fa0df3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "writer" -version = "0.8.3rc7" +version = "0.8.3rc8" description = "An open-source, Python framework for building feature-rich apps that are fully integrated with the Writer platform." authors = ["Writer, Inc."] readme = "README.md" diff --git a/src/ui/public/components/workflows_code.svg b/src/ui/public/components/workflows_code.svg new file mode 100644 index 000000000..1feed2721 --- /dev/null +++ b/src/ui/public/components/workflows_code.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue b/src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue index c3c7936ff..879f22a97 100644 --- a/src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue +++ b/src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue @@ -105,6 +105,7 @@ function getRelevantToolsInCategory(categoryId: string) { if (def.category != categoryId) return false; if (!def.toolkit && activeToolkit.value !== "core") return false; if (def.toolkit && def.toolkit !== activeToolkit.value) return false; + if (def.deprecated) return false; return true; }); const enriched = typeList.map((type) => { @@ -130,7 +131,7 @@ function handleDragEnd(ev: DragEvent) { function getToolIcons(tool: ReturnType[0]) { return [ `/components/${tool.type}.svg`, - `/components/category_${tool.category}.svg`, + `/components/${activeToolkit.value == "workflows" ? "workflows_" : ""}category_${tool.category}.svg`, ].map((p) => convertAbsolutePathtoFullURL(p)); } diff --git a/src/ui/src/components/workflows/WorkflowsWorkflow.vue b/src/ui/src/components/workflows/WorkflowsWorkflow.vue index 4391540d4..419f1918d 100644 --- a/src/ui/src/components/workflows/WorkflowsWorkflow.vue +++ b/src/ui/src/components/workflows/WorkflowsWorkflow.vue @@ -161,7 +161,7 @@ const temporaryNodeCoordinates = shallowRef< Record >({}); -const AUTOARRANGE_ROW_GAP_PX = 48; +const AUTOARRANGE_ROW_GAP_PX = 64; const AUTOARRANGE_COLUMN_GAP_PX = 128; const nodes = computed(() => diff --git a/src/ui/src/components/workflows/abstract/WorkflowsNode.vue b/src/ui/src/components/workflows/abstract/WorkflowsNode.vue index 468b5e105..104b1d505 100644 --- a/src/ui/src/components/workflows/abstract/WorkflowsNode.vue +++ b/src/ui/src/components/workflows/abstract/WorkflowsNode.vue @@ -4,6 +4,7 @@ :class="{ 'WorkflowsNode--trigger': isTrigger, 'WorkflowsNode--intelligent': isIntelligent, + 'WorkflowsNode--deprecated': isDeprecated, 'WorkflowsNode--running': completionStyle == 'running', 'WorkflowsNode--success': completionStyle == 'success', 'WorkflowsNode--error': completionStyle == 'error', @@ -24,6 +25,9 @@ class="nodeNamer" :block-name="def.name" > +
+ Deprecated +
{ return def?.value?.category == "Writer"; }); +const isDeprecated = computed(() => { + return def?.value?.deprecated; +}); + const completionStyle = computed(() => { if (latestKnownOutcome.value == null) return null; if (latestKnownOutcome.value == "in_progress") return "running"; @@ -245,6 +253,10 @@ watch(isEngaged, () => { animation: shadowPulse 1s infinite alternate ease-in-out; } +.WorkflowsNode--deprecated { + filter: grayscale(1); +} + @keyframes shadowPulse { 0% { box-shadow: 0px 2px 24px -16px #6985ff; @@ -326,11 +338,12 @@ watch(isEngaged, () => { } .title { - display: flex; + display: grid; gap: 10px; padding: 12px; border-radius: 12px 12px 0 0; align-items: center; + grid-template-columns: 24px 1fr; } .WorkflowsNode--intelligent .title { @@ -342,6 +355,17 @@ watch(isEngaged, () => { height: 24px; } +.title .deprecationNotice { + font-size: 12px; + text-transform: uppercase; + font-size: 12px; + font-weight: 500; + line-height: 12px; /* 100% */ + letter-spacing: 1.3px; + text-transform: uppercase; + color: var(--builderSecondaryTextColor); +} + .WorkflowsNode--trigger .title img { border-radius: 50%; } diff --git a/src/ui/src/components/workflows/base/WorkflowsNodeNamer.vue b/src/ui/src/components/workflows/base/WorkflowsNodeNamer.vue index 21e81b322..e4511303c 100644 --- a/src/ui/src/components/workflows/base/WorkflowsNodeNamer.vue +++ b/src/ui/src/components/workflows/base/WorkflowsNodeNamer.vue @@ -82,6 +82,7 @@ function handleAliasEditorMousemove(ev: MouseEvent) {