Skip to content

Add variant analysis stats component#1517

Merged
koesie10 merged 16 commits intomainfrom
koesie10/variant-analysis-stats
Sep 22, 2022
Merged

Add variant analysis stats component#1517
koesie10 merged 16 commits intomainfrom
koesie10/variant-analysis-stats

Conversation

@koesie10
Copy link
Copy Markdown
Member

This adds the variant analysis stats component. It adds a story for each possible state so it should be easy to check against the design.

The VariantAnalysisHeader component has a lot of props now; we might want to refactor it. However, I think that will be easier once we actually have an interface from which we can get the data, so I've left it like this for now.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@koesie10 koesie10 requested a review from a team September 16, 2022 11:28
@koesie10 koesie10 requested a review from a team as a code owner September 16, 2022 11:28
Base automatically changed from koesie10/variant-analysis-header to main September 19, 2022 07:21
Copy link
Copy Markdown
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

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

Just a partial review from me for now - I'll come back to it tomorrow.

Comment thread extensions/ql-vscode/src/view/variant-analysis/StatItem.tsx Outdated
// assume anything less than 0 is a zero
if (!millis || millis < ONE_MINUTE_IN_MS) {
return 'Less than a minute';
if (!millis || millis < ONE_SECOND_IN_MS) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is changing existing behaviour and I'm not sure we want that. Have you discussed with Product/Design at all?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, I haven't. I figured this would be fine since it's only used in 1 other place right now: the panel for a remote query. We are essentially recreating that panel with a better design and support for live results, so I don't think it matters that the duration for queries to change from less than 1 minute to 12 seconds. This will also only happen for failed or cancelled queries since other queries will almost always take more than 1 minute to complete.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should aim to flag anything that changes existing behaviour with Product/UX. I expect it'll be okay (and I agree with you that the change makes sense), but I want to make sure we don't surprise anyone :)

Comment thread extensions/ql-vscode/src/pure/number.ts
Comment thread extensions/ql-vscode/src/view/variant-analysis/StatItem.tsx Outdated
Comment thread extensions/ql-vscode/src/view/common/icon/ErrorIcon.tsx
Comment thread extensions/ql-vscode/src/view/variant-analysis/VariantAnalysisCompletionStats.tsx Outdated
// assume anything less than 0 is a zero
if (!millis || millis < ONE_MINUTE_IN_MS) {
return 'Less than a minute';
if (!millis || millis < ONE_SECOND_IN_MS) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should aim to flag anything that changes existing behaviour with Product/UX. I expect it'll be okay (and I agree with you that the change makes sense), but I want to make sure we don't surprise anyone :)

Copy link
Copy Markdown
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

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

I think we're pretty much there! Thank you for the hard work on this!

Copy link
Copy Markdown
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

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

Thank you for all the hard work getting this over the line!

@koesie10 koesie10 merged commit d69772d into main Sep 22, 2022
@koesie10 koesie10 deleted the koesie10/variant-analysis-stats branch September 22, 2022 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants