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

Fix/e2e copy test #149

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
build
coverage
dist
.DS_Store
node_modules
# Local Netlify folder
.netlify

Expand Down
1 change: 1 addition & 0 deletions .pnp.cjs

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

7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
41 changes: 41 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Src unit Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"src",
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
},
{
"name": "Debug current file",
"type": "node",
"request": "launch",
"runtimeVersion": "14.15.5",
"runtimeExecutable": "yarn",
"skipFiles": [
"<node_internals>/**",
"node_modules/**"
],
"runtimeArgs": [
"--inspect-brk",
"jest",
"${fileBasenameNoExtension}",
"--runInBand",
"--debug",
"--testTimeout=60000"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
}
]
}
41 changes: 41 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"cSpell.words": [
"Unmount",
"Worktrees",
"naukar",
"worktree"
],
"javascript.preferences.importModuleSpecifier": "project-relative",
"editor.formatOnSave": true,
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#aa336d",
"activityBar.activeBorder": "#6eac34",
"activityBar.background": "#aa336d",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#6eac34",
"activityBarBadge.foreground": "#15202b",
"editorGroup.border": "#aa336d",
"panel.border": "#aa336d",
"sash.hoverBorder": "#aa336d",
"sideBar.border": "#aa336d",
"statusBar.background": "#832754",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#aa336d",
"statusBarItem.remoteBackground": "#832754",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#832754",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#83275499",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#832754"
}
2 changes: 1 addition & 1 deletion app/app-entry/components/ActivityBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function ActivityBar() {
toggleSidebar={toggleSidebar('file-browser')}
toggleNotesPalette={() => {
dispatchAction({
name: 'action::@bangle.io/core-palettes:TOGGLE_NOTES_PALETTE',
name: 'action::bangle-io-core-palettes:TOGGLE_NOTES_PALETTE',
});
}}
paletteType={paletteType}
Expand Down
4 changes: 2 additions & 2 deletions app/app-entry/editor/EmptyEditorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function EmptyEditorPage() {
hint="Switch workspace"
onClick={() => {
dispatchAction({
name: 'action::@bangle.io/core-palettes:TOGGLE_WORKSPACE_PALETTE',
name: 'action::bangle-io-core-palettes:TOGGLE_WORKSPACE_PALETTE',
});
}}
className="rounded-xl text-xs"
Expand Down Expand Up @@ -63,7 +63,7 @@ export function EmptyEditorPage() {
<button
onClick={() => {
dispatchAction({
name: 'action::@bangle.io/core-actions:NEW_NOTE_ACTION',
name: 'action::bangle-io-core-actions:NEW_NOTE_ACTION',
});
}}
className="sm:w-auto hover:bg-gray-600 rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-900 focus:outline-none flex-none w-full px-6 py-3 mt-6 ml-3 text-lg font-semibold leading-6 text-white transition-colors duration-200 bg-gray-800 border border-transparent"
Expand Down
2 changes: 1 addition & 1 deletion app/app-entry/extension-glue/PaletteManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function PaletteManager() {
});
if (focusEditor) {
dispatchAction({
name: 'action::@bangle.io/editor-core:focus-primary-editor',
name: 'action::bangle-io-editor-core:focus-primary-editor',
});
}
},
Expand Down
2 changes: 1 addition & 1 deletion app/app-entry/pages/WorkspaceNotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function WorkspaceNotFound({}) {
<button
onClick={() => {
dispatchAction({
name: 'action::@bangle.io/core-palettes:TOGGLE_WORKSPACE_PALETTE',
name: 'action::bangle-io-core-palettes:TOGGLE_WORKSPACE_PALETTE',
});
}}
className="sm:w-auto hover:bg-gray-600 rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-900 focus:outline-none flex-none w-full px-6 py-3 mt-6 ml-3 text-lg font-semibold leading-6 text-white transition-colors duration-200 bg-gray-800 border border-transparent"
Expand Down
2 changes: 1 addition & 1 deletion app/app-entry/watchers/HelpWorkspaceModified.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function HelpWorkspaceMonitor({ wsPath }) {
className="ml-3"
onClick={() => {
dispatchAction({
name: 'action::@bangle.io/core-actions:CLONE_WORKSPACE_ACTION',
name: 'action::bangle-io-core-actions:CLONE_WORKSPACE_ACTION',
value: {
resetWsName: HELP_FS_WORKSPACE_NAME,
},
Expand Down
2 changes: 1 addition & 1 deletion extensions/collab-extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { uuid } from '@bangle.dev/utils';
import { Extension, PluginMetadata } from '@bangle.io/extension-registry';
import { naukarWorkerProxy } from '@bangle.io/naukar-proxy';

const extensionName = '@bangle.io/collab-extension';
const extensionName = 'bangle-io-collab-extension';

const extension = Extension.create({
name: extensionName,
Expand Down
2 changes: 1 addition & 1 deletion extensions/collapsible-heading/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Extension } from '@bangle.io/extension-registry';

import { pluginsFactory } from './collapsible-heading-deco';

const extensionName = '@bangle.io/collapsible-heading';
const extensionName = 'bangle-io-collapsible-heading';

const extension = Extension.create({
name: extensionName,
Expand Down
2 changes: 1 addition & 1 deletion extensions/core-actions/CoreActionsHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export function CoreActionsHandler({ registerActionHandler }) {
updateInputModal({ type: undefined });
if (focusEditor) {
dispatchAction({
name: 'action::@bangle.io/editor-core:focus-primary-editor',
name: 'action::bangle-io-editor-core:focus-primary-editor',
});
}
},
Expand Down
17 changes: 8 additions & 9 deletions extensions/core-actions/config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
export const extensionName = '@bangle.io/core-actions';
export const extensionName = 'bangle-io-core-actions';

export const TOGGLE_THEME_ACTION =
'action::@bangle.io/core-actions:TOGGLE_THEME_ACTION';
'action::bangle-io-core-actions:TOGGLE_THEME_ACTION';
export const TOGGLE_FILE_SIDEBAR_ACTION =
'action::@bangle.io/core-actions:TOGGLE_FILE_SIDEBAR_COMMAND';
export const NEW_NOTE_ACTION =
'action::@bangle.io/core-actions:NEW_NOTE_ACTION';
'action::bangle-io-core-actions:TOGGLE_FILE_SIDEBAR_COMMAND';
export const NEW_NOTE_ACTION = 'action::bangle-io-core-actions:NEW_NOTE_ACTION';
export const NEW_WORKSPACE_ACTION =
'action::@bangle.io/core-actions:NEW_WORKSPACE_ACTION';
'action::bangle-io-core-actions:NEW_WORKSPACE_ACTION';
export const CLONE_WORKSPACE_ACTION =
'action::@bangle.io/core-actions:CLONE_WORKSPACE_ACTION';
'action::bangle-io-core-actions:CLONE_WORKSPACE_ACTION';
export const RENAME_ACTIVE_NOTE_ACTION =
'action::@bangle.io/core-actions:RENAME_ACTIVE_NOTE_ACTION';
'action::bangle-io-core-actions:RENAME_ACTIVE_NOTE_ACTION';
export const DELETE_ACTIVE_NOTE_ACTION =
'action::@bangle.io/core-actions:DELETE_ACTIVE_NOTE_ACTION';
'action::bangle-io-core-actions:DELETE_ACTIVE_NOTE_ACTION';
6 changes: 3 additions & 3 deletions extensions/core-palettes/ActionHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ export function ActionHandler({ registerActionHandler }) {
const actionHandler = useCallback(
(actionObject) => {
switch (actionObject.name) {
case 'action::@bangle.io/core-palettes:TOGGLE_ACTION_PALETTE': {
case 'action::bangle-io-core-palettes:TOGGLE_ACTION_PALETTE': {
updatePalette(actionPalette.type);
return true;
}

case 'action::@bangle.io/core-palettes:TOGGLE_WORKSPACE_PALETTE': {
case 'action::bangle-io-core-palettes:TOGGLE_WORKSPACE_PALETTE': {
updatePalette(workspacePalette.type);
return true;
}

case 'action::@bangle.io/core-palettes:TOGGLE_NOTES_PALETTE': {
case 'action::bangle-io-core-palettes:TOGGLE_NOTES_PALETTE': {
updatePalette(notesPalette.type);
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/core-palettes/config.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const extensionName = '@bangle.io/core-palettes';
export const extensionName = 'bangle-io-core-palettes';
12 changes: 6 additions & 6 deletions extensions/core-palettes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ const extension = Extension.create({
],
actions: [
{
name: 'action::@bangle.io/core-palettes:TOGGLE_ACTION_PALETTE',
name: 'action::bangle-io-core-palettes:TOGGLE_ACTION_PALETTE',
title: 'Action Palette',
hidden: true,
keybinding: isFirefox ? 'Mod-o' : 'Mod-P',
},
{
name: 'action::@bangle.io/core-palettes:TOGGLE_WORKSPACE_PALETTE',
name: 'action::bangle-io-core-palettes:TOGGLE_WORKSPACE_PALETTE',
title: 'Workspace Palette',
hidden: true,
keybinding: 'Ctrl-r',
},
{
name: 'action::@bangle.io/core-palettes:TOGGLE_NOTES_PALETTE',
name: 'action::bangle-io-core-palettes:TOGGLE_NOTES_PALETTE',
title: 'Notes Palette',
hidden: true,
keybinding: 'Mod-p',
Expand All @@ -52,17 +52,17 @@ const extension = Extension.create({
{
icon: <TerminalIcon style={{ transform: 'scale(0.83, 0.83)' }} />,
hint: 'Action Palette',
action: 'action::@bangle.io/core-palettes:TOGGLE_ACTION_PALETTE',
action: 'action::bangle-io-core-palettes:TOGGLE_ACTION_PALETTE',
},
{
icon: <AlbumIcon style={{ transform: 'scale(0.9, 0.9)' }} />,
hint: 'Workspace Palette',
action: 'action::@bangle.io/core-palettes:TOGGLE_WORKSPACE_PALETTE',
action: 'action::bangle-io-core-palettes:TOGGLE_WORKSPACE_PALETTE',
},
{
icon: <FileDocumentIcon style={{ transform: 'scale(0.88, 0.88)' }} />,
hint: 'Notes Palette',
action: 'action::@bangle.io/core-palettes:TOGGLE_NOTES_PALETTE',
action: 'action::bangle-io-core-palettes:TOGGLE_NOTES_PALETTE',
},
],
ReactComponent: ActionHandler,
Expand Down
10 changes: 5 additions & 5 deletions extensions/editor-core/EditorCore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ export function EditorCore({ registerActionHandler }) {
const actionHandler = useCallback(
(actionObject) => {
switch (actionObject.name) {
case 'action::@bangle.io/editor-core:focus-primary-editor': {
case 'action::bangle-io-editor-core:focus-primary-editor': {
primaryEditor?.focusView();
return true;
}

case 'action::@bangle.io/editor-core:collapse-heading': {
case 'action::bangle-io-editor-core:collapse-heading': {
executeEditorCommand(toggleHeadingCollapse);
return true;
}

case 'action::@bangle.io/editor-core:uncollapse-all-heading': {
case 'action::bangle-io-editor-core:uncollapse-all-heading': {
executeEditorCommand(uncollapseAllHeadings);
return true;
}

case 'action::@bangle.io/editor-core:move-list-up': {
case 'action::bangle-io-editor-core:move-list-up': {
executeEditorCommand(moveListItemUp);
return true;
}

case 'action::@bangle.io/editor-core:move-list-down': {
case 'action::bangle-io-editor-core:move-list-down': {
executeEditorCommand(moveListItemDown);
return true;
}
Expand Down
12 changes: 6 additions & 6 deletions extensions/editor-core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MenuComp } from './FloatingMenu';
import { getPlugins } from './plugins';
import { rawSpecs } from './spec-sheet';

const extensionName = '@bangle.io/editor-core';
const extensionName = 'bangle-io-editor-core';

const extension = Extension.create({
name: extensionName,
Expand All @@ -21,23 +21,23 @@ const extension = Extension.create({
ReactComponent: EditorCore,
actions: [
{
name: 'action::@bangle.io/editor-core:focus-primary-editor',
name: 'action::bangle-io-editor-core:focus-primary-editor',
title: 'Editor: Focus on primary editor',
},
{
name: 'action::@bangle.io/editor-core:collapse-heading',
name: 'action::bangle-io-editor-core:collapse-heading',
title: 'Editor: Collapse heading',
},
{
name: 'action::@bangle.io/editor-core:uncollapse-all-heading',
name: 'action::bangle-io-editor-core:uncollapse-all-heading',
title: 'Editor: Uncollapse all headings',
},
{
name: 'action::@bangle.io/editor-core:move-list-up',
name: 'action::bangle-io-editor-core:move-list-up',
title: 'Editor: Move list up',
},
{
name: 'action::@bangle.io/editor-core:move-list-down',
name: 'action::bangle-io-editor-core:move-list-down',
title: 'Editor: Move list down',
},
],
Expand Down
2 changes: 1 addition & 1 deletion extensions/editor-scroll-extension/config.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const extensionName = '@bangle.io/editor-scroll-extension';
export const extensionName = 'bangle-io-editor-scroll-extension';
2 changes: 1 addition & 1 deletion extensions/image-extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { imageNodeViewPlugin } from './image-node-view-plugin';
import { ImageEditorReactComponent } from './ImageEditorReactComponent';
import { renderImageReactNodeView } from './render-image-react-node-view';

const extensionName = '@bangle.io/image-extension';
const extensionName = 'bangle-io-image-extension';

const extension = Extension.create({
name: extensionName,
Expand Down
2 changes: 1 addition & 1 deletion extensions/inline-backlink/__tests__/BackLinkNode.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jest.mock('@bangle.io/workspace-context', () => {
});

const coreExtension = Extension.create({
name: '@bangle.io/core',
name: 'bangle-io-core',
editor: {
specs: defaultSpecs(),
plugins: defaultPlugins(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jest.mock('@bangle.io/workspace-context', () => {
});

const coreExtension = Extension.create({
name: '@bangle.io/core',
name: 'bangle-io-core',
editor: {
specs: defaultSpecs(),
plugins: defaultPlugins(),
Expand Down
2 changes: 1 addition & 1 deletion extensions/inline-backlink/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PluginKey } from '@bangle.dev/pm';

export const extensionName = '@bangle.io/inline-backlink';
export const extensionName = 'bangle-io-inline-backlink';
export const backLinkNodeName = 'wikiLink';
export const paletteMark = extensionName + '-paletteMark';
export const palettePluginKey = new PluginKey('inlineBacklinkPlatteKey');
Expand Down
2 changes: 1 addition & 1 deletion extensions/inline-command-palette/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PluginKey } from '@bangle.dev/pm';

export const extensionName = '@bangle.io/inline-command-palette';
export const extensionName = 'bangle-io-inline-command-palette';
export const paletteMarkName = extensionName + '-paletteMark';
export const palettePluginKey = new PluginKey(extensionName + '-key');
Loading