[feedback] IJPL-177421 Permanent CSAT survey in IDEs

Run CSAT survey on the client side

(cherry picked from commit eb0b819f9ad4326589f013e76998dcfdd3e01b1e)


(cherry picked from commit 3ff503981d589ac352f43707abdfd3ee10736036)

IJ-MR-155667

GitOrigin-RevId: bf4044b688f353af2d5cc4f57d4e5c58161ca71a
This commit is contained in:
Yuriy Artamonov
2025-02-12 18:00:29 +01:00
committed by intellij-monorepo-bot
parent 0c96b4504c
commit 1c84e9e408
3 changed files with 12 additions and 3 deletions

View File

@@ -5,9 +5,10 @@ import com.intellij.notification.NotificationGroupManager
import com.intellij.notification.NotificationType
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import java.time.format.DateTimeFormatter
internal class CsatFeedbackAction : AnAction() {
internal class CsatFeedbackAction : AnAction(), ActionRemoteBehaviorSpecification.Frontend {
override fun actionPerformed(e: AnActionEvent) {
val project = e.project
if (project != null) {
@@ -16,7 +17,7 @@ internal class CsatFeedbackAction : AnAction() {
}
}
internal class CsatFeedbackNextDayAction : AnAction() {
internal class CsatFeedbackNextDayAction : AnAction(), ActionRemoteBehaviorSpecification.Frontend {
@Suppress("HardCodedStringLiteral")
override fun actionPerformed(e: AnActionEvent) {
val project = e.project

View File

@@ -2,6 +2,7 @@
package com.intellij.platform.feedback.csat
import com.intellij.ide.util.PropertiesComponent
import com.intellij.idea.AppMode
import com.intellij.internal.statistic.eventLog.fus.MachineIdManager
import com.intellij.openapi.application.ApplicationInfo
import com.intellij.openapi.application.ConfigImportHelper
@@ -14,6 +15,7 @@ import com.intellij.platform.feedback.InIdeFeedbackSurveyType
import com.intellij.platform.feedback.dialog.BlockBasedFeedbackDialog
import com.intellij.platform.feedback.dialog.SystemDataJsonSerializable
import com.intellij.platform.feedback.impl.notification.RequestFeedbackNotification
import com.intellij.util.ui.accessibility.ScreenReader
import kotlinx.datetime.LocalDate
import kotlinx.datetime.Month
import java.time.format.DateTimeFormatter
@@ -41,7 +43,11 @@ internal class CsatFeedbackSurveyConfig : InIdeFeedbackSurveyConfig {
override val requireIdeEAP: Boolean = false
override val isIndefinite: Boolean = true
override fun checkIdeIsSuitable(): Boolean = Registry.`is`("csat.survey.enabled")
override fun checkIdeIsSuitable(): Boolean {
return Registry.`is`("csat.survey.enabled")
&& !AppMode.isRemoteDevHost()
&& !ScreenReader.isActive()
}
override fun createFeedbackDialog(project: Project, forTest: Boolean): BlockBasedFeedbackDialog<out SystemDataJsonSerializable> {
return CsatFeedbackDialog(project, forTest)

View File

@@ -73,6 +73,8 @@ data class CommonFeedbackSystemData(
if (edition != null) {
appVersion += " ($edition)"
}
// todo remove dev host info
val appBuild = appInfo.build
appVersion += CommonFeedbackBundle.message("dialog.feedback.system.info.panel.app.version.build", appBuild.asString())
val timestamp: Date = appInfo.buildDate.time