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

Enhanced dashboard group by options without any duplicates #8624

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

asr2003
Copy link

@asr2003 asr2003 commented May 20, 2024

Summary

This PR addresses the issue of duplicate group by options across various dashboard components. The focus has been on implementing specific code changes to ensure the uniqueness of group by options.

How did you test this change?

Will be tested on deployment

Are there any deployment considerations?

N/A

Does this work require review from our design team?

N/A

Copy link

changeset-bot bot commented May 20, 2024

⚠️ No Changeset found

Latest commit: c1b37e5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "rrdom" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "rrdom-nodejs" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "rrweb" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "rrweb-player" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "rrweb-snapshot" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@rrweb/types" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@rrweb/web-extension" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "rrvideo" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Pull Request Summary

  • DashboardsContext.tsx: Enhanced state management to prevent duplicate dashboards.
  • CreateDashboardModal.tsx: Introduced a new Select component to handle unique 'Group By Options'.
  • Dashboard.tsx: Added a filter to ensure unique groupByKey values in dashboard graphs.
  • DashboardOverview.tsx: Implemented a mechanism to filter out duplicate visualizations, ensuring unique entries.

Notes

  • These changes improve user experience by preventing duplicate entries across various dashboard components.

Comments

frontend/src/pages/Dashboards/DashboardsContext/DashboardsContext.tsx

  • Line 32: The DashboardsContextProvider is redefined here, which might cause a conflict with the existing export. Consider renaming the new provider to avoid confusion.
  • Line 45: The upsertDashboardMutation function is used here but not imported. Ensure it is imported correctly to avoid runtime errors.
  • Line 52: The uniqueDashboards filter logic is incorrect. It should filter based on the newDashboard.id instead of dashboard.id to ensure uniqueness.

frontend/src/pages/Graphing/Dashboard.tsx

  • Line 7: The uniqueGroupByKey filtering logic is correct, but it could be optimized using a Set for better performance with large arrays.

frontend/src/pages/Graphing/DashboardOverview.tsx

  • Line 303: Update the type of 'data' prop in 'DashboardRows' to reflect the new structure.

Copy link

algora-pbc bot commented May 20, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay.

@asr2003
Copy link
Author

asr2003 commented May 20, 2024

@greptile review the changes. I have incorporated all your suggestions

@asr2003
Copy link
Author

asr2003 commented May 20, 2024

@Vadman97 PTAL. I think it's ready for your final review and also can please approve the workflows.

@asr2003 asr2003 marked this pull request as draft May 20, 2024 03:36
@asr2003 asr2003 marked this pull request as ready for review May 20, 2024 03:36
@Vadman97 Vadman97 requested review from Vadman97 and a team May 20, 2024 13:45
@reflame reflame bot had a problem deploying to Preview May 20, 2024 13:46 Failure
@reflame reflame bot had a problem deploying to Preview May 20, 2024 13:46 Failure
@reflame reflame bot had a problem deploying to Preview May 20, 2024 19:05 Failure
@reflame reflame bot had a problem deploying to Preview May 20, 2024 19:06 Failure
@reflame reflame bot had a problem deploying to Preview May 20, 2024 19:06 Failure
@Vadman97
Copy link
Member

@asr2003 looks like there are some issues with the build - see https://github.com/highlight/highlight/actions/runs/9153049403/job/25193368143?pr=8624

@asr2003
Copy link
Author

asr2003 commented May 21, 2024

@asr2003 looks like there are some issues with the build - see https://github.com/highlight/highlight/actions/runs/9153049403/job/25193368143?pr=8624

Fixing them

@reflame reflame bot had a problem deploying to Preview May 21, 2024 17:00 Failure
@asr2003
Copy link
Author

asr2003 commented May 21, 2024

@Vadman97 I have fixed the errors of build emitted here:
https://github.com/highlight/highlight/actions/runs/9153049403/job/25193368143?pr=8624

@asr2003
Copy link
Author

asr2003 commented May 21, 2024

@Vadman97 I have also addressed the build errors emitted recently. PTAL

@Vadman97
Copy link
Member

@asr2003 can you also run yarn reflame-build && yarn format:all?

@asr2003
Copy link
Author

asr2003 commented May 27, 2024

@Vadman97 I will fix the bugs. Currently I am troubleshooting my laptop with some repairs

@Vadman97
Copy link
Member

any update @asr2003 ?

@asr2003
Copy link
Author

asr2003 commented May 31, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dashboard group by options show duplicates
2 participants