Skip to content

Commit

Permalink
Merge branch 'develop' into wip/hubert/copying-opt-2
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertp committed Aug 20, 2024
2 parents e24591a + 22263e8 commit 012ec82
Show file tree
Hide file tree
Showing 58 changed files with 1,835 additions and 1,338 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
#### Enso IDE

- [Table Editor Widget][10774] displayed in `Table.new` component.
- [New design of Component Browser][10814] - the component list is under the
input and shown only in the initial "component browsing" mode - after picking
any suggestion with Tab or new button the mode is switched to "code editing",
where visualization preview is displayed instead.
- [Drilldown for XML][10824]

[10774]: https://github.com/enso-org/enso/pull/10774
[10814]: https://github.com/enso-org/enso/pull/10814
[10824]: https://github.com/enso-org/enso/pull/10824

#### Enso Standard Library

Expand Down
18 changes: 6 additions & 12 deletions app/gui2/e2e/componentBrowser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ test('Graph Editor pans to Component Browser', async ({ page }) => {
// Dragging out an edge to the bottom of the viewport; when the CB pans into view, some nodes are out of view.
await page.mouse.move(100, 1100)
await page.mouse.down({ button: 'middle' })
await page.mouse.move(100, 80)
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'))
Expand Down Expand Up @@ -240,14 +240,10 @@ test('Visualization preview: type-based visualization selection', async ({ page
await expect(locate.componentBrowser(page)).toExist()
await expect(locate.componentBrowserEntry(page)).toExist()
const input = locate.componentBrowserInput(page).locator('input')
await input.fill('4')
await expect(input).toHaveValue('4')
await expect(locate.jsonVisualization(page)).toExist()
await input.fill('Table.ne')
await expect(input).toHaveValue('Table.ne')
// The table visualization is not currently working with `executeExpression` (#9194), but we can test that the JSON
// visualization is no longer selected.
await expect(locate.jsonVisualization(page)).toBeHidden()
await locate.componentBrowser(page).getByTestId('switchToEditMode').click()
await expect(locate.tableVisualization(page)).toBeVisible()
await page.keyboard.press('Escape')
await expect(locate.componentBrowser(page)).toBeHidden()
await expect(locate.graphNode(page)).toHaveCount(nodeCount)
Expand All @@ -258,17 +254,15 @@ test('Visualization preview: user visualization selection', async ({ page }) =>
const nodeCount = await locate.graphNode(page).count()
await locate.addNewNodeButton(page).click()
await expect(locate.componentBrowser(page)).toExist()
await expect(locate.componentBrowserEntry(page)).toExist()
const input = locate.componentBrowserInput(page).locator('input')
await input.fill('4')
await expect(input).toHaveValue('4')
await expect(locate.jsonVisualization(page)).toExist()
await locate.componentBrowser(page).getByTestId('switchToEditMode').click()
await expect(locate.jsonVisualization(page)).toBeVisible()
await expect(locate.jsonVisualization(page)).toContainText('"visualizedExpr": "4"')
await locate.toggleVisualizationSelectorButton(page).click()
await page.getByRole('button', { name: 'Table' }).click()
// The table visualization is not currently working with `executeExpression` (#9194), but we can test that the JSON
// visualization is no longer selected.
await expect(locate.jsonVisualization(page)).toBeHidden()
await expect(locate.tableVisualization(page)).toBeVisible()
await page.keyboard.press('Escape')
await expect(locate.componentBrowser(page)).toBeHidden()
await expect(locate.graphNode(page)).toHaveCount(nodeCount)
Expand Down
1 change: 0 additions & 1 deletion app/gui2/e2e/edgeRendering.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ test('Existence of edges between nodes', async ({ page }) => {
async function initGraph(page: Page) {
await actions.goToGraph(page)
await actions.dragNodeByBinding(page, 'ten', 400, 0)
await actions.deselectNodes(page)
}

/**
Expand Down
3 changes: 2 additions & 1 deletion app/gui2/src/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ export const interactionBindings = defineKeybinds('current-interaction', {
})

export const componentBrowserBindings = defineKeybinds('component-browser', {
applySuggestion: ['Tab'],
applySuggestionAndSwitchToEditMode: ['Tab'],
acceptSuggestion: ['Enter'],
acceptCode: ['Enter'],
acceptInput: ['Mod+Enter'],
acceptAIPrompt: ['Tab', 'Enter'],
moveUp: ['ArrowUp'],
Expand Down
Loading

0 comments on commit 012ec82

Please sign in to comment.