mirror of
https://github.com/enso-org/enso.git
synced 2024-11-30 17:44:58 +03:00
9cf4847a34
- Close https://github.com/enso-org/cloud-v2/issues/982 - Add keyboard navigation via arrows between different components - This is achieved by a `Navigator2D` class which keeps track of the closest adjacent elements. Other changes: - Switch much of the codebase to use `react-aria-components` - This *should* (but does not necessarily) give us improved accessibility for free. - Refactor various common styles into styled components - `FocusArea` to perform automatic registration with `Navigator2D` - `Button` and `UnstyledButton` to let buttons participate in keyboard navigation - `HorizontalMenuBar` - used for buttons below the titles in the Drive page, Keyboard Shortcuts settings page, and Members List settings page - `SettingsPage` in the settings pages - `SettingsSection` in the settings page to wrap around `FocusArea` and the heading for each section - Add debugging utilities - Add debugging when `body` has the `data-debug` attribute: `document.body.dataset.debug = ''` - This adds rings around elements (all with different colors): - That are `FocusArea`s. `FocusArea` is a wrapper component that makes an element participate in `Navigator2D`. - That are `:focus`ed, and that are `:focus-visible` - That are `.focus-child`. This is because keyboard navigation via arrows ***ignores*** all focusable elements that are not `.focus-child`. - Debug `Navigator2D` neighbors when `body` has the `debug-navigator2d` attribute: `document.body.dataset.debugNavigator2d = ''` - This highlights neighbors of the currently focused element. This is a separate debug option because computing neighbors is potentially quite expensive. # Important Notes - ⚠️ Modals and the authentication flow are not yet fully tested. - Up+Down to navigate through suggestions has been disabled to improve UX when accidentally navigating upwards to the assets search bar. - There are a number of *known* issues with keyboard navigation. For the most part it's because a proper solution will be quite difficult. - Focus is lost when a column (from the extra columns selector) is toggled - because the button stops existing - It's not possible to navigate to the icons on the assets table - so it's current not possible to *hide* columns via the keyboard - Neighbors of the extra columns selector are not ideal (both when it is being navigated from, and when it is being navigated to) - The suggestions in the `AssetSearchBar` aren't *quite* fully integrated with arrow keyboard navigation. - This is *semi*-intentional. I think it makes a lot more sense to integrate them in, *however* it stays like this for now largely because I think pressing `ArrowUp` then `ArrowDown` from the assets table should return to the assets table - Likewise for the assets table. The reason here, however, is because we want multi-select. While `react-aria-components` has lists which support multi-select, it doesn't allow programmatic focus control, making it not particularly ideal, as we want to focus the topmost element when navigating in from above. - Clicking on the "New Folder" icon (and the like) do not focus on the newly created child. This one should be pretty easy to do, but I'm not sure whether it's the right thing to do.
105 lines
3.3 KiB
JSON
105 lines
3.3 KiB
JSON
{
|
|
"name": "enso-dashboard",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"main": "./src/index.tsx",
|
|
"private": true,
|
|
"imports": {
|
|
"#/*": "./src/*"
|
|
},
|
|
"exports": {
|
|
".": "./src/index.tsx",
|
|
"./tailwind.config": "./tailwind.config.js",
|
|
"./src/platform": "./src/platform.ts",
|
|
"./src/tailwind.css": "./src/tailwind.css"
|
|
},
|
|
"scripts": {
|
|
"compile": "tsc",
|
|
"typecheck": "tsc --noEmit",
|
|
"build": "vite build",
|
|
"dev": "vite",
|
|
"dev:e2e": "vite -c vite.test.config.ts",
|
|
"test": "npm run test:unit && npm run test:e2e",
|
|
"test:unit": "vitest run",
|
|
"test:unit:debug": "vitest",
|
|
"test:e2e": "cross-env NODE_ENV=production playwright test",
|
|
"test:e2e:debug": "cross-env NODE_ENV=production playwright test --ui"
|
|
},
|
|
"//": [
|
|
"@fortawesome/fontawesome-svg-core is required as a peer dependency for @fortawesome/react-fontawesome"
|
|
],
|
|
"dependencies": {
|
|
"@aws-amplify/auth": "5.6.5",
|
|
"@aws-amplify/core": "5.8.5",
|
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
|
"@fortawesome/free-brands-svg-icons": "^6.4.2",
|
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
"@monaco-editor/react": "4.6.0",
|
|
"@sentry/react": "^7.74.0",
|
|
"@tanstack/react-query": "^5.27.5",
|
|
"ajv": "^8.12.0",
|
|
"clsx": "^1.1.1",
|
|
"enso-common": "^1.0.0",
|
|
"is-network-error": "^1.0.1",
|
|
"monaco-editor": "0.47.0",
|
|
"react": "^18.2.0",
|
|
"react-aria": "^3.32.1",
|
|
"react-aria-components": "^1.1.1",
|
|
"react-dom": "^18.2.0",
|
|
"react-router-dom": "^6.8.1",
|
|
"react-stately": "^3.30.1",
|
|
"react-toastify": "^9.1.3",
|
|
"tailwind-merge": "^2.2.1",
|
|
"tiny-invariant": "^1.3.3",
|
|
"ts-results": "^3.3.0",
|
|
"validator": "^13.11.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/plugin-syntax-import-assertions": "^7.23.3",
|
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
"@fast-check/vitest": "^0.0.8",
|
|
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
|
|
"@modyfi/vite-plugin-yaml": "^1.0.4",
|
|
"@playwright/experimental-ct-react": "^1.40.0",
|
|
"@playwright/test": "^1.40.0",
|
|
"@react-types/shared": "^3.22.1",
|
|
"@types/node": "^20.11.21",
|
|
"@types/react": "^18.0.27",
|
|
"@types/react-dom": "^18.0.10",
|
|
"@types/validator": "^13.11.7",
|
|
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
|
"@typescript-eslint/parser": "^6.7.2",
|
|
"@vitejs/plugin-react": "^4.2.1",
|
|
"chalk": "^5.3.0",
|
|
"cross-env": "^7.0.3",
|
|
"enso-chat": "git://github.com/enso-org/enso-bot",
|
|
"esbuild": "^0.19.3",
|
|
"esbuild-plugin-inline-image": "^0.0.9",
|
|
"esbuild-plugin-time": "^1.0.0",
|
|
"esbuild-plugin-yaml": "^0.0.1",
|
|
"eslint": "^8.49.0",
|
|
"eslint-plugin-jsdoc": "^46.8.1",
|
|
"eslint-plugin-react": "^7.32.1",
|
|
"fast-check": "^3.15.0",
|
|
"playwright": "^1.38.0",
|
|
"postcss": "^8.4.29",
|
|
"prettier-plugin-tailwindcss": "^0.5.11",
|
|
"react-toastify": "^9.1.3",
|
|
"tailwindcss": "^3.4.1",
|
|
"tailwindcss-react-aria-components": "^1.1.1",
|
|
"ts-plugin-namespace-auto-import": "^1.0.0",
|
|
"typescript": "~5.2.2",
|
|
"vite": "^4.4.9",
|
|
"vitest": "^1.3.1"
|
|
},
|
|
"optionalDependencies": {
|
|
"@esbuild/darwin-x64": "^0.17.15",
|
|
"@esbuild/linux-x64": "^0.17.15",
|
|
"@esbuild/windows-x64": "^0.17.15"
|
|
},
|
|
"overrides": {
|
|
"@aws-amplify/auth": "../_IGNORED_",
|
|
"react-native-url-polyfill": "../_IGNORED_"
|
|
}
|
|
}
|