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

feat: Add ratings to insights #14687

Merged
merged 22 commits into from Apr 26, 2024
Merged

feat: Add ratings to insights #14687

merged 22 commits into from Apr 26, 2024

Conversation

alishaz-polymath
Copy link
Member

@alishaz-polymath alishaz-polymath commented Apr 21, 2024

What does this PR do?

This PR adds rating feedback metrics to insights. Following are the screenshots with various metrics added.

There are three overview cards added in a new panel; No Show, Average Ratings & CSAT Score

  • No Show represents the number of Host No Shows during the period
  • Average Ratings represents the average ratings received by everyone in the group
  • CSAT Score represents the Customer Satisfaction Score. It is calculated as follows:
    image
  • No Show Host is added in the timeline to keep track of it over a time period

New tables have been added

  • Recent ratings: Contains the recent bookings which were rated by the attendee, with host name & avatar, the actual rating and any feedback/notes. This table only contains ratings which actually had a note/feedback provided alongside of the ratings, sorted by most recent first
  • Most no show members: Contains a list of hosts with no shows, maximum number of no shows first, with host name & avatar. The number of no shows are a collective per host.
  • Members with highest rated meetings: Contains average rating received by individual hosts, sorted from highest rating to lowest, with host name & avatar along with the average rating
  • Members with lowest rated meetings: Contains average rating received by individual hosts, sorted from lowest rating to highest, with host name & avatar along with the average rating

image


Here's how all of it looks:

  1. Primary cards with NoShow, AverageRatings & CSAT
    image

  1. NoShowHost in the timeline
    image

  1. Recent ratings, Most no show members, Members with highest rated meetings, Members with lowest rated meetings
    image

Added fields to CSV download:

  • rating,
  • ratingFeedback
  • noShowHost

Fixes #14634

Requirement/Documentation

  • If there is a requirement document, please, share it here.
  • If there is a UI/UX design document, please, share it here.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How should this be tested?

Simply create a "Ratings" workflow and provide rating feedback once the events complete. You should see the ratings, feedback, noShow & CSAT in the insights page.

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

@github-actions github-actions bot added the ❗️ migrations contains migration files label Apr 21, 2024
Copy link
Contributor

github-actions bot commented Apr 21, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

Copy link

vercel bot commented Apr 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
platform-starter-kit ❌ Failed (Inspect) Apr 26, 2024 9:40am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Apr 26, 2024 9:40am
cal ⬜️ Ignored (Inspect) Visit Preview Apr 26, 2024 9:40am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Apr 26, 2024 9:40am

Copy link
Contributor

github-actions bot commented Apr 21, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

deploysentinel bot commented Apr 21, 2024

Current Playwright Test Results Summary

✅ 314 Passing - ⚠️ 18 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 04/26/2024 09:53:44am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: cdf3c91

Started: 04/26/2024 09:50:40am UTC

⚠️ Flakes

📄   apps/web/playwright/webhook.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
BOOKING_RESCHEDULED when rescheduling to a booking that already exists, should send a booking rescheduled event with the existant booking uid
Retry 2Retry 1Initial Attempt
10.47% (18) 18 / 172 runs
failed over last 7 days
21.51% (37) 37 / 172 runs
flaked over last 7 days

📄   apps/web/playwright/teams.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Teams - NonOrg -- future Team Onboarding Invite Members
Retry 1Initial Attempt
5.74% (12) 12 / 209 runs
failed over last 7 days
32.06% (67) 67 / 209 runs
flaked over last 7 days

📄   apps/web/playwright/login.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
user can login & logout succesfully -- future login flow user & logout using dashboard
Retry 1Initial Attempt
6.67% (13) 13 / 195 runs
failed over last 7 days
36.41% (71) 71 / 195 runs
flaked over last 7 days

📄   packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Routing Forms Seeded Routing Form Test preview should return correct route
Retry 1Initial Attempt
0% (0) 0 / 199 runs
failed over last 7 days
35.18% (70) 70 / 199 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/namespacing.e2e.ts • 4 Flakes

