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

Add option to hide a column from the experiments table #1756

Merged
merged 4 commits into from
May 24, 2022

Conversation

wolmir
Copy link
Contributor

@wolmir wolmir commented May 23, 2022

Closes #1709

This PR adds an option to the Experiments Table Header context menu to hide that specific column.

Screen.Recording.2022-05-23.at.14.40.25.mov

@wolmir wolmir self-assigned this May 23, 2022
@@ -407,6 +407,8 @@ export class Experiments extends BaseRepository<TableData> {
)
case MessageFromWebviewType.TOGGLE_EXPERIMENT:
return this.setExperimentStatus(message.payload)
case MessageFromWebviewType.HIDE_EXPERIMENTS_TABLE_COLUMN:
Copy link
Member

Choose a reason for hiding this comment

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

[Q] Does this fire a telemetry event? Can we add one if it doesn't?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the reminder!

I don't know if it does, but I think it's a good idea to have separate tm calls for webview requests, wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

👍🏻 there should be a different event per message from webview type. For example:

private setColumnOrder(order: string[]) {
    this.columns.setColumnOrder(order)
    sendTelemetryEvent(
      EventName.VIEWS_EXPERIMENTS_TABLE_COLUMNS_REORDERED,
      undefined,
      undefined
    )
  }

Copy link
Member

Choose a reason for hiding this comment

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

Sometimes a separate event won't be possible though. E.g if we are calling an internal/registered command that already has one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@mattseddon mattseddon added the product PR that affects product label May 24, 2022
setColumnSort(order)
}}
/>
<VSCodeDivider></VSCodeDivider>
Copy link
Contributor

Choose a reason for hiding this comment

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

A little nit-picky, but can this be self closing?

@wolmir wolmir force-pushed the hide-column-option-in-exp-table-ctx-menu branch from 8024d9a to d3933d1 Compare May 24, 2022 15:57
@wolmir wolmir force-pushed the hide-column-option-in-exp-table-ctx-menu branch from bfc4071 to 6b6a328 Compare May 24, 2022 19:33
@codeclimate
Copy link

codeclimate bot commented May 24, 2022

Code Climate has analyzed commit 6b6a328 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (85% is the threshold).

This pull request will bring the total coverage in the repository to 96.8% (0.0% change).

View more on Code Climate.

@wolmir wolmir merged commit 5b0fab6 into main May 24, 2022
@wolmir wolmir deleted the hide-column-option-in-exp-table-ctx-menu branch May 24, 2022 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Experiments table: add hide column to the drop down menu on header
4 participants