-
Notifications
You must be signed in to change notification settings - Fork 102
LF-5182: TAPE Plan Phase 1 - Frontend Changes #4068
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
SayakaOno
merged 46 commits into
integration
from
LF-5182-experiment-tape-plan-phase-1-frontend-changes
Mar 11, 2026
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
1f92f55
LF-5182 Commit phase 1 agent completion
kathyavini ceba077
Merge branch 'integration' into LF-5182-experiment-tape-plan-phase-1-…
SayakaOno 69e9dce
LF-5182 Adjust getSurveyVersion
SayakaOno 73aae23
LF-5182 Add useTapeSurveyJsonForFarmCountry hook
SayakaOno ccf2d7b
LF-5182 Use useTapeSurveyJsonForFarmCountry hook in TAPESurvey
SayakaOno 8ae4dc9
LF-5182 Replace tapeQuestions.json with useTapeSurveyJsonForFarmCount…
SayakaOno 8176e0d
LF-5182 Update survey json path, add useGetTapeSurveyQuery in tapeSur…
SayakaOno cbfa4f2
LF-5182 Get isTapeSurveyCompleted status from via the API
SayakaOno dc22279
LF-5182 Export prefetch from tapeSurveyApi
SayakaOno aa8808b
LF-5182 Adjust handleComplete
SayakaOno a0ad9b2
LF-5182 Adjust tapeSurveyStatusSelector
SayakaOno de015c3
LF-5182 Update tapeSurveyStatusSelector
SayakaOno a89b028
LF-5182 Fix initialData in TAPESurvey
SayakaOno 9c63f5b
LF-5182 Fix tape's insightData
SayakaOno 301adda
LF-5182 Pass isCompactSideMenu prop to TapeSurvey in routes
SayakaOno 3a58c8d
LF-5182 Adjust the survey.js error position
SayakaOno 759f726
LF-5182 Handle survey json loading error with snackbar
SayakaOno cc9fb45
LF-5182 Refactor tape
SayakaOno 412f230
LF-5182 Remove useTapeSurveyJsonForFarmCountry hook
SayakaOno 273c164
LF-5182 Conditionally show TAPE in insights
SayakaOno 1dfb67f
LF-5182 Update TapeResults to use surveyData in DB
SayakaOno 52dec6d
LF-5182 Update tapeSurveySlice
SayakaOno cd441fe
LF-5182 Update and add function to reopen survey
SayakaOno 44ad39d
LF-5182 Update submitTapeSurvey endpoint in tapeSurveyApi, update mut…
SayakaOno 502720e
LF-5182 Adjust TapeSurveyRecord interface
SayakaOno 4442369
LF-5182 Replace submission_type with id
SayakaOno dd99b55
LF-5182 Handle update tape survey
SayakaOno 08b13c6
LF-5182 Rename submitTapeSurvey endpoint
SayakaOno c2344aa
LF-5182 Fix isTapeSurveyCompleted condition in Insights
SayakaOno 4f40909
LF-5182 Update comment
SayakaOno 8ee6bfe
Merge branch 'integration' into LF-5182-experiment-tape-plan-phase-1-…
SayakaOno 17595e0
LF-5182 Delete tapeQuestions.json
SayakaOno 1f11427
LF-5182 Correct types for tapeSurveyApi
SayakaOno 447b4dc
LF-5182 Fix API args in TapeSurvey
SayakaOno 1176ae1
Comment out TapeSurvey Step 2
SayakaOno 172e8e2
LF-5182 Fix isTapeSurveyCompleted condition
SayakaOno de7b624
LF-5182 Remove code for TAPE survey update
SayakaOno f6c4421
LF-5182 Restore comment
SayakaOno 319686a
LF-5182 Redirect user to survey when surveyData doesn't exist
SayakaOno 575498a
LF-5182 Handle TAPE results errors
SayakaOno c37a76f
Merge branch 'integration' into LF-5182-experiment-tape-plan-phase-1-…
SayakaOno e9d1fff
LF-5182 Remove Tape survey step 2 code
SayakaOno 3dc6153
LF-5182 Update Tape result calculation
SayakaOno 3243b03
LF-5182 Disable TAPE menu onClick while fetching
SayakaOno cc9a2f5
LF-5182 Make TapeResults chart responsive
SayakaOno 1a87abb
LF-5182 Adjust TAPE components styles
SayakaOno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/webapp/src/containers/Insights/TapeSurvey/getSurveyVersion.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* | ||
| * Copyright 2026 LiteFarm.org | ||
| * This file is part of LiteFarm. | ||
| * | ||
| * LiteFarm is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * LiteFarm is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details, see <https://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| const COUNTRY_VERSIONS = ['AU']; | ||
|
|
||
| /** | ||
| * Returns the survey version key used to fetch the correct JSON from DO CDN, | ||
| * based on the farm's 2-letter ISO country code. | ||
| * | ||
| * To add a new country-specific version: | ||
| * 1. Upload `tape_surveys/<key>.json` to the DO Spaces bucket. | ||
| * 2. Add a country_code to `COUNTRY_VERSIONS`. | ||
| */ | ||
| export const getSurveyVersion = (countryCode: string | undefined): string | undefined => { | ||
| return countryCode && COUNTRY_VERSIONS.includes(countryCode) | ||
| ? countryCode.toLowerCase() | ||
| : undefined; | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it takes arrays for the labels! Thank you for figuring that out ❤️