Skip to content

Commit

Permalink
3.7.3 (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
JensAstrup authored Nov 30, 2024
2 parents 3b0fbb9 + cc05675 commit 1447e42
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 281 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=3.7.2
VERSION=3.7.3
CHANGELOG_VERSION=3.0.1
GOOGLE_MEASUREMENT_ID="G-SN6JNMXND2"
PROXY_URL=https://monkfish-app-4bylm.ondigitalocean.app
Expand Down
2 changes: 0 additions & 2 deletions src/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ <h3 class="text-lg font-bold text-white mb-2">Keyboard Shortcuts</h3>
<kbd class="kbd">Cmd</kbd> + <kbd class="kbd">Shift</kbd> + <kbd class="kbd">S</kbd> - Change State<br>
<kbd class="kbd">Cmd</kbd> + <kbd class="kbd">Shift</kbd> + <kbd class="kbd">I</kbd> - Change Iteration<br>
<kbd class="kbd">Cmd</kbd> + <kbd class="kbd">Shift</kbd> + <kbd class="kbd">E</kbd> - Change Estimate<br>
<kbd class="kbd">Cmd</kbd> + <kbd class="kbd">Shift</kbd> + <kbd class="kbd">G</kbd> - Copy Branch Name<br>
<kbd class="kbd">Cmd</kbd> + <kbd class="kbd">Shift</kbd> + <kbd class="kbd">.</kbd> - Copy Branch & Move to In Development<br>
</div>
<div class="divider"></div>
<div class="text-center mb-4">
Expand Down
4 changes: 0 additions & 4 deletions src/js/content-scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { CycleTime } from './cycle-time/cycle-time'
import { DevelopmentTime } from './development-time/development-time'
import changeIteration from './keyboard-shortcuts/change-iteration'
import changeState from './keyboard-shortcuts/change-state'
import copyGitBranch from './keyboard-shortcuts/copy-git-branch'
import { KeyboardShortcuts } from './keyboard-shortcuts/keyboard-shortcuts'
import { NotesButton } from './notes/notes-button'
import { Todoist } from './todoist/todoist'
Expand Down Expand Up @@ -70,9 +69,6 @@ export async function handleMessage(request: { message: string, url: string }):
if (request.message === 'change-iteration') {
await changeIteration()
}
if (request.message === 'copy-git-branch') {
await copyGitBranch()
}
}

chrome.runtime.onMessage.addListener(handleMessage)
25 changes: 0 additions & 25 deletions src/js/keyboard-shortcuts/copy-branch-move-to-in-development.ts

This file was deleted.

21 changes: 0 additions & 21 deletions src/js/keyboard-shortcuts/copy-git-branch.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/js/keyboard-shortcuts/keyboard-shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import camelToSnake from '../utils/camel-to-snake'
import changeEstimate from './change-estimate'
import changeIteration from './change-iteration'
import changeState from './change-state'
import copyBranchAndMoveToInDevelopment from './copy-branch-move-to-in-development'
import copyGitBranch from './copy-git-branch'


