Skip to content

Commit

Permalink
Merge branch 'develop' into wip/akirathan/7138-lazy-field-so-debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Feb 13, 2025
2 parents e6242ae + 595e0a8 commit 843198a
Show file tree
Hide file tree
Showing 204 changed files with 6,556 additions and 3,092 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/engine-changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
any_changed:
description: "Returns `true` when any of the filenames have changed"
value: ${{ jobs.engine-changed-files.outputs.any_changed }}
stdlib_api_any_changed:
description: "Returns `true` when any of the Standard library API filenames have changed"
value: ${{ jobs.stdlib-api-changed-files.outputs.any_changed }}

jobs:
engine-changed-files:
Expand Down Expand Up @@ -53,3 +56,29 @@ jobs:
for file in ${ALL_CHANGED_FILES}; do
echo "$file"
done
stdlib-api-changed-files:
runs-on: ubuntu-latest
name: Changed Standard libs API docs files
outputs:
all_changed_files: ${{ steps.stdlib-api-changed-files.outputs.all_changed_files }}
any_changed: ${{ steps.stdlib-api-changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: stdlib-api-changed-files
uses: tj-actions/changed-files@v45
with:
files: |
distribution/lib/Standard/**/docs/api/**.md
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.stdlib-api-changed-files.outputs.all_changed_files }}
run: |
if [[ "${{ steps.stdlib-api-changed-files.outputs.any_changed }}" == "true" ]]; then
echo "API docs files changed:"
fi
for file in ${ALL_CHANGED_FILES}; do
echo "$file"
done
41 changes: 41 additions & 0 deletions .github/workflows/engine-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,47 @@ jobs:
GRAAL_EDITION: GraalVM CE
permissions:
checks: write
enso-build-ci-gen-job-standard-library-api-check-linux-amd64:
name: Standard Library API check (linux, amd64)
runs-on:
- self-hosted
- Linux
steps:
- if: runner.os == 'Windows'
name: Setup required bazel environment
run: "\n\"BAZEL_SH=C:\\Program Files\\Git\\bin\\bash.exe\" >> $env:GITHUB_ENV\n\"BAZEL_VC=C:\\BuildTools\\VC\" >> $env:GITHUB_ENV\n "
shell: pwsh
- name: Setup bazel environment
uses: bazel-contrib/[email protected]
with:
bazelrc: build --remote_cache=grpcs://${{ vars.ENSO_BAZEL_CACHE_URI }} --remote_cache_header="authorization=Basic ${{ secrets.ENSO_BAZEL_CACHE_TOKEN }}"
output-base: ${{ runner.os == 'Windows' && 'c:/_bazel' || '' }}
- name: Expose Artifact API and context information.
uses: actions/github-script@v7
with:
script: "\n core.exportVariable(\"ACTIONS_RUNTIME_TOKEN\", process.env[\"ACTIONS_RUNTIME_TOKEN\"])\n core.exportVariable(\"ACTIONS_RUNTIME_URL\", process.env[\"ACTIONS_RUNTIME_URL\"])\n core.exportVariable(\"GITHUB_RETENTION_DAYS\", process.env[\"GITHUB_RETENTION_DAYS\"])\n console.log(context)\n "
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
submodules: recursive
- name: Build Script Setup
run: ./run --help || (git clean -ffdx && ./run --help)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: "(contains(github.event.pull_request.labels.*.name, 'CI: Clean build required') || inputs.clean_build_required)"
name: Clean before
run: ./run git-clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./run backend stdlib-api-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: "(always()) && (contains(github.event.pull_request.labels.*.name, 'CI: Clean build required') || inputs.clean_build_required)"
name: Clean after
run: ./run git-clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
enso-build-ci-gen-job-standard-library-tests-graal-vm-ce-linux-amd64:
name: Standard Library Tests (GraalVM CE) (linux, amd64)
runs-on:
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/engine-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

permissions:
checks: write
pull-requests: write

jobs:
engine-changed-files:
Expand All @@ -35,10 +36,22 @@ jobs:
if: needs.engine-changed-files.outputs.any_changed == 'true' || github.ref == 'refs/heads/develop'
secrets: inherit

stdlib-api-changes-label:
name: 🏷 Append Standard library API change label
runs-on: ubuntu-latest
needs: [engine-changed-files]
if: needs.engine-changed-files.outputs.stdlib_api_any_changed == 'true'
steps:
- name: Add label to the PR
uses: actions-ecosystem/action-add-labels@v1
with:
labels: "-libs-API-change"
github_token: ${{ secrets.GITHUB_TOKEN }}

required-checks:
name: Engine Required Checks
runs-on: ubuntu-latest
needs: [engine-checks]
needs: [engine-checks, stdlib-api-changes-label]
if: always()
steps:
- name: Checks Summary
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
- [Users having "Team" plan or above may now access shared directories in Cloud
File Browser][12208]
- [Added support for rendering numbered and nested lists][12190].
- [Added buttons for editing top-level markdown elements in the documentation
panel][12217].
- [Removed `#` from default colum name][12222]

[11889]: https://github.com/enso-org/enso/pull/11889
Expand All @@ -34,6 +36,7 @@
[12208]: https://github.com/enso-org/enso/pull/12208
[12190]: https://github.com/enso-org/enso/pull/12190
[12222]: https://github.com/enso-org/enso/pull/12222
[12217]: https://github.com/enso-org/enso/pull/12217

#### Enso Standard Library

Expand All @@ -47,12 +50,16 @@
- In `Delimited` format, the `keep_invalid_rows` setting has been renamed to
`on_invalid_rows`. The default behaviour was also changed to add any extra
columns instead of discarding them.
- [Added DB_Table.Offset for SQLServer][12206]
- [Added DB_Table.Offset for Snowflake, Postgres, SQLite][12251]

[11926]: https://github.com/enso-org/enso/pull/11926
[12031]: https://github.com/enso-org/enso/pull/12031
[12071]: https://github.com/enso-org/enso/pull/12071
[12092]: https://github.com/enso-org/enso/pull/12092
[12231]: https://github.com/enso-org/enso/pull/12231
[12206]: https://github.com/enso-org/enso/pull/12206
[12251]: https://github.com/enso-org/enso/pull/12251

#### Enso Language & Runtime

Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions app/gui/src/dashboard/layouts/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import * as reactQuery from '@tanstack/react-query'
import * as React from 'react'
import { useTimeoutCallback } from '../hooks/timeoutHooks'
// eslint-disable-next-line no-restricted-syntax
import ProjectViewTabVue from '@/ProjectViewTab.vue'
import type ProjectViewTabVue from '@/ProjectViewTab.vue'
import { lazy } from 'react'
import { applyPureVueInReact } from 'veaury'
import type { AllowedComponentProps, VNodeProps } from 'vue'
import type { ComponentProps } from 'vue-component-type-helpers'
Expand All @@ -24,11 +25,13 @@ export type ProjectViewTabProps = Omit<
keyof AllowedComponentProps | keyof VNodeProps
>

// applyPureVuewInReact returns Function, but this is not enough to satisfy TSX.
// eslint-disable-next-line no-restricted-syntax
const ProjectViewTab = applyPureVueInReact(ProjectViewTabVue) as (
props: ProjectViewTabProps,
) => JSX.Element
const ProjectViewTab = lazy(() =>
import('@/ProjectViewTab.vue').then((module) => ({
// applyPureVuewInReact returns Function, but this is not enough to satisfy TSX.
// eslint-disable-next-line no-restricted-syntax, @typescript-eslint/no-unsafe-member-access
default: applyPureVueInReact(module.default) as (props: ProjectViewTabProps) => JSX.Element,
})),
)

/** Props for an {@link Editor}. */
export interface EditorProps {
Expand Down
15 changes: 8 additions & 7 deletions app/gui/src/dashboard/pages/dashboard/DashboardTabPanels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ import { Suspense } from '#/components/Suspense'
import { useEventCallback } from '#/hooks/eventCallbackHooks'
import { useOpenProjectMutation, useRenameProjectMutation } from '#/hooks/projectHooks'
import type { AssetManagementApi } from '#/layouts/AssetsTable'
import Drive from '#/layouts/Drive'
import Editor from '#/layouts/Editor'
import Settings from '#/layouts/Settings'
import { useLaunchedProjects, usePage } from '#/providers/ProjectsProvider'
import type { ProjectId } from '#/services/Backend'
import type { ReactNode } from 'react'
import { lazy, type ReactNode } from 'react'
import { Collection } from 'react-aria-components'

/** The props for the {@link DashboardTabPanels} component. */
Expand All @@ -22,6 +19,10 @@ export interface DashboardTabPanelsProps {
readonly assetManagementApiRef: React.RefObject<AssetManagementApi> | null
}

const LazyDrive = lazy(() => import('#/layouts/Drive'))
const LazyEditor = lazy(() => import('#/layouts/Editor'))
const LazySettings = lazy(() => import('#/layouts/Settings'))

/** The tab panels for the dashboard page. */
export function DashboardTabPanels(props: DashboardTabPanelsProps) {
const { initialProjectName, ydocUrl, assetManagementApiRef } = props
Expand All @@ -48,7 +49,7 @@ export function DashboardTabPanels(props: DashboardTabPanelsProps) {
shouldForceMount: true,
className: 'flex min-h-0 grow [&[data-inert]]:hidden',
children: (
<Drive
<LazyDrive
assetsManagementApiRef={assetManagementApiRef}
hidden={page !== 'drive'}
initialProjectName={initialProjectName}
Expand All @@ -61,7 +62,7 @@ export function DashboardTabPanels(props: DashboardTabPanelsProps) {
shouldForceMount: true,
className: 'flex min-h-0 grow [&[data-inert]]:hidden',
children: (
<Editor
<LazyEditor
hidden={page !== project.id}
ydocUrl={ydocUrl}
project={project}
Expand All @@ -77,7 +78,7 @@ export function DashboardTabPanels(props: DashboardTabPanelsProps) {
{
id: 'settings',
className: 'flex min-h-0 grow',
children: <Settings />,
children: <LazySettings />,
},
]

Expand Down
57 changes: 17 additions & 40 deletions app/gui/src/project-view/components/DocumentationEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const emit = defineEmits<{
'update:fullscreen': [boolean]
}>()
const toolbarElement = ref<HTMLElement>()
const markdownEditor = ref<ComponentInstance<typeof MarkdownEditor>>()
const graphStore = useGraphStore()
Expand Down Expand Up @@ -72,25 +71,23 @@ const handler = documentationEditorBindings.handler({

<template>
<WithFullscreenMode :fullscreen="fullscreen" @update:animating="fullscreenAnimating = $event">
<div class="DocumentationEditor">
<div ref="toolbarElement" class="toolbar">
<FullscreenButton v-model="fullscreen" />
<SvgButton name="image" title="Insert image" @click.stop="tryUploadImageFile()" />
</div>
<slot name="belowToolbar" />
<div
class="scrollArea"
@keydown="handler"
@dragover.prevent
@drop.prevent="tryUploadDroppedImage($event)"
>
<MarkdownEditor
ref="markdownEditor"
:content="yText"
:transformImageUrl="transformImageUrl"
:toolbarContainer="toolbarElement"
/>
</div>
<div
class="DocumentationEditor"
@keydown="handler"
@dragover.prevent
@drop.prevent="tryUploadDroppedImage($event)"
>
<MarkdownEditor ref="markdownEditor" :content="yText" :transformImageUrl="transformImageUrl">
<template #toolbarLeft>
<FullscreenButton v-model="fullscreen" />
</template>
<template #toolbarRight>
<SvgButton name="image" title="Insert image" @click.stop="tryUploadImageFile()" />
</template>
<template #belowToolbar>
<slot name="belowToolbar" />
</template>
</MarkdownEditor>
</div>
</WithFullscreenMode>
</template>
Expand All @@ -103,24 +100,4 @@ const handler = documentationEditorBindings.handler({
height: 100%;
width: 100%;
}
.scrollArea {
width: 100%;
overflow-y: auto;
padding-left: 10px;
/* Prevent touchpad back gesture, which can be triggered while panning. */
overscroll-behavior-x: none;
flex-grow: 1;
}
.toolbar {
height: 48px;
padding-left: 16px;
flex-shrink: 0;
display: flex;
align-items: center;
flex-direction: row;
gap: 8px;
}
</style>
13 changes: 11 additions & 2 deletions app/gui/src/project-view/components/MarkdownEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as Y from 'yjs'
const props = defineProps<{
content: Y.Text | string
transformImageUrl?: UrlTransformer
toolbarContainer: HTMLElement | undefined
}>()
const inner = ref<ComponentInstance<typeof LazyMarkdownEditor>>()
Expand All @@ -34,6 +33,16 @@ defineExpose({

<template>
<Suspense>
<LazyMarkdownEditor ref="inner" v-bind="props" class="MarkdownEditor" />
<LazyMarkdownEditor ref="inner" v-bind="props">
<template #toolbarLeft>
<slot name="toolbarLeft" />
</template>
<template #toolbarRight>
<slot name="toolbarRight" />
</template>
<template #belowToolbar>
<slot name="belowToolbar" />
</template>
</LazyMarkdownEditor>
</Suspense>
</template>
Loading

0 comments on commit 843198a

Please sign in to comment.