Skip to content

Commit

Permalink
Merge branch 'develop' into wip/gmt/12166-excel-cache-test-failure
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryTravis committed Feb 3, 2025
2 parents c42d24b + 1cb86a5 commit 6e65c3f
Show file tree
Hide file tree
Showing 97 changed files with 3,164 additions and 716 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/gui-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ permissions:
statuses: write # Write access to commit statuses
checks: write

env:
# Workaround for https://github.com/nodejs/corepack/issues/612
# See: https://github.com/nodejs/corepack/blob/main/README.md#environment-variables
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
lint:
name: 👮 Lint GUI
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/ide-packaging-optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ jobs:
- run: ./run backend get
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive project-manager
run: tar -cvf project-manager.tar -C dist/backend .
- name: Upload project-manager
uses: actions/upload-artifact@v4
with:
name: project-manager-macos
path: project-manager.tar
- name: Cleanup
run: rm project-manager.tar
- if: "(always()) && (contains(github.event.pull_request.labels.*.name, 'CI: Clean build required') || inputs.clean_build_required)"
name: Clean after
run: ./run git-clean
Expand Down Expand Up @@ -145,7 +154,15 @@ jobs:
run: ./run git-clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./run ide build --backend-source current-ci-run --gui-upload-artifact false
- name: Download project-manager
uses: actions/download-artifact@v4
with:
name: project-manager-macos
path: dist/backend
- run: |-
tar -xvf dist/backend/project-manager.tar -C dist/backend
rm dist/backend/project-manager.tar
- run: ./run ide build --backend-source local --gui-upload-artifact false
env:
APPLEID: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
APPLEIDPASS: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
Expand Down Expand Up @@ -181,6 +198,11 @@ jobs:
compression-level: 0
name: test-traces-macos-amd64
path: app/ide-desktop/client/test-traces
- name: Upload ide
uses: actions/upload-artifact@v4
with:
name: ide-macos
path: dist/ide/enso-*.dmg
- run: rm $HOME/.enso/credentials
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
63 changes: 61 additions & 2 deletions .github/workflows/ide-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ jobs:
- run: ./run backend get
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Edition File
uses: actions/upload-artifact@v4
with:
name: Edition File
path: distribution/editions/*.yaml
- name: Upload fbs-schema
uses: actions/upload-artifact@v4
with:
name: fbs-schema
path: engine/language-server/src/main/schema/
- name: Archive project-manager
run: tar -cvf project-manager.tar -C dist/backend .
- name: Upload project-manager
uses: actions/upload-artifact@v4
with:
name: project-manager-linux
path: project-manager.tar
- name: Cleanup
run: rm project-manager.tar
- if: "(always()) && (contains(github.event.pull_request.labels.*.name, 'CI: Clean build required') || inputs.clean_build_required)"
name: Clean after
run: ./run git-clean
Expand Down Expand Up @@ -92,6 +111,15 @@ jobs:
- run: ./run backend get
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive project-manager
run: tar -cvf project-manager.tar -C dist/backend .
- name: Upload project-manager
uses: actions/upload-artifact@v4
with:
name: project-manager-windows
path: project-manager.tar
- name: Cleanup
run: rm project-manager.tar
- if: "(always()) && (contains(github.event.pull_request.labels.*.name, 'CI: Clean build required') || inputs.clean_build_required)"
name: Clean after
run: ./run git-clean
Expand Down Expand Up @@ -146,6 +174,11 @@ jobs:
ENSO_IDE_SENTRY_DSN: ${{ vars.ENSO_CLOUD_SENTRY_DSN }}
ENSO_IDE_STRIPE_KEY: ${{ vars.ENSO_CLOUD_STRIPE_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload gui
uses: actions/upload-artifact@v4
with:
name: gui
path: dist/gui/
- if: "(always()) && (contains(github.event.pull_request.labels.*.name, 'CI: Clean build required') || inputs.clean_build_required)"
name: Clean after
run: ./run git-clean
Expand Down Expand Up @@ -240,7 +273,15 @@ jobs:
run: ./run git-clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./run ide build --backend-source current-ci-run --gui-upload-artifact false
- name: Download project-manager
uses: actions/download-artifact@v4
with:
name: project-manager-linux
path: dist/backend
- run: |-
tar -xvf dist/backend/project-manager.tar -C dist/backend
rm dist/backend/project-manager.tar
- run: ./run ide build --backend-source local --gui-upload-artifact false
env:
ENSO_IDE_AG_GRID_LICENSE_KEY: ${{ vars.ENSO_AG_GRID_LICENSE_KEY }}
ENSO_IDE_API_URL: ${{ vars.ENSO_CLOUD_API_URL }}
Expand Down Expand Up @@ -270,6 +311,11 @@ jobs:
compression-level: 0
name: test-traces-linux-amd64
path: app/ide-desktop/client/test-traces
- name: Upload ide
uses: actions/upload-artifact@v4
with:
name: ide-linux
path: dist/ide/enso-*.AppImage
- run: rm $HOME/.enso/credentials
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -313,7 +359,15 @@ jobs:
run: ./run git-clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./run ide build --backend-source current-ci-run --gui-upload-artifact false
- name: Download project-manager
uses: actions/download-artifact@v4
with:
name: project-manager-windows
path: dist/backend
- run: |-
tar -xvf dist/backend/project-manager.tar -C dist/backend
rm dist/backend/project-manager.tar
- run: ./run ide build --backend-source local --gui-upload-artifact false
env:
ENSO_IDE_AG_GRID_LICENSE_KEY: ${{ vars.ENSO_AG_GRID_LICENSE_KEY }}
ENSO_IDE_API_URL: ${{ vars.ENSO_CLOUD_API_URL }}
Expand Down Expand Up @@ -344,6 +398,11 @@ jobs:
compression-level: 0
name: test-traces-windows-amd64
path: app/ide-desktop/client/test-traces
- name: Upload ide
uses: actions/upload-artifact@v4
with:
name: ide-windows
path: dist/ide/enso-*.exe
- run: rm $HOME/.enso/credentials
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ permissions:
statuses: write # Write access to commit statuses

env:
# Workaround for https://github.com/nodejs/corepack/issues/612
# See: https://github.com/nodejs/corepack/blob/main/README.md#environment-variables
COREPACK_DEFAULT_TO_LATEST: 0
ENSO_BUILD_SKIP_VERSION_CHECK: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wasm-changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
files: |
.cargo/**
app/rust-ffi/**
build/**
build_tools/**
lib/rust/**
tools/language-server/logstat/**
tools/language-server/wstest/**
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [Quick Fix Import Button][12051].
- [Fixed nodes being selected after deleting other nodes or connections.][11902]
- [Redo stack is no longer lost when interacting with text literals][11908].
- [Copy button on error message is fixed][12133].
- [Tooltips are hidden when clicking on a button][12067].
- [Fixed bug when clicking header in Table Editor Widget didn't start editing
it][12064]
Expand All @@ -21,6 +22,7 @@
[12051]: https://github.com/enso-org/enso/pull/12051
[11902]: https://github.com/enso-org/enso/pull/11902
[11908]: https://github.com/enso-org/enso/pull/11908
[12133]: https://github.com/enso-org/enso/pull/12133
[12067]: https://github.com/enso-org/enso/pull/12067
[12064]: https://github.com/enso-org/enso/pull/12064
[12129]: https://github.com/enso-org/enso/pull/12129
Expand Down
11 changes: 11 additions & 0 deletions app/gui/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,14 @@ declare global {
(message: string, projectId?: string | null, metadata?: object | null): void
}
}

// Add additional types for svg imports from `#/assets/*.svg`
declare module 'vite/client' {
declare module '#/assets/*.svg' {
/**
* @deprecated Prefer defined keys over importing from `#/assets/*.svg
*/
const src: string
export default src
}
}
2 changes: 1 addition & 1 deletion app/gui/integration-test/project-view/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function expectNodePositionsInitialized(page: Page, yPos: number) {
// Wait until edges are initialized and displayed correctly.
await expect(page.getByTestId('broken-edge')).toBeHidden()
// Wait until node sizes are initialized.
await expect(locate.graphNode(page).first().locator('.bgFill')).toBeVisible()
await expect(locate.graphNode(page).first().locator('.nodeBackground')).toBeVisible()
// TODO: The yPos should not need to be a variable. Instead, first automatically positioned nodes
// should always have constant known position. This is a bug caused by incorrect layout after
// entering a function. To be fixed with #9255
Expand Down
21 changes: 14 additions & 7 deletions app/gui/integration-test/project-view/componentBrowser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,18 @@ test('Different ways of opening Component Browser', async ({ page }) => {
await locate.graphEditor(page).press('Enter')
await expectAndCancelBrowser(page, '', 'selected')
// Dragging out an edge
let outputPort = await locate.outputPortCoordinates(locate.graphNodeByBinding(page, 'selected'))
let outputPort = await locate.outputPortCoordinates(
page,
locate.graphNodeByBinding(page, 'selected'),
)
await page.mouse.click(outputPort.x, outputPort.y)
await locate.graphEditor(page).click({ position: { x: 100, y: 500 } })
await expectAndCancelBrowser(page, '', 'selected')
// Double-clicking port
// TODO[ao] Without timeout, even the first click would be treated as double due to previous
// event. Probably we need a better way to simulate double clicks.
await page.waitForTimeout(600)
outputPort = await locate.outputPortCoordinates(locate.graphNodeByBinding(page, 'selected'))
outputPort = await locate.outputPortCoordinates(page, locate.graphNodeByBinding(page, 'selected'))
await page.mouse.click(outputPort.x, outputPort.y)
await page.mouse.click(outputPort.x, outputPort.y)
await expectAndCancelBrowser(page, '', 'selected')
Expand All @@ -79,15 +82,16 @@ test('Opening Component Browser from output port buttons', async ({ page }) => {
// Small (+) button shown when node is hovered
const node = locate.graphNodeByBinding(page, 'selected')
await locate.graphNodeIcon(node).hover()
await expect(locate.createNodeFromPort(node)).toBeVisible()
await locate.createNodeFromPort(node).click({ force: true })
const createNodeFromPortButton = await locate.createNodeFromPortButton(page, node)
await expect(createNodeFromPortButton).toBeVisible()
await createNodeFromPortButton.click({ force: true })
await expectAndCancelBrowser(page, '', 'selected')

// Small (+) button shown when node is selected
await page.keyboard.press('Escape')
await node.click()
await expect(locate.createNodeFromPort(node)).toBeVisible()
await locate.createNodeFromPort(node).click({ force: true })
await expect(createNodeFromPortButton).toBeVisible()
await createNodeFromPortButton.click({ force: true })
await expectAndCancelBrowser(page, '', 'selected')
})

Expand All @@ -111,7 +115,10 @@ test('Graph Editor pans to Component Browser', async ({ page }) => {
await page.mouse.move(100, 280)
await page.mouse.up({ button: 'middle' })
await expect(locate.graphNodeByBinding(page, 'five')).toBeInViewport()
const outputPort = await locate.outputPortCoordinates(locate.graphNodeByBinding(page, 'final'))
const outputPort = await locate.outputPortCoordinates(
page,
locate.graphNodeByBinding(page, 'final'),
)
await page.mouse.click(outputPort.x, outputPort.y)
await locate.graphEditor(page).click({ position: { x: 100, y: 1700 } })
await expect(locate.graphNodeByBinding(page, 'five')).not.toBeInViewport()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ test('Conditional ports: Disabled', async ({ page }) => {

// When a port is disabled, it doesn't react to hovering with a disconnected edge,
// and any attempt to connect to it should open the CB.
const outputPort = await outputPortCoordinates(graphNodeByBinding(page, 'final'))
const outputPort = await outputPortCoordinates(page, graphNodeByBinding(page, 'final'))
await page.mouse.click(outputPort.x, outputPort.y)
await conditionalPort.hover()
await expect(conditionalPort).not.toHaveClass(/isTarget/)
Expand All @@ -101,7 +101,7 @@ test('Conditional ports: Enabled', async ({ page }) => {
await page.keyboard.down(CONTROL_KEY)

await expect(conditionalPort).toHaveClass(/enabled/)
const outputPort = await outputPortCoordinates(graphNodeByBinding(page, 'final'))
const outputPort = await outputPortCoordinates(page, graphNodeByBinding(page, 'final'))
await page.mouse.click(outputPort.x, outputPort.y)
await conditionalPort.hover()
await expect(conditionalPort).toHaveClass(/isTarget/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test('Node can open and load visualization', async ({ page }) => {
test('Previewing visualization', async ({ page }) => {
await actions.goToGraph(page)
const node = locate.graphNode(page).last()
const port = await locate.outputPortCoordinates(node)
const port = await locate.outputPortCoordinates(page, node)
await page.keyboard.down('Meta')
await page.keyboard.down('Control')
await expect(locate.anyVisualization(page)).toBeHidden()
Expand Down
16 changes: 13 additions & 3 deletions app/gui/integration-test/project-view/locate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export const componentMenu = componentLocator('.ComponentMenu')
export const addNewNodeButton = componentLocator('.PlusButton')
export const componentBrowser = componentLocator('.ComponentBrowser')
export const nodeOutputPort = componentLocator('.outputPortHoverArea')
export const createNodeFromPort = componentLocator('.CreateNodeFromPortButton .plusIcon')
export const editorRoot = componentLocator('.CodeMirror')
export const nodeComment = componentLocator('.GraphNodeComment')
export const nodeCommentContent = componentLocator('.GraphNodeComment div[contentEditable]')
Expand Down Expand Up @@ -185,11 +184,22 @@ export async function edgesToNode(page: Page, node: Locator) {
* Returns a location that can be clicked to activate an output port.
* Using a `Locator` would be better, but `position` option of `click` doesn't work.
*/
export async function outputPortCoordinates(node: Locator) {
const outputPortArea = await node.locator('.outputPortHoverArea').boundingBox()
export async function outputPortCoordinates(page: Page, node: Locator) {
const nodeId = await node.getAttribute('data-node-id')
const outputPortArea = await page
.locator(`.GraphNodeOutputPorts[data-output-ports-node-id="${nodeId}"] .outputPortHoverArea`)
.boundingBox()
expect(outputPortArea).not.toBeNull()
assert(outputPortArea)
const centerX = outputPortArea.x + outputPortArea.width / 2
const bottom = outputPortArea.y + outputPortArea.height
return { x: centerX, y: bottom - 2.0 }
}

/** Returns a locator for the create node from port button. */
export async function createNodeFromPortButton(page: Page, node: Locator) {
const nodeId = await node.getAttribute('data-node-id')
return page.locator(
`.GraphNodeOutputPorts[data-output-ports-node-id="${nodeId}"] .CreateNodeFromPortButton .plusIcon`,
)
}
2 changes: 1 addition & 1 deletion app/gui/scripts/generateIconMetadata.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ await fs.writeFile(
// Please run \`bazel run //:write_all\` to regenerate this file whenever \`icons.svg\` is changed.
/** All icon names present in icons.svg. */
const iconNames = [
export const iconNames = [
${iconNames?.map((name) => ` '${name}',`).join('\n')}
] as const
Expand Down
3 changes: 2 additions & 1 deletion app/gui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ProjectView from '@/ProjectView.vue'
import { provideAppClassSet } from '@/providers/appClass'
import { provideGuiConfig } from '@/providers/guiConfig'
import { provideTooltipRegistry } from '@/providers/tooltipRegistry'
import { registerAutoBlurHandler } from '@/util/autoBlur'
import { registerAutoBlurHandler, registerGlobalBlurHandler } from '@/util/autoBlur'
import { baseConfig, configValue, mergeConfig, type ApplicationConfigValue } from '@/util/config'
import { urlParams } from '@/util/urlParams'
import { useQueryClient } from '@tanstack/vue-query'
Expand Down Expand Up @@ -38,6 +38,7 @@ const queryClient = useQueryClient()
provideGuiConfig(appConfigValue)
registerAutoBlurHandler()
registerGlobalBlurHandler()
onMounted(() => {
if (appConfigValue.value.window.vibrancy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { expect, userEvent, within } from '@storybook/test'
import { Button, type BaseButtonProps } from '.'
import { Badge } from '../../Badge'

type Story = StoryObj<BaseButtonProps<aria.ButtonRenderProps>>
type Story = StoryObj<BaseButtonProps<string, aria.ButtonRenderProps>>

const variants = [
'primary',
Expand Down Expand Up @@ -40,7 +40,7 @@ export default {
addonStart: { control: false },
addonEnd: { control: false },
},
} as Meta<BaseButtonProps<aria.ButtonRenderProps>>
} satisfies Meta<BaseButtonProps<string, aria.ButtonRenderProps>>

export const Variants: Story = {
render: () => (
Expand Down
Loading

0 comments on commit 6e65c3f

Please sign in to comment.