Skip to content

[dashboard] hide feedback form from self-hosted users 10296 #10297

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

Merged
merged 2 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions components/dashboard/src/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { getProjectSettingsMenu } from "./projects/ProjectSettings";
import { ProjectContext } from "./projects/project-context";
import { PaymentContext } from "./payment-context";
import FeedbackFormModal from "./feedback-form/FeedbackModal";
import { isGitpodIo } from "./utils";

interface Entry {
title: string;
Expand Down Expand Up @@ -376,9 +377,11 @@ export default function Menu() {
/>
</li>
))}
<li className="cursor-pointer">
<PillMenuItem name="Feedback" onClick={handleFeedbackFormClick} />
</li>
{isGitpodIo() && (
<li className="cursor-pointer">
<PillMenuItem name="Feedback" onClick={handleFeedbackFormClick} />
</li>
)}
</ul>
</nav>
<div
Expand Down
15 changes: 9 additions & 6 deletions components/dashboard/src/components/ErrorMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import FeedbackComponent from "../feedback-form/FeedbackComponent";
import { isGitpodIo } from "../utils";

function ErrorMessage(props: { imgSrc: string; imgAlt?: string; message: string }) {
return (
Expand All @@ -17,12 +18,14 @@ function ErrorMessage(props: { imgSrc: string; imgAlt?: string; message: string
<p className="text-gitpod-red text-sm">{props.message}</p>
</div>
</div>
<FeedbackComponent
message={"Was this error message helpful?"}
initialSize={24}
isError={true}
isModal={false}
/>
{isGitpodIo() && (
<FeedbackComponent
message={"Was this error message helpful?"}
initialSize={24}
isError={true}
isModal={false}
/>
)}
</>
);
}
Expand Down
3 changes: 2 additions & 1 deletion components/dashboard/src/start/CreateWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { SelectAccountModal } from "../settings/SelectAccountModal";
import { watchHeadlessLogs } from "../components/PrebuildLogs";
import CodeText from "../components/CodeText";
import FeedbackComponent from "../feedback-form/FeedbackComponent";
import { isGitpodIo } from "../utils";

const WorkspaceLogs = React.lazy(() => import("../components/WorkspaceLogs"));

Expand Down Expand Up @@ -433,7 +434,7 @@ function RepositoryNotFoundView(p: { error: StartWorkspaceError }) {
<CodeText>{repoFullName}</CodeText>
</p>
{statusMessage}
{p.error && (
{p.error && isGitpodIo() && (
<FeedbackComponent
isModal={false}
message={"Was this error message helpful?"}
Expand Down