Skip to content

Commit 03fb10e

Browse files
Apply suggestions from code review
Co-authored-by: Robert Knight <[email protected]>
1 parent 1748ca4 commit 03fb10e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/annotator/test/sidebar-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ describe('Sidebar', () => {
358358
});
359359
});
360360

361-
describe('on "loginRequest" event', () => {
361+
describe('on "loginRequested" event', () => {
362362
it('calls the onLoginRequest callback function if one was provided', () => {
363363
const onLoginRequest = sandbox.stub();
364364
createSidebar({ services: [{ onLoginRequest }] });
@@ -445,7 +445,7 @@ describe('Sidebar', () => {
445445
assert.called(onSignupRequest);
446446
}));
447447

448-
describe('on "profileRequest" event', () =>
448+
describe('on "profileRequested" event', () =>
449449
it('calls the onProfileRequest callback function', () => {
450450
const onProfileRequest = sandbox.stub();
451451
createSidebar({ services: [{ onProfileRequest }] });

src/sidebar/components/test/HypothesisApp-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ describe('HypothesisApp', () => {
223223
fakeServiceConfig.returns({});
224224
});
225225

226-
it('sends "signupRequest" event', () => {
226+
it('sends "signupRequested" event', () => {
227227
const wrapper = createComponent();
228228
clickSignUp(wrapper);
229229
assert.calledWith(fakeFrameSync.notifyHost, 'signupRequested');

src/types/bridge-events.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
*/
99
export type HostToSidebarEvent =
1010
/**
11-
* The host is asking the sidebar to delete a frame.
11+
* A guest frame has been destroyed
1212
*/
1313
| 'destroyFrame'
1414

1515
/**
16-
* The host is asking the sidebar to set the annotation highlights on/off.
16+
* Highlights have been toggled on/off.
1717
*/
1818
| 'setVisibleHighlights'
1919

@@ -42,7 +42,7 @@ export type GuestToSidebarEvent =
4242
| 'focusAnnotations'
4343

4444
/**
45-
* The guest is asking the sidebar to relay the message to open the sidebar.
45+
* Request that the sidebar be opened
4646
*/
4747
| 'openSidebar'
4848

@@ -52,7 +52,7 @@ export type GuestToSidebarEvent =
5252
| 'showAnnotations'
5353

5454
/**
55-
* The guest notifies the sidebar to synchronize about the anchoring status of annotations.
55+
* Report whether annotations were successfully anchored in the guest
5656
*/
5757
| 'sync'
5858

@@ -76,7 +76,7 @@ export type SidebarToGuestEvent =
7676
| 'focusAnnotations'
7777

7878
/**
79-
* The sidebar is asking the guest(s) to get the document metadata.
79+
* Request the URL and other metadata about the document in this guest.
8080
*/
8181
| 'getDocumentInfo'
8282

0 commit comments

Comments
 (0)