Skip to content
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

chore: Merge for release #705

Merged
merged 74 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
4e122e6
chore: add a TypedDict to parameters definition
mmikita95 Dec 5, 2024
00244b1
fix: typing
mmikita95 Dec 5, 2024
e879f34
feat: Async jobs
ramedina86 Dec 5, 2024
d9468be
feat: Async jobs
ramedina86 Dec 7, 2024
629ccb2
chore: Added Redis
ramedina86 Dec 9, 2024
4be1ae9
fix: JSON strict false for more resilient parsing
ramedina86 Dec 9, 2024
e99b2c6
chore: Clearer UX for API call
ramedina86 Dec 9, 2024
9f296f8
fix: Show workflow when key is null, but also empty
ramedina86 Dec 9, 2024
0a6697b
chore: Allow arbitrary payload for safe events
ramedina86 Dec 9, 2024
e5bd328
chore: Payload parsing
ramedina86 Dec 9, 2024
fd6c6d6
chore: Prevent execution environment pollution and use payload instea…
ramedina86 Dec 9, 2024
388cd38
chore: Remove control characters
ramedina86 Dec 9, 2024
c53dea9
test: Fix monkeypatching, change to match new payload focused workflo…
ramedina86 Dec 9, 2024
e1322cd
feat(ui): use design system in builder - WF-127
madeindjs Nov 28, 2024
7f11062
chore: Improve formatting of message
ramedina86 Dec 9, 2024
278f668
test: Tests for workflow API async jobs
ramedina86 Dec 10, 2024
fa0d470
test: Tests for workflow async jobs API
ramedina86 Dec 10, 2024
7c8497e
chore: Ruff fixes, test fixes
ramedina86 Dec 11, 2024
cc17ef0
chore: Fix test
ramedina86 Dec 11, 2024
898e4f1
fix: Ruff fix
ramedina86 Dec 11, 2024
1c42c38
chore: Add message when hash cannot be obtained
ramedina86 Dec 11, 2024
14a67b2
feat(ui): introduce `WdsTabs` and use in builder - WF-127
madeindjs Dec 13, 2024
da30777
chore(ui): introduce constant to DRY - WF-127
madeindjs Dec 13, 2024
a06cff8
Fix image URLs in intro and builder basics
samjulien Dec 13, 2024
a953ee9
Merge pull request #692 from samjulien/fix-intro-bb-images
ramedina86 Dec 16, 2024
3baf732
Merge pull request #679 from mmikita95/chore-type-assist-function-defs
ramedina86 Dec 16, 2024
c01562a
Merge pull request #657 from madeindjs/WF-127
ramedina86 Dec 16, 2024
51b2237
fix(ui): re-introduce fields unit in Builder - WF-127
madeindjs Dec 16, 2024
30333f2
feat: Autoarrange nodes
ramedina86 Dec 16, 2024
94f6293
Merge pull request #694 from madeindjs/WF-127-2
ramedina86 Dec 16, 2024
7fe7302
chore(ui): use WDS colors tokens - WF-149
madeindjs Dec 16, 2024
f2331c1
chore(ui): use closest WDS color - WF-149
madeindjs Dec 16, 2024
9e32706
chore(ui): introduce WDS shadow tokens - WF-149
madeindjs Dec 16, 2024
402d159
chore(ui): remove `.BuilderApp` in `sharedStyle.css` - WF-149
madeindjs Dec 16, 2024
ebbb031
feat: ability to set timeout for deployment
raaymax Dec 16, 2024
3ff5303
chore(ui): compute CSS properties for WDS tokens - WF-149
madeindjs Dec 16, 2024
e59d264
chore: Makes Redis optional
ramedina86 Dec 16, 2024
908fcfe
feat: Expansible JobVault architecture
ramedina86 Dec 16, 2024
cb74cd4
chore: Poetry lock
ramedina86 Dec 16, 2024
cf9b66d
fix: Remove Redis dependency for type checking
ramedina86 Dec 16, 2024
cf7b8c2
chore: Rename BASE_HASH for SECRET_KEY
ramedina86 Dec 16, 2024
0c47048
chore: Rename crypto function for clarity
ramedina86 Dec 16, 2024
227f1f0
fix: Mypy fix
ramedina86 Dec 16, 2024
1050b9d
fix: Ruff fix
ramedina86 Dec 16, 2024
d2680aa
chore: Add warning
ramedina86 Dec 16, 2024
7fd586d
chore: Enable Jobs API flag
ramedina86 Dec 16, 2024
507c48b
fix(ui): add `min-width` to `CoreTimer` - WF-130
madeindjs Dec 16, 2024
7c1bf24
Merge pull request #697 from writer/deployment-timeout
ramedina86 Dec 16, 2024
cbe876f
Merge pull request #698 from madeindjs/WF-130
ramedina86 Dec 16, 2024
00b964f
Merge pull request #688 from writer/feat-async-jobs
ramedina86 Dec 16, 2024
c506365
fix: Typo and unused import
ramedina86 Dec 17, 2024
703747a
feat(ui): improve `WdsDropdownMenu` search bar
madeindjs Dec 17, 2024
d7b5dc9
fix(ui): set `BuilderSelect`'s dropdown vertical only
madeindjs Dec 17, 2024
97e3784
chore: Replace title for tooltip
ramedina86 Dec 17, 2024
b5b764c
chore: Expand navigator, move auto arrange button
ramedina86 Dec 17, 2024
1a64b71
feat: Change coordinates multiple
ramedina86 Dec 17, 2024
0af0a3c
fix(ui): Set `BuilderSelect` WDS hover state
madeindjs Dec 17, 2024
1d67456
fix(ui): avoid rendering empty sections in builder
madeindjs Dec 17, 2024
e5f6d65
feat(ui): use `WdsButton` in builder
madeindjs Dec 17, 2024
55ffbf7
chore(ui): cleanup
madeindjs Dec 17, 2024
adbe3be
refact: rename EditableDataframe into EditableDataFrame
FabienArcellier Dec 17, 2024
efb70ea
refact: rename EditableDataframe into EditableDataFrame
FabienArcellier Dec 17, 2024
3093c36
refact: rename EditableDataframe into EditableDataFrame
FabienArcellier Dec 17, 2024
a268c55
fix(ui): adapt Dataframe bg color when selected - WF-131
madeindjs Dec 17, 2024
0cb1365
fix(ui): fix `CoreProgressBar` icon & description
madeindjs Dec 17, 2024
dc9f6e3
fix: Increase reliability of undoing a node move
ramedina86 Dec 18, 2024
d877ba2
Merge pull request #701 from FabienArcellier/fix/dataframe-name
ramedina86 Dec 18, 2024
a601681
Merge pull request #699 from madeindjs/fix-progress-bar
ramedina86 Dec 18, 2024
90e3656
Merge pull request #703 from madeindjs/WF-131
ramedina86 Dec 18, 2024
c252a82
Merge pull request #700 from madeindjs/improve-wds-builder
ramedina86 Dec 18, 2024
22d0248
Merge pull request #696 from madeindjs/WF-149
ramedina86 Dec 18, 2024
5406097
Merge branch 'dev' into feat-autoarrange-blocks
ramedina86 Dec 18, 2024
58be8e0
Merge pull request #695 from writer/feat-autoarrange-blocks
ramedina86 Dec 18, 2024
4e956b1
chore: Bump version
ramedina86 Dec 18, 2024
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
2 changes: 1 addition & 1 deletion apps/hello/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _get_editable_df():
'object': [{"updatedAt": None}, {"updatedAt": None}, {"updatedAt": None}],
'text': ['one', 'two', 'three'],
})
return wf.EditableDataframe(df)
return wf.EditableDataFrame(df)

