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

Cody: Update menu icons and order #52263

Merged
merged 10 commits into from
May 22, 2023
Merged

Cody: Update menu icons and order #52263

merged 10 commits into from
May 22, 2023

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented May 22, 2023

Update title menu icon to align with Tim's design (figma) and web design:

Tim's Design:
image

Web:
image

Before:

image

After:

image

Other minor clean up for the package.json

  • I have also moved "cody.customHeaders" to the order list item number 4 and moved all the experimental features after it for clarity.
  • Add order number to guardrails since it was missing

Test plan

See screenshots

 PASS   cody  src/configuration.test.ts
 PASS   cody  src/completions/cache.test.ts
 PASS   cody  src/completions/provider.test.ts
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/bwork/dev/sourcegraph-bee-cody/node_modules/.pnpm/@babel+types@7.21.5/node_modules/@babel/types/lib/validators/generated/index.js:2794:35)
    at PluginPass.Program (/Users/bwork/dev/sourcegraph-bee-cody/node_modules/.pnpm/babel-plugin-lodash@3.3.4/node_modules/babel-plugin-lodash/lib/index.js:102:44)
 PASS   cody  src/completions/context.test.ts
 PASS   cody  src/keyword-context/local-keyword-context-fetcher.test.ts
 PASS   cody  src/chat/utils.test.ts

@cla-bot cla-bot bot added the cla-signed label May 22, 2023
@abeatrix abeatrix requested a review from a team May 22, 2023 15:39
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented May 22, 2023

📖 Storybook live preview

Copy link
Contributor

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@abeatrix abeatrix enabled auto-merge (squash) May 22, 2023 16:02
@@ -1,6 +1,18 @@
import { convertGitCloneURLToCodebaseName } from './ChatViewProvider'

describe('convertGitCloneURLToCodebaseName', () => {
// before each test, mock the createOutputChannel function from vscode with globalThis
beforeEach(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting the same error Test suite failed to run TypeError: Cannot read properties of undefined (reading 'createOutputChannel') when I tried

    beforeEach(() => {
        jest.resetModules()
        jest.mock('vscode', () => ({
            window: {
                createOutputChannel: () => ({
                    appendLine: () => {},
                }),
            },
        }))
    })

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH you know why, it's because the import happens before we do the mock already 🙃

There's a way in jest to fix this, let me look it up

@@ -1,6 +1,18 @@
import { convertGitCloneURLToCodebaseName } from './ChatViewProvider'

describe('convertGitCloneURLToCodebaseName', () => {
// before each test, mock the createOutputChannel function from vscode with globalThis
beforeEach(() => {
Copy link
Contributor Author

@abeatrix abeatrix May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting the same error Test suite failed to run TypeError: Cannot read properties of undefined (reading 'createOutputChannel') when I tried

    beforeEach(() => {
        jest.resetModules()
        jest.mock('vscode', () => ({
            window: {
                createOutputChannel: () => ({
                    appendLine: () => {},
                }),
            },
        }))
    })

or

        globalThis.vscode = {
            createOutputChannel: () => {}
        } as any

@abeatrix abeatrix merged commit 0d43a15 into main May 22, 2023
12 of 13 checks passed
@abeatrix abeatrix deleted the bee/cody-menus branch May 22, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants