File tree Expand file tree Collapse file tree 6 files changed +17
-16
lines changed
webview/src/experiments/components Expand file tree Collapse file tree 6 files changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ export class WebviewMessages {
8686 } )
8787 case MessageFromWebviewType . TOGGLE_EXPERIMENT_STAR :
8888 return this . setExperimentStars ( message . payload )
89- case MessageFromWebviewType . HIDE_EXPERIMENTS_TABLE_COLUMN :
90- return this . hideTableColumn ( message . payload )
89+ case MessageFromWebviewType . EXPERIMENTS_TABLE_HIDE_COLUMN_PATH :
90+ return this . hideColumnPath ( message . payload )
9191 case MessageFromWebviewType . EXPERIMENTS_TABLE_MOVE_TO_START :
9292 return this . movePathToStart ( message . payload )
9393 case MessageFromWebviewType . OPEN_PARAMS_FILE_TO_THE_SIDE :
@@ -382,13 +382,13 @@ export class WebviewMessages {
382382 return commandPromise
383383 }
384384
385- private hideTableColumn ( path : string ) {
385+ private hideColumnPath ( path : string ) {
386386 this . columns . unselect ( path )
387387
388388 this . notifyChanged ( )
389389
390390 sendTelemetryEvent (
391- EventName . VIEWS_EXPERIMENTS_TABLE_HIDE_COLUMN ,
391+ EventName . VIEWS_EXPERIMENTS_TABLE_HIDE_COLUMN_PATH ,
392392 { path } ,
393393 undefined
394394 )
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ export const EventName = Object.assign(
4343 'views.experimentsTable.focusFiltersTree' ,
4444 VIEWS_EXPERIMENTS_TABLE_FOCUS_SORTS_TREE :
4545 'views.experimentsTable.focusSortsTree' ,
46- VIEWS_EXPERIMENTS_TABLE_HIDE_COLUMN : 'views.experimentsTable.columnHidden' ,
46+ VIEWS_EXPERIMENTS_TABLE_HIDE_COLUMN_PATH :
47+ 'views.experimentsTable.hideColumnPath' ,
4748 VIEWS_EXPERIMENTS_TABLE_MOVE_TO_START : 'views.experimentsTable.moveToStart' ,
4849 VIEWS_EXPERIMENTS_TABLE_OPEN_PARAMS_FILE :
4950 'views.experimentsTable.paramsFileOpened' ,
@@ -247,7 +248,7 @@ export interface IEventNamePropertyMapping {
247248 }
248249 [ EventName . VIEWS_EXPERIMENTS_TABLE_CREATED ] : undefined
249250 [ EventName . VIEWS_EXPERIMENTS_TABLE_FOCUS_CHANGED ] : WebviewFocusChangedProperties
250- [ EventName . VIEWS_EXPERIMENTS_TABLE_HIDE_COLUMN ] : {
251+ [ EventName . VIEWS_EXPERIMENTS_TABLE_HIDE_COLUMN_PATH ] : {
251252 path : string
252253 }
253254 [ EventName . VIEWS_EXPERIMENTS_TABLE_MOVE_TO_START ] : { path : string }
Original file line number Diff line number Diff line change @@ -477,14 +477,14 @@ suite('Experiments Test Suite', () => {
477477
478478 mockMessageReceived . fire ( {
479479 payload : mockColumnId ,
480- type : MessageFromWebviewType . HIDE_EXPERIMENTS_TABLE_COLUMN
480+ type : MessageFromWebviewType . EXPERIMENTS_TABLE_HIDE_COLUMN_PATH
481481 } )
482482
483483 expect ( mockUnselect ) . to . be . calledOnce
484484 expect ( mockUnselect ) . to . be . calledWithExactly ( mockColumnId )
485485
486486 expect ( mockSendTelemetryEvent ) . to . be . calledWithExactly (
487- EventName . VIEWS_EXPERIMENTS_TABLE_HIDE_COLUMN ,
487+ EventName . VIEWS_EXPERIMENTS_TABLE_HIDE_COLUMN_PATH ,
488488 { path : mockColumnId } ,
489489 undefined
490490 )
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export enum MessageFromWebviewType {
4848 SORT_COLUMN = 'sort-column' ,
4949 TOGGLE_EXPERIMENT = 'toggle-experiment' ,
5050 TOGGLE_EXPERIMENT_STAR = 'toggle-experiment-star' ,
51- HIDE_EXPERIMENTS_TABLE_COLUMN = 'hide- experiments-table-column' ,
51+ EXPERIMENTS_TABLE_HIDE_COLUMN_PATH = 'experiments-table-hide- column-path ' ,
5252 EXPERIMENTS_TABLE_MOVE_TO_START = 'experiments-table-move-to-start' ,
5353 SELECT_EXPERIMENTS = 'select-experiments' ,
5454 SELECT_COLUMNS = 'select-columns' ,
@@ -132,7 +132,7 @@ export type MessageFromWebview =
132132 payload : string [ ]
133133 }
134134 | {
135- type : MessageFromWebviewType . HIDE_EXPERIMENTS_TABLE_COLUMN
135+ type : MessageFromWebviewType . EXPERIMENTS_TABLE_HIDE_COLUMN_PATH
136136 payload : string
137137 }
138138 | {
Original file line number Diff line number Diff line change @@ -781,7 +781,7 @@ describe('App', () => {
781781 . map ( item => item . textContent )
782782
783783 expect ( menuitems ) . toStrictEqual ( [
784- 'Hide Column ' ,
784+ 'Hide' ,
785785 'Move to Start' ,
786786 'Set Max Header Height' ,
787787 'Select Columns' ,
@@ -888,7 +888,7 @@ describe('App', () => {
888888 fireEvent . contextMenu ( placeholder , { bubbles : true } )
889889 advanceTimersByTime ( 100 )
890890
891- const hideOption = screen . getByText ( 'Hide Column ' )
891+ const hideOption = screen . getByText ( 'Hide' )
892892
893893 mockPostMessage . mockClear ( )
894894
@@ -897,7 +897,7 @@ describe('App', () => {
897897 expect ( mockPostMessage ) . toHaveBeenCalledTimes ( 1 )
898898 expect ( mockPostMessage ) . toHaveBeenCalledWith ( {
899899 payload : 'Created' ,
900- type : MessageFromWebviewType . HIDE_EXPERIMENTS_TABLE_COLUMN
900+ type : MessageFromWebviewType . EXPERIMENTS_TABLE_HIDE_COLUMN_PATH
901901 } )
902902 } )
903903 } )
Original file line number Diff line number Diff line change @@ -95,11 +95,11 @@ export const getMenuOptions = (
9595 const menuOptions : MessagesMenuOptionProps [ ] = [
9696 {
9797 disabled : isFromExperimentColumn ( header ) ,
98- id : 'hide-column ' ,
99- label : 'Hide Column ' ,
98+ id : 'hide' ,
99+ label : 'Hide' ,
100100 message : {
101101 payload : leafColumn . id ,
102- type : MessageFromWebviewType . HIDE_EXPERIMENTS_TABLE_COLUMN
102+ type : MessageFromWebviewType . EXPERIMENTS_TABLE_HIDE_COLUMN_PATH
103103 }
104104 } ,
105105 {
You can’t perform that action at this time.
0 commit comments