Skip to content

Commit 5b26dba

Browse files
committed
rename
1 parent 7c95483 commit 5b26dba

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

special-pages/pages/history/app/history.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Response, note: always return the same query I sent:
118118
}
119119
```
120120

121-
### `menu_title`
121+
### `title_menu`
122122
{@link "History Messages".MenuTitleRequest}
123123

124124
Sent when a right-click is issued on a section title (or when the three-dots button is clicked)

special-pages/pages/history/app/history.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class HistoryService {
106106
* @param {string} dateRelativeDay
107107
*/
108108
async menuTitle(dateRelativeDay) {
109-
const response = await this.history.messaging.request('menu_title', { dateRelativeDay });
109+
const response = await this.history.messaging.request('title_menu', { dateRelativeDay });
110110
if (response.action === 'none') return;
111111
this.query.update((old) => {
112112
// find the first item

special-pages/pages/history/app/mocks/mock-transport.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ export function mockTransport() {
5858
const msg = /** @type {any} */ (_msg);
5959

6060
switch (msg.method) {
61-
case 'menu_title': {
61+
case 'title_menu': {
6262
console.log('📤 [deleteRange]: ', JSON.stringify(msg.params));
6363
// prettier-ignore
6464
const lines = [
65-
`menu_title: ${JSON.stringify(msg.params)}`,
65+
`title_menu: ${JSON.stringify(msg.params)}`,
6666
`To simulate deleting this item, press confirm`
6767
].join('\n');
6868
if (confirm(lines)) {

special-pages/pages/history/messages/menu_title.request.json renamed to special-pages/pages/history/messages/title_menu.request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"type": "object",
4-
"title": "Menu Title Params",
4+
"title": "Title Menu Params",
55
"required": [
66
"dateRelativeDay"
77
],

special-pages/pages/history/types/history.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ export type DeleteAction = "delete";
2828
* The user cancelled the action, or did not agree to it
2929
*/
3030
export type NoneAction = "none";
31+
export type QueryKind = SearchTerm | DomainFilter | RangeFilter;
3132
/**
3233
* This value matches the section headings
3334
*/
3435
export type RelativeDay = string;
35-
export type QueryKind = SearchTerm | DomainFilter | RangeFilter;
3636

3737
/**
3838
* Requests, Notifications and Subscriptions from the History feature
3939
*/
4040
export interface HistoryMessages {
4141
notifications: OpenNotification | ReportInitExceptionNotification | ReportPageExceptionNotification;
42-
requests: DeleteRangeRequest | GetRangesRequest | InitialSetupRequest | MenuTitleRequest | QueryRequest;
42+
requests: DeleteRangeRequest | GetRangesRequest | InitialSetupRequest | QueryRequest | TitleMenuRequest;
4343
}
4444
/**
4545
* Generated from @see "../messages/open.notify.json"
@@ -113,20 +113,6 @@ export interface InitialSetupResponse {
113113
name: "macos" | "windows" | "android" | "ios" | "integration";
114114
};
115115
}
116-
/**
117-
* Generated from @see "../messages/menu_title.request.json"
118-
*/
119-
export interface MenuTitleRequest {
120-
method: "menu_title";
121-
params: MenuTitleParams;
122-
result: MenuTitleResponse;
123-
}
124-
export interface MenuTitleParams {
125-
dateRelativeDay: RelativeDay;
126-
}
127-
export interface MenuTitleResponse {
128-
action: ActionResponse;
129-
}
130116
/**
131117
* Generated from @see "../messages/query.request.json"
132118
*/
@@ -200,6 +186,20 @@ export interface HistoryItem {
200186
*/
201187
url: string;
202188
}
189+
/**
190+
* Generated from @see "../messages/title_menu.request.json"
191+
*/
192+
export interface TitleMenuRequest {
193+
method: "title_menu";
194+
params: TitleMenuParams;
195+
result: TitleMenuResponse;
196+
}
197+
export interface TitleMenuParams {
198+
dateRelativeDay: RelativeDay;
199+
}
200+
export interface TitleMenuResponse {
201+
action: ActionResponse;
202+
}
203203

204204
declare module "../src/index.js" {
205205
export interface HistoryPage {

0 commit comments

Comments
 (0)