Skip to content

Add visual bars to Performance Analysis table#159

Merged
nandhinibsn merged 21 commits intodevfrom
PerformanceTableVisualBars
Jul 8, 2022
Merged

Add visual bars to Performance Analysis table#159
nandhinibsn merged 21 commits intodevfrom
PerformanceTableVisualBars

Conversation

@nandhinibsn
Copy link
Copy Markdown
Contributor

@nandhinibsn nandhinibsn commented Jun 30, 2022

Description: Added a visual bar display for the following columns in performance analysis table and semantic similar utterance table

Performance analysis table columns:

  1. Outcome columns
  2. custom metric columns
  3. ECE
    Semantic similar utterance column:
  4. similarity

Checklist:

You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge
it.

  • PRE-COMMIT. You ran pre-commit on all commits, or else, you
    ran pre-commit run --all-files at the end.
  • FRONTEND TYPES. Regenerate the front-ent types if you played with types and routes.
    Run cd webapp && yarn types while the back-end is running.
  • USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
    our users.
  • DEV CHANGES.
    • Update the documentation if this PR changes how to develop/launch on the app.
    • Update the README files and our wiki for any big design decisions, if relevant.
    • Add unit tests, docstrings, typing and comments for complex sections.

@nandhinibsn
Copy link
Copy Markdown
Contributor Author

nandhinibsn commented Jul 6, 2022

Screenshot of performance Analysis table with visual bars @gabegma @christyler3030 @JosephMarinier
image
Added visual bars to similarity column
image
image
image

Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
@nandhinibsn
Copy link
Copy Markdown
Contributor Author

nandhinibsn commented Jul 6, 2022

Recent screenshot:

image

image

Copy link
Copy Markdown
Contributor

@JosephMarinier JosephMarinier left a comment

Choose a reason for hiding this comment

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

I feel like those colors should come from our theme.

Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Utterance/SimilarUtterances.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Utterance/SimilarUtterances.tsx Outdated
Comment thread webapp/src/components/VisualBar.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/styles/theme.tsx Outdated
Comment thread webapp/src/components/VisualBar.tsx
Comment thread webapp/src/components/Metrics/PerformanceAnalysis.tsx Outdated
Comment thread webapp/src/components/VisualBar.tsx Outdated
nandhinibsn and others added 7 commits July 8, 2022 10:04
instead of the new very light `primary.light` color.
to add it later with careful design
to avoiding the need for `useTheme`.

Also remove `visualBarPercentage()` to make definitions more straightforward and avoid some typing.
Copy link
Copy Markdown
Contributor

@JosephMarinier JosephMarinier left a comment

Choose a reason for hiding this comment

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

👍

@JosephMarinier
Copy link
Copy Markdown
Contributor

See discussion with design team in Mattermost

Comment on lines +202 to +198
renderCell: ({ value }: GridCellParams<number>) =>
visualBarPercentage(value, theme.palette[OUTCOME_COLOR[outcome]].main),
renderCell: ({ value }: GridCellParams<number>) => (
<VisualBar
formattedValue={formatRatioAsPercentageString(value, 1)}
value={value}
color={(theme) => theme.palette[OUTCOME_COLOR[outcome]].main}
/>
),
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.

@nandhinibsn

can we still not go with function? any reason to call the component directly on each function as format is similar for outcome and custom metric columns?

No hard requirement. As I said in the commit message, I simply did that "to make definitions more straightforward and avoid some typing". I was too lazy to import BoxProps to use BoxProps["color"] in the function. Also, the function was only used twice, and didn't support the third case of the ECE column. Now it's more uniform and you don't need to scroll back an forth to understand what is going on. But that's a detail. Would you prefer that I put it back? I don't mind.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

okay then it make sense and I agree in terms of readability and to reduce one import which is boxprops. Let it be this way then

@nandhinibsn
Copy link
Copy Markdown
Contributor Author

Screenshot captured after final changes done.
image

@JosephMarinier
Copy link
Copy Markdown
Contributor

Beauuutiful!

@gabegma
Copy link
Copy Markdown
Contributor

gabegma commented Jul 8, 2022

It looks SO good!! I tagged you Nandhini in our Mattermost thread.

@nandhinibsn
Copy link
Copy Markdown
Contributor Author

thank you @JosephMarinier for the Approval and your time to contribute some final change and reviews. I will merge this once the checks are completed.

@nandhinibsn
Copy link
Copy Markdown
Contributor Author

nandhinibsn commented Jul 8, 2022

@gabegma thanks.. I'm sorry I forgot to notice that. I was looking for updates in the teams and forgot about mattermost..

@JosephMarinier JosephMarinier changed the title Final changes of visual bars Add visual bars to Performance Analysis table Jul 8, 2022
@nandhinibsn nandhinibsn merged commit a21020a into dev Jul 8, 2022
@nandhinibsn nandhinibsn deleted the PerformanceTableVisualBars branch July 8, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add visual bars in performance table on the dashboard to see the magnitude of each value

3 participants