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

feat: collect user feedback #965

Merged
merged 34 commits into from
Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b987e03
feat: collect user feedback
subzero10 Dec 3, 2022
e883247
chore: support for options
subzero10 Dec 3, 2022
faa030d
chore: footer design
subzero10 Dec 3, 2022
625563f
chore: more css and error control
subzero10 Dec 3, 2022
3e47fc7
chore: upload feedback form script to cdn
subzero10 Dec 10, 2022
3b5d0c2
chore: use ref, not master branch
subzero10 Dec 10, 2022
aa095e4
chore: optimize workflow
subzero10 Dec 10, 2022
8a7e07e
chore: update lock files
subzero10 Dec 10, 2022
e626b23
chore: add lock file for gatsby plugin
subzero10 Dec 10, 2022
9798611
chore: set alpha tag to test cdn upload
subzero10 Dec 10, 2022
3869b16
chore: revert version bump
subzero10 Dec 10, 2022
d0fa9ec
Merge branch 'master' into user_feedback_#943
subzero10 Dec 10, 2022
deef378
chore: merge with master
subzero10 Dec 10, 2022
dc267cf
chore: submit feedback with script tag
subzero10 Dec 12, 2022
5c06063
Merge branch 'master' into user_feedback_#943
subzero10 Dec 22, 2022
5b0a793
chore: unit tests
subzero10 Dec 22, 2022
6418f82
chore: integration tests
subzero10 Dec 23, 2022
0e24f32
chore: bring back isIE
subzero10 Dec 23, 2022
b1e8aeb
chore: fix firefox integration
subzero10 Dec 23, 2022
44c8b45
chore: attempt#2 fix firefox integration
subzero10 Dec 23, 2022
a7d4e9c
Merge branch 'master' into user_feedback_#943
subzero10 Dec 30, 2022
a0cca08
chore: fix script url build
subzero10 Dec 30, 2022
0343c0c
chore: attempt#3 fix firefox integration
subzero10 Dec 30, 2022
e442088
chore: purge bunny.net cache
subzero10 Dec 30, 2022
3ed69a1
chore: add prop to show feedback form on error
subzero10 Dec 30, 2022
84faf29
chore: fix react tests
subzero10 Dec 30, 2022
6153545
chore: remove console.lo
subzero10 Dec 30, 2022
3732cd1
chore: apply pr review feedback
subzero10 Jan 4, 2023
1ebbef7
chore: add route in express example app to fetch user feedback form f…
subzero10 Jan 4, 2023
0d980a9
Merge branch 'master' into user_feedback_#943
subzero10 Jan 5, 2023
87d59e1
chore: generate new package-lock files
subzero10 Jan 5, 2023
c6d3e96
chore: don't show feedback form more than once if visible
subzero10 Jan 5, 2023
a58440a
chore: change to v2 feedback endpoint
subzero10 Jan 13, 2023
3ebd91e
chore: fix integration tests
subzero10 Jan 13, 2023
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
3 changes: 0 additions & 3 deletions .github/workflows/cdn-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ jobs:
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master

- name: Setup Node
uses: actions/setup-node@v3
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
Notice,
Noticeable,
HoneybadgerStore,
BacktraceFrame, Transport, NoticeTransportPayload
BacktraceFrame, Transport, NoticeTransportPayload, UserFeedbackForOptions
} from './types'
import { GlobalStore } from './store';

Expand Down Expand Up @@ -87,6 +87,8 @@ export abstract class Client {

protected abstract checkIn(id: string): Promise<void>

protected abstract showUserFeedbackForm(options: UserFeedbackForOptions): Promise<void>
subzero10 marked this conversation as resolved.
Show resolved Hide resolved

getVersion(): string {
return notifier.version
}
Expand Down
18 changes: 18 additions & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,21 @@ export type StoreContents = {
context: Record<string, unknown>,
breadcrumbs: BreadcrumbRecord[]
}

export type UserFeedbackForOptions = {
subzero10 marked this conversation as resolved.
Show resolved Hide resolved
onLoad?: () => void;
messages?: {
heading?: string;
explanation?: string;
thanks?: string;
}
buttons?: {
submit?: string;
cancel?: string;
};
labels?: {
name?: string;
email?: string;
comment?: string;
};
}
8 changes: 6 additions & 2 deletions packages/core/test/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Client as BaseClient } from '../src/client'
import { Config, Logger, Notice, Noticeable, Transport, TransportOptions, NoticeTransportPayload } from '../src/types'
import { runAfterNotifyHandlers } from '../src/util';
import { Config, Logger, Notice, Noticeable, Transport, TransportOptions, NoticeTransportPayload, UserFeedbackForOptions } from '../src/types'
import { runAfterNotifyHandlers } from '../src/util'

export function nullLogger(): Logger {
return {
Expand All @@ -27,6 +27,10 @@ export class TestClient extends BaseClient {
throw new Error('Method not implemented.');
}

protected showUserFeedbackForm(_options: UserFeedbackForOptions): Promise<void> {
throw new Error('Method not implemented.');
}

constructor(opts: Partial<Config>, transport: Transport) {
super(opts, transport);
}
Expand Down
230 changes: 230 additions & 0 deletions packages/gatsby-plugin/package-lock.json

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

Loading