Skip to content

Commit 412a93f

Browse files
authored
Merge pull request #3701 from IntersectMBO/revert/olindost/usersnap-feedback-configuration-changes
Revert "Added Sentiment Feedback Option to Feedback Modal"
2 parents 36bc5d8 + 752cd26 commit 412a93f

File tree

3 files changed

+17
-83
lines changed

3 files changed

+17
-83
lines changed

govtool/frontend/src/context/usersnapContext.tsx

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -79,39 +79,7 @@ export const UsersnapProvider = ({
7979
if (API_KEY) {
8080
try {
8181
const api = await loadSpace(API_KEY);
82-
api.init({
83-
...initParams,
84-
customFields: {
85-
sentiment_score: {
86-
type: 'rating',
87-
label: t("feedback.sentimentScore"),
88-
required: true,
89-
options: [1, 2, 3, 4, 5]
90-
},
91-
additional_notes: {
92-
type: 'textarea',
93-
label: t("feedback.additionalNotes"),
94-
required: false
95-
}
96-
},
97-
feedbackTypes: [
98-
{
99-
id: 'bug',
100-
label: t("feedback.reportBug"),
101-
description: t("feedback.reportBugDescription")
102-
},
103-
{
104-
id: 'idea',
105-
label: t("feedback.suggestIdea"),
106-
description: t("feedback.suggestIdeaDescription")
107-
},
108-
{
109-
id: 'sentiment',
110-
label: t("feedback.sentimentFeedback"),
111-
description: t("feedback.sentimentFeedbackDescription")
112-
}
113-
]
114-
});
82+
api.init(initParams);
11583
setUsersnapApi(api);
11684
} catch (error) {
11785
console.error(error);
@@ -132,4 +100,4 @@ export const UsersnapProvider = ({
132100

133101
export function useUsersnapApi() {
134102
return useContext(UsersnapContext);
135-
}
103+
}

govtool/frontend/src/i18n/locales/en.json

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@
109109
"noDelegationDescription": "Find a DRep to vote on your behalf.",
110110
"noDelegationActionButton": "View DRep Directory",
111111
"dRepDelegationTitle": "Your Voting Power of <strong>₳{{ada}}</strong>\nis Delegated to:",
112-
"noConfidenceDelegationTitle": "You have delegated your Voting Power <strong>₳{{ada}}</strong>\nto \"No Confidence\"",
113-
"abstainDelegationTitle": "You have delegated your Voting Power <strong>₳{{ada}}</strong>\nto \"Abstain\"",
112+
"noConfidenceDelegationTitle": "You have delegated your Voting Power <strong>₳{{ada}}</strong>\nto No Confidence",
113+
"abstainDelegationTitle": "You have delegated your Voting Power <strong>₳{{ada}}</strong>\nto Abstain",
114114
"abstainDescription": "You have selected to apply your Voting Power to Abstain on every vote.",
115115
"noDescription": "You have selected to apply your Voting Power to No Confidence on every vote.",
116116
"inProgress": {
@@ -283,8 +283,8 @@
283283
"abstainCardDefaultTitle": "Abstain from Every Vote",
284284
"automatedVotingOptions": "Automated Voting Options",
285285
"editBtn": "Edit DRep data",
286-
"delegatedToAbstainTitle": "You have delegated ₳{{ada}} to \"Abstain\"",
287-
"delegatedToNoConfidenceTitle": "You have delegated ₳{{ada}} to \"No Confidence\"",
286+
"delegatedToAbstainTitle": "You have delegated ₳{{ada}} to Abstain",
287+
"delegatedToNoConfidenceTitle": "You have delegated ₳{{ada}} to No Confidence",
288288
"delegatedToAbstainDescription": "You have selected to apply your Voting Power to Abstain on every vote.",
289289
"delegatedToNoConfidenceDescription": "You have selected to apply your Voting Power to No Confidence on every vote.",
290290
"delegationOptions": "Delegation Options",
@@ -429,7 +429,7 @@
429429
"chooseHowToVote": "Choose how you want to vote:",
430430
"contextAboutYourVote": "Context about your vote",
431431
"dataMissing": "Data Missing",
432-
"dataMissingTooltipExplanation": "Please click \"View Details\" for more information.",
432+
"dataMissingTooltipExplanation": "Please click View Details for more information.",
433433
"details": "Governance Details:",
434434
"expiresDateWithEpoch": "Expires: <0>{{date}}</0> <1>(Epoch {{epoch}})</1>",
435435
"expiryDate": "Expiry date:",
@@ -656,7 +656,7 @@
656656
},
657657
"pendingValidation": {
658658
"title": "GovTool Is Checking Your Data",
659-
"message": "GovTool will read the URL that you supplied and make a check to see if it's identical with the information that you entered on the form."
659+
"message": "GovTool will read the URL that you supplied and make a check to see if its identical with the information that you entered on the form."
660660
}
661661
},
662662
"dRepData": {
@@ -694,7 +694,7 @@
694694
"description": "Looks like you have already successfully completed your registration and you currently are a DRep.\n\nYou can view your details in the DRep Directory.",
695695
"viewDetails": "View your DRep details"
696696
},
697-
"becomeADrep": "Become a DRep",
697+
"becomeADRep": "Become a DRep",
698698
"descriptionStepTwo": "By clicking register you create your DRep ID within your wallet and become a DRep.\n\nOnce the registration has completed your DRep ID will be shown on your dashboard. You will be able to share your DRep ID so that other ada holders can delegate their voting power to you.",
699699
"headingStepTwo": "Confirm DRep registration",
700700
"register": "Register",
@@ -721,7 +721,7 @@
721721
}
722722
},
723723
"retirement": {
724-
"notADrep": {
724+
"notADRep": {
725725
"title": "You are not a DRep",
726726
"description": "Looks like you cannot retire, because currently you are not a DRep."
727727
},
@@ -769,7 +769,7 @@
769769
},
770770
"noConfidence": {
771771
"heading": "No confidence",
772-
"paragraphOne": "If you don't have trust in the current constitutional committee you signal 'No-confidence'. By voting 'No' means you don't want governance actions to be ratified."
772+
"paragraphOne": "If you dont have trust in the current constitutional committee you signal No-confidence. By voting ‘No’ means you dont want governance actions to be ratified."
773773
},
774774
"todRep": {
775775
"heading": "Delegation to DRep",
@@ -782,7 +782,7 @@
782782
},
783783
"expiryDate": {
784784
"heading": "Expiry Date",
785-
"paragraphOne": "The date when the governance action will expiry if it doesn't reach ratification thresholds.",
785+
"paragraphOne": "The date when the governance action will expiry if it doesnt reach ratification thresholds.",
786786
"paragraphTwo": "IMPORTANT: If the governance action is ratified before the expiry date it will be considered ratified and it will not be available to vote on afterwards."
787787
},
788788
"submissionDate": {
@@ -796,7 +796,7 @@
796796
}
797797
},
798798
"wallet": {
799-
"cantSeeWalletQuestion": "Can't see your wallet? Check what wallets are currently compatible with GovTool ",
799+
"cantSeeWalletQuestion": "Cant see your wallet? Check what wallets are currently compatible with GovTool ",
800800
"chooseWallet": "Choose the wallet you want to connect with:",
801801
"connect": "Connect",
802802
"connectWallet": "Connect Wallet",
@@ -833,7 +833,7 @@
833833
},
834834
"intersectWebsite": {
835835
"title": "Intersect website",
836-
"description": "Intersect is a member-based organization for the Cardano ecosystem — putting the community at the center of Cardano's development",
836+
"description": "Intersect is a member-based organization for the Cardano ecosystem — putting the community at the center of Cardanos development",
837837
"link": "Intersect website"
838838
}
839839
},
@@ -855,18 +855,7 @@
855855
"cip129DrepId": "(CIP-129) DRep ID",
856856
"cip105DRepId": "Legacy DRep ID (CIP-105)",
857857
"email": "Email",
858-
"feedback": {
859-
"title": "Feedback",
860-
"reportBug": "Report a Bug",
861-
"suggestIdea": "Suggest a New Idea",
862-
"sentimentFeedback": "Sentiment Feedback",
863-
"sentimentScore": "How would you rate your experience?",
864-
"additionalNotes": "Additional Notes",
865-
"submit": "Submit Feedback",
866-
"reportBugDescription": "Something is not working as expected",
867-
"suggestIdeaDescription": "Share your ideas for improvement",
868-
"sentimentFeedbackDescription": "Rate your experience and provide feedback"
869-
},
858+
"feedback": "Feedback",
870859
"filter": "Filter",
871860
"goBack": "Go back",
872861
"goToMainnet": "Go to Mainnet",
@@ -898,4 +887,4 @@
898887
"viewDetails": "View details",
899888
"votingPower": "Voting power",
900889
"yourself": "Yourself"
901-
}
890+
}

tests/govtool-frontend/playwright/tests/10-user-snap/userSnap.spec.ts

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -187,27 +187,4 @@ test.describe("Submit Usersnap", () => {
187187

188188
await expect(page.getByText("Thank you!")).toBeVisible();
189189
});
190-
191-
test("10F. Should submit sentiment feedback", async ({ page }) => {
192-
// Intercept Usersnap submit API
193-
await interceptUsersnap(page);
194-
await interceptBucket(page);
195-
196-
await page
197-
.getByRole("button", { name: "Share Your Experience" })
198-
.click();
199-
200-
// Select a rating
201-
await page.getByLabel("How would you rate your experience?").click();
202-
await page.getByRole("button", { name: "4" }).click();
203-
204-
// Add additional notes
205-
await page
206-
.getByPlaceholder("Additional Notes")
207-
.fill(faker.lorem.paragraph(2));
208-
209-
await page.getByRole("button", { name: "Submit Feedback" }).click();
210-
211-
await expect(page.getByText("Thank you!")).toBeVisible();
212-
});
213-
});
190+
});

0 commit comments

Comments
 (0)