def _get_highlighted_members():
sample_df = _get_main_df().sample(3).set_index("name", drop=False)
Expand Down
6 changes: 3 additions & 3 deletions docs/framework/builder-basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ You can switch modes between _User Interface_, _Code_ and _Preview_ using the bu

### User Interface

![Framework Builder - Mode: User Interface](/framework/images/builder-basics.ui.png#framework)
![Framework Builder - Mode: User Interface](/framework/images/builder-basics.ui.png)

The default mode. Allows you to focus on building the interface.

### Code

![Framework Builder - Mode: Code](/framework/images/builder-basics.code.png#framework)
![Framework Builder - Mode: Code](/framework/images/builder-basics.code.png)

This mode displays the **code editor** and the **application log**, while still allowing you to access the _Component Tree_ and _Settings_.

Expand All @@ -35,7 +35,7 @@ This mode displays the **code editor** and the **application log**, while still

### Preview

![Framework Builder - Mode: Preview](/framework/images/builder-basics.preview.png#framework)
![Framework Builder - Mode: Preview](/framework/images/builder-basics.preview.png)

The _Preview_ mode shows the application exactly like the user will see it. It allocates the whole width of the viewport to the app.

Expand Down
18 changes: 9 additions & 9 deletions docs/framework/dataframe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ it offers components as `dataframe` to manipulate dataframes. These components a
|--------------------|---------------------------------------|
| `pandas.DataFrame` | x |
| `polar.DataFrame` | x |
| `list of records` | x (with `EditableDataframe`) |
| `list of records` | x (with `EditableDataFrame`) |

## Use a dataframe

Expand All @@ -26,7 +26,7 @@ wf.init_state({

## Prepare a dataframe for editing

**writer provides `EditableDataframe` as a helper to facilitate manipulation**. it makes it easier to write event handlers such as adding a line,
**writer provides `EditableDataFrame` as a helper to facilitate manipulation**. it makes it easier to write event handlers such as adding a line,
deleting it or modifying a value, etc...

```python
Expand All @@ -36,7 +36,7 @@ import writer as wf
df = pandas.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})

wf.init_state({
'mydf': wf.EditableDataframe(df)
'mydf': wf.EditableDataFrame(df)
})
```

Expand All @@ -50,7 +50,7 @@ import writer as wf

df = pandas.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
wf.init_state({
'mydf': wf.EditableDataframe(df)
'mydf': wf.EditableDataFrame(df)
})

# Subscribe this event handler to the `wf-dataframe-add` event
Expand All @@ -76,9 +76,9 @@ def on_record_action(state, payload):
state['record'] = state['df'].record(record_index) # dict representation of record
```

### Datastructures supported by `EditableDataframe`
### Datastructures supported by `EditableDataFrame`

`EditableDataframe` can be used with a panda dataframe, a polar dataframe and list of records.
`EditableDataFrame` can be used with a panda dataframe, a polar dataframe and list of records.

```python
import pandas
Expand All @@ -91,8 +91,8 @@ polars_df = polars.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
list_of_records = [{'a': 1, 'b': 4}, {'a': 2, 'b': 5}, {'a': 3, 'b': 6}]

wf.init_state({
'mypandas': wf.EditableDataframe(panda_df),
'mypolars': wf.EditableDataframe(polars_df),
'mylistofrecords': wf.EditableDataframe(list_of_records)
'mypandas': wf.EditableDataFrame(panda_df),
'mypolars': wf.EditableDataFrame(polars_df),
'mylistofrecords': wf.EditableDataFrame(list_of_records)
})
```
2 changes: 1 addition & 1 deletion docs/framework/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Introduction"

The Writer Framework lets you build feature-rich apps by using a drag-and-drop visual editor called **the Builder** and writing the back-end code in Python. It's fast and flexible, with clean, easy-to-test syntax. It provides separation of concerns between UI and business logic, enabling more complex apps.

![Framework Builder screenshot](/framework/public/builder.png#framework)
![Framework Builder screenshot](/framework/public/builder.png)

Build AI apps with the Writer Framework when:

Expand Down
314 changes: 179 additions & 135 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "writer"
version = "0.8.3rc2"
version = "0.8.3rc3"
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"
Expand Down Expand Up @@ -49,7 +49,6 @@ websockets = ">= 12, < 13"
writer-sdk = ">= 1.5.0, < 2"
python-multipart = ">=0.0.7, < 1"


[tool.poetry.group.build]
optional = true

Expand All @@ -68,13 +67,20 @@ pytest-asyncio = ">= 0.23.4, < 1"
ruff = "^0.3.4"
types-requests = "^2.31.0.20240406"

[tool.poetry.group.redis]
optional = true

[tool.poetry.group.redis.dependencies]
redis = "^5.2.1"

[tool.poetry.group.dev.dependencies]
types-python-dateutil = "^2.9.0.20240316"

[tool.poetry.scripts]
writer = 'writer.command_line:main'

[tool.poetry.extras]
redis = ["redis"]

[tool.ruff]
exclude = [
Expand Down
5 changes: 5 additions & 0 deletions src/ui/public/components/progressbar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 18 additions & 18 deletions src/ui/src/builder/BuilderApp.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="BuilderApp" tabindex="-1">
<div class="BuilderApp" tabindex="-1" :style="WDS_CSS_PROPERTIES">
<div
class="mainGrid"
:class="{ openPanels: ssbm.openPanels.value.size > 0 }"
Expand Down Expand Up @@ -81,6 +81,7 @@ import BuilderHeader from "./BuilderHeader.vue";
import BuilderTooltip from "./BuilderTooltip.vue";
import BuilderAsyncLoader from "./BuilderAsyncLoader.vue";
import BuilderPanelSwitcher from "./panels/BuilderPanelSwitcher.vue";
import { WDS_CSS_PROPERTIES } from "@/wds/tokens";
const BuilderSettings = defineAsyncComponent({
loader: () => import("./settings/BuilderSettings.vue"),
Expand Down Expand Up @@ -270,34 +271,33 @@ onMounted(() => {
@import "./sharedStyles.css";
.BuilderApp {
--builderBackgroundColor: #ffffff;
--builderAccentColor: #5551ff;
--builderSuccessColor: #3be19b;
--builderErrorColor: #ff3d00;
--builderHeaderBackgroundColor: #333333;
--builderHeaderBackgroundHoleColor: #000000;
--builderBackgroundColor: var(--wdsColorWhite);
--builderAccentColor: var(--wdsColorBlue5);
--builderSuccessColor: var(--wdsColorGreen5);
--builderErrorColor: var(--wdsColorOrange5);
--builderHeaderBackgroundColor: var(--wdsColorGray6);
--builderHeaderBackgroundHoleColor: var(--wdsColorBlack);
--builderPrimaryTextColor: rgba(0, 0, 0, 0.9);
--builderSecondaryTextColor: rgba(0, 0, 0, 0.6);
--builderAreaSeparatorColor: rgba(0, 0, 0, 0.2);
--builderSeparatorColor: #e4e7ed;
--builderSubtleSeparatorColor: #f5f5f9;
--builderIntenseSeparatorColor: #d2d4d7;
--builderSelectedColor: #e4e9ff;
--builderMatchingColor: #f8dccc;
--builderIntenseSelectedColor: #0094d1;
--builderSeparatorColor: var(--wdsColorGray2);
--builderSubtleSeparatorColor: var(--wdsColorGray1);
--builderIntenseSeparatorColor: var(--wdsColorGray3);
--builderSelectedColor: var(--wdsColorBlue2);
--builderMatchingColor: var(--wdsColorOrange2);
--builderIntenseSelectedColor: var(--wdsColorBlue4);
--builderSubtleHighlightColor: rgba(0, 0, 0, 0.05);
--builderSubtleHighlightColorSolid: #f2f2f2;
--builderDisabledColor: rgb(180, 180, 180);
--builderSubtleHighlightColorSolid: var(--wdsColorGray1);
--builderSidebarWidth: 265px;
--builderSettingsWidth: 450px;
--builderActionOngoingColor: #333333;
--builderActionOngoingColor: var(--wdsColorGray6);
--builderTopBarHeight: 48px;
--builderWarningTextColor: white;
--builderWarningColor: #ff3d00;
--builderWarningColor: var(--wdsColorOrange5);
--builderPanelSwitcherHeight: 48px;
--builderPanelSwitcherExpandedHeight: calc(50% - 24px);
--buttonColor: #5551ff;
--buttonColor: var(--wdsColorBlue5);
--buttonTextColor: white;
--accentColor: var(--builderAccentColor);
--primaryTextColor: var(--builderPrimaryTextColor);
Expand Down
5 changes: 3 additions & 2 deletions src/ui/src/builder/BuilderEmbeddedCodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ onMounted(() => {
editor = monaco.editor.create(editorContainerEl.value, {
value: modelValue.value,
language: props.language,
readOnly: props.disabled,
...VARIANTS_SETTINGS[props.variant],
});
editor.getModel().onDidChangeContent(() => {
Expand All @@ -84,11 +85,11 @@ onUnmounted(() => {
.BuilderEmbeddedCodeEditor {
height: 100%;
width: 100%;
min-height: 200px;
min-height: 100px;
}
.editorContainer {
min-height: 200px;
min-height: 100px;
width: 100%;
height: 100%;
overflow: hidden;
Expand Down
12 changes: 7 additions & 5 deletions src/ui/src/builder/BuilderHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@
<div class="undoRedo">
<button
class="undo"
:title="
:data-writer-tooltip="
undoRedoSnapshot.isUndoAvailable
? `Undo ${undoRedoSnapshot.undoDesc}`
? `Undo: ${undoRedoSnapshot.undoDesc}`
: 'Nothing to undo'
"
:disabled="!undoRedoSnapshot.isUndoAvailable"
data-writer-tooltip-placement="bottom"
@click="undo()"
>
<i class="material-symbols-outlined"> undo </i>
Undo
</button>
<button
class="redo"
:title="
:data-writer-tooltip="
undoRedoSnapshot.isRedoAvailable
? `Redo ${undoRedoSnapshot.redoDesc}`
? `Redo: ${undoRedoSnapshot.redoDesc}`
: 'Nothing to redo'
"
:disabled="!undoRedoSnapshot.isRedoAvailable"
data-writer-tooltip-placement="bottom"
@click="redo()"
>
<i class="material-symbols-outlined"> redo </i>
Expand Down Expand Up @@ -140,7 +142,7 @@ const customHandlerModalCloseAction: ModalAction = {
.panelToggler:hover {
font-size: 12px;
--buttonColor: black;
--builderSeparatorColor: #303030;
--builderSeparatorColor: var(--wdsColorGray6);
--buttonTextColor: white;
}

Expand Down
33 changes: 25 additions & 8 deletions src/ui/src/builder/BuilderModal.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<!-- eslint-disable @typescript-eslint/ban-types -->
<template>
<Teleport to="#modal">
<div class="BuilderModal" tabindex="-1" @keydown="handleKeydown">
<div
class="BuilderModal"
:class="{ 'BuilderModal--overflow': allowOverflow }"
tabindex="-1"
@keydown="handleKeydown"
>
<div class="main">
<div class="titleContainer">
<i v-if="icon" class="material-symbols-outlined">{{
Expand Down Expand Up @@ -38,19 +43,24 @@

<script setup lang="ts">
import WdsButton from "@/wds/WdsButton.vue";
import { toRefs } from "vue";
import { PropType, toRefs } from "vue";

export type ModalAction = {
desc: string;
fn: (..._args: unknown[]) => unknown;
};

const props = defineProps<{
modalTitle: string;
icon?: string;
closeAction: ModalAction;
menuActions?: ModalAction[];
}>();
const props = defineProps({
modalTitle: { type: String, required: true },
icon: { type: String, required: false, default: undefined },
closeAction: { type: Object as PropType<ModalAction>, required: true },
menuActions: {
type: Array as PropType<ModalAction[]>,
required: false,
default: undefined,
},
allowOverflow: { type: Boolean, required: false },
});

const { modalTitle, icon, closeAction, menuActions } = toRefs(props);

Expand Down Expand Up @@ -82,6 +92,10 @@ const handleKeydown = (ev: KeyboardEvent) => {
box-shadow: 0px 3px 40px 0px rgba(172, 185, 220, 0.4);
}

.BuilderModal--overflow .main {
overflow: unset;
}

.titleContainer {
border-bottom: 1px solid var(--builderSubtleSeparatorColor);
padding: 8px 8px 8px 16px;
Expand All @@ -100,6 +114,9 @@ const handleKeydown = (ev: KeyboardEvent) => {
max-height: 60vh;
overflow: auto;
}
.BuilderModal--overflow .slotContainer {
overflow: unset;
}

.actionContainer {
border-top: 1px solid var(--builderSubtleSeparatorColor);
Expand Down
Loading
Loading