Top 1 Common Error Messages

null

4 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Namespacing Inline Embed Double install Embed Snippet with inline embed without a namespace(i.e. default namespace)
Retry 1Initial Attempt
0% (0) 0 / 191 runs
failed over last 7 days
50.79% (97) 97 / 191 runs
flaked over last 7 days
Namespacing Different namespaces can have different init configs
Retry 1Initial Attempt
0% (0) 0 / 189 runs
failed over last 7 days
49.21% (93) 93 / 189 runs
flaked over last 7 days
Namespacing Inline Embed Double install Embed Snippet with inline embed using a namespace
Retry 1Initial Attempt
0% (0) 0 / 191 runs
failed over last 7 days
49.74% (95) 95 / 191 runs
flaked over last 7 days
Namespacing Inline Embed Add inline embed using a namespace without reload
Retry 1Initial Attempt
0.52% (1) 1 / 191 run
failed over last 7 days
49.74% (95) 95 / 191 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Pending payment booking should not be confirmed by default
Retry 1Initial Attempt
1.58% (3) 3 / 190 runs
failed over last 7 days
26.84% (51) 51 / 190 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 8 Flakes

Top 1 Common Error Messages

null

8 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1Initial Attempt
17.68% (35) 35 / 198 runs
failed over last 7 days
52.53% (104) 104 / 198 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
-176.27% (-104) -104 / 59 runs
failed over last 7 days
176.27% (104) 104 / 59 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
-174.58% (-103) -103 / 59 runs
failed over last 7 days
174.58% (103) 103 / 59 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1Initial Attempt
-174.58% (-103) -103 / 59 runs
failed over last 7 days
174.58% (103) 103 / 59 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when configured with 'auto' theme using Embed API
Retry 1Initial Attempt
-174.58% (-103) -103 / 59 runs
failed over last 7 days
174.58% (103) 103 / 59 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Booker Profile Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-174.58% (-103) -103 / 59 runs
failed over last 7 days
174.58% (103) 103 / 59 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Event Booking Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-174.58% (-103) -103 / 59 runs
failed over last 7 days
174.58% (103) 103 / 59 runs
flaked over last 7 days
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1Initial Attempt
-174.58% (-103) -103 / 59 runs
failed over last 7 days
174.58% (103) 103 / 59 runs
flaked over last 7 days

📄   packages/embeds/embed-react/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
React Embed Element Click Popup should verify that the iframe got created with correct URL - namespaced
Retry 1Initial Attempt
18.50% (37) 37 / 200 runs
failed over last 7 days
38.50% (77) 77 / 200 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Member

@PeerRich PeerRich left a comment

Choose a reason for hiding this comment

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

great work. excited for this

@PeerRich PeerRich enabled auto-merge (squash) April 23, 2024 21:40
Copy link
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

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

Tested locally - works well. Nice job!

Few NITS but nothing blocking

Comment on lines +11 to +18
| {
userId: number | null;
user: Pick<User, "avatarUrl" | "name">;
emailMd5?: string;
count?: number;
averageRating?: number | null;
username?: string;
}[]
Copy link
Member

Choose a reason for hiding this comment

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

NIT lets extract this type - its used elsewhere too

Comment on lines +12 to +19
| {
userId: number | null;
user: Pick<User, "avatarUrl" | "name">;
emailMd5?: string;
username?: string;
rating: number | null;
feedback: string | null;
}[]
Copy link
Member

Choose a reason for hiding this comment

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

nit: Same here


if (!isSuccess || !startDate || !endDate || !teamId) return null;

return data && data.length > 0 ? (
Copy link
Member

Choose a reason for hiding this comment

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

Shall we early return so we dont need this tenery ?

@PeerRich PeerRich merged commit 0650898 into main Apr 26, 2024
38 of 40 checks passed
@PeerRich PeerRich deleted the feat/add-csat-insights branch April 26, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO ✨ feature New feature or request High priority Created by Linear-GitHub Sync insights area: insights, analytics ❗️ migrations contains migration files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3487] show CSAT in /insights
6 participants