Skip to content

feat: add widget feedback feature #2686

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

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

Conversation

ajnart
Copy link
Contributor

@ajnart ajnart commented Mar 23, 2025

Add a "give feedback" on every widget when in edit mode.

Also exposes umami client functions that allows to send umami data through the client

Screen.Recording.2025-03-23.at.21.55.20-1-1-1.mov

@ajnart ajnart requested a review from a team as a code owner March 23, 2025 20:57
Copy link

deepsource-io bot commented Mar 23, 2025

Here's the code health analysis summary for commits 5a8405a..11cca5a. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Comment on lines +134 to +136
<Menu.Item leftSection={<IconMessageCircle2 size={16} />} onClick={openWidgetFeedbackModal}>
{tItem("action.feedback")}
</Menu.Item>
Copy link
Member

Choose a reason for hiding this comment

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

Render this conditionally, only when analytics are enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically this is not analytics. We are just leveraging our umami endpoint to send feedback. It won't send anything else other than that form

Copy link
Member

Choose a reason for hiding this comment

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

Hmm... in theory you're right, but we disable umami when you disabled analytics.
For the sake of transparency and integrity, I think we should keep doing it that way, hence disabling the feedback menu item.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Meierschlumpf @SeDemal what's your opinion on this ?

Copy link

github-actions bot commented Mar 23, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 22.69% 10253 / 45169
🔵 Statements 22.69% 10253 / 45169
🔵 Functions 29.79% 426 / 1430
🔵 Branches 64.61% 1231 / 1905
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/nextjs/src/components/board/items/item-menu.tsx 0% 0% 0% 0% 1-145
packages/definitions/src/docs/homarr-docs-sitemap.ts 0% 0% 0% 0%
packages/modals-collection/src/index.ts 0% 0% 0% 0% 1-7
packages/modals-collection/src/feedback/index.ts 0% 0% 0% 0% 1
packages/modals-collection/src/feedback/widget-feedback-modal.tsx 0% 0% 0% 0% 1-110
Generated in workflow #5646 for commit 11cca5a by the Vitest Coverage Report Action

@ajnart ajnart force-pushed the feat/client-give-feedback branch from 16a58b5 to 980f9de Compare March 25, 2025 10:39
@ajnart ajnart requested a review from manuel-rw March 25, 2025 15:49
@ajnart ajnart requested review from Meierschlumpf and Copilot March 26, 2025 22:30
Copy link

@Copilot Copilot AI 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 Overview

This PR adds a new widget feedback feature, allowing users to submit feedback on widgets when in edit mode, and exposes umami client functions for sending tracking data. Key changes include:

  • Introducing a new widget feedback modal component with rating inputs and feedback submission.
  • Updating module exports to include new feedback and docker modules.
  • Adding a new integration route in the documentation sitemap and integrating the feedback modal into the board item menu.

Reviewed Changes

Copilot reviewed 6 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/modals-collection/src/index.ts Reorders and updates module exports for clarity.
packages/modals-collection/src/feedback/widget-feedback-modal.tsx Creates a new feedback modal component with umami tracking integration.
packages/modals-collection/src/feedback/index.ts Exposes the widget feedback modal through a new index file.
packages/definitions/src/docs/homarr-docs-sitemap.ts Adds a new documentation path for cloud integrations.
apps/nextjs/src/components/board/items/item-menu.tsx Integrates the new widget feedback modal into the board item menu with an updated icon.
Files not reviewed (4)
  • apps/nextjs/package.json: Language not supported
  • packages/modals-collection/package.json: Language not supported
  • packages/translation/src/lang/en.json: Language not supported
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

packages/modals-collection/src/index.ts:1

  • [nitpick] Consider grouping related module exports (e.g., apps, docker, invites) together consistently to improve clarity and maintainability.
export * from "./apps";


actions.closeModal();
} catch (error) {
console.error("Error sending feedback:", error);
Copy link
Preview

Copilot AI Mar 26, 2025

Choose a reason for hiding this comment

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

Consider notifying the user of a submission error (for example by showing an error notification) instead of only logging the error to the console.

Suggested change
console.error("Error sending feedback:", error);
showErrorNotification({
title: t("notification.error.title"),
message: t("notification.error.message"),
});

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually not a bad idea

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.

2 participants