export type shortcut = ({
Expand All @@ -22,14 +20,10 @@ export class KeyboardShortcuts {
{ key: 's', shiftKey: true, metaKey: true, func: changeState },
{ key: 'i', shiftKey: true, metaKey: true, func: changeIteration },
{ key: 'e', shiftKey: true, metaKey: true, func: changeEstimate },
{ key: 'g', shiftKey: true, metaKey: true, func: copyGitBranch },
{ key: '.', shiftKey: true, metaKey: true, func: copyBranchAndMoveToInDevelopment },
// Windows
{ key: 's', shiftKey: true, ctrlKey: true, func: changeState },
{ key: 'i', shiftKey: true, ctrlKey: true, func: changeIteration },
{ key: 'e', shiftKey: true, ctrlKey: true, func: changeEstimate },
{ key: 'g', shiftKey: true, ctrlKey: true, func: copyGitBranch },
{ key: '.', shiftKey: true, ctrlKey: true, func: copyBranchAndMoveToInDevelopment }
]

shortcuts: Map<string, () => Promise<void>>
Expand Down
3 changes: 0 additions & 3 deletions src/js/service-worker/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ export async function handleCommands(command: string): Promise<void> {
else if (command === 'change-iteration') {
await chrome.tabs.sendMessage(activeTab.id, { message: 'change-iteration' })
}
else if (command === 'copy-git-branch') {
await chrome.tabs.sendMessage(activeTab.id, { message: 'copy-git-branch' })
}
}

export { handleGetSavedNotes }
Expand Down
16 changes: 1 addition & 15 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@
},
"description": "Update the state of the current story"
},
"copy-git-branch": {
"suggested_key": {
"default": "Ctrl+G",
"mac": "Command+G"
},
"description": "Copy the current story's git branch"
},
"copy-git-branch-and-update": {
"suggested_key": {
"default": "Ctrl+Shift+G",
"mac": "Command+Shift+G"
},
"description": "Copy the current story's git branch and update the story's state to 'In Progress'"
},
"change-iteration": {
"suggested_key": {
"default": "Ctrl+Shift+I",
Expand Down Expand Up @@ -82,5 +68,5 @@
"storage",
"tabs"
],
"version": "3.7.2"
"version": "3.7.3"
}
14 changes: 0 additions & 14 deletions src/manifest.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@
},
"description": "Update the state of the current story"
},
"copy-git-branch": {
"suggested_key": {
"default": "Ctrl+G",
"mac": "Command+G"
},
"description": "Copy the current story's git branch"
},
"copy-git-branch-and-update": {
"suggested_key": {
"default": "Ctrl+Shift+G",
"mac": "Command+Shift+G"
},
"description": "Copy the current story's git branch and update the story's state to 'In Progress'"
},
"change-iteration": {
"suggested_key": {
"default": "Ctrl+Shift+I",
Expand Down
8 changes: 0 additions & 8 deletions tests/content-scripts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { CycleTime } from '@sx/cycle-time/cycle-time'
import { DevelopmentTime } from '@sx/development-time/development-time'
import changeIteration from '@sx/keyboard-shortcuts/change-iteration'
import changeState from '@sx/keyboard-shortcuts/change-state'
import copyGitBranch from '@sx/keyboard-shortcuts/copy-git-branch'
import { NotesButton } from '@sx/notes/notes-button'
import { Todoist } from '@sx/todoist/todoist'
import { getSyncedSetting } from '@sx/utils/get-synced-setting'
Expand Down Expand Up @@ -60,7 +59,6 @@ const mockedGetSyncedSetting = getSyncedSetting as jest.MockedFunction<typeof ge
jest.mock('@sx/utils/log-error', () => jest.fn())
jest.mock('@sx/keyboard-shortcuts/change-state', () => jest.fn())
jest.mock('@sx/keyboard-shortcuts/change-iteration', () => jest.fn())
jest.mock('@sx/keyboard-shortcuts/copy-git-branch', () => jest.fn())
jest.mock('@sx/utils/sleep', () => jest.fn().mockResolvedValue(null))


Expand Down Expand Up @@ -137,10 +135,4 @@ describe('handleMessage function', () => {
await handleMessage(request)
expect(changeIteration).toHaveBeenCalled()
})

it('calls copyGitBranch for copy-git-branch message', async () => {
const request = { message: 'copy-git-branch', url: 'https://example.com/story' }
await handleMessage(request)
expect(copyGitBranch).toHaveBeenCalled()
})
})
116 changes: 0 additions & 116 deletions tests/keyboard-shortcuts/copy-branch-move-in-development.test.ts

This file was deleted.

60 changes: 0 additions & 60 deletions tests/keyboard-shortcuts/copy-git-branch.test.ts

This file was deleted.

Loading

0 comments on commit 1447e42

Please sign in to comment.