Skip to content
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

Update manager workflows terminologies #2026

Merged
merged 7 commits into from
Dec 25, 2024
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
2 changes: 1 addition & 1 deletion src/frontend/e2e/01-create-new-project.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test.skip('create new project', async ({ browserName, page }) => {
const dataExtractRadio = await page.getByText('Fetch data from OSM');
await dataExtractRadio.click();
await expect(dataExtractRadio).toBeChecked();
await page.getByRole('button', { name: 'Generate Map Data' }).click();
await page.getByRole('button', { name: 'Fetch OSM Data' }).click();
await page.getByRole('button', { name: 'NEXT' }).click();

// 5. Split Tasks Step
Expand Down
10 changes: 8 additions & 2 deletions src/frontend/src/components/createnewproject/DataExtract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const DataExtract = ({
/>
{extractWays === 'osm_data_extract' && (
<Button
btnText="Generate Map Data"
btnText="Fetch OSM Data"
btnType="primary"
onClick={() => {
resetFile(setCustomDataExtractUpload);
Expand Down Expand Up @@ -324,6 +324,12 @@ const DataExtract = ({
/>
</>
)}
{additionalFeatureGeojson && (
<p className="fmtm-text-gray-500 fmtm-mt-1">
Total number of additional features:{' '}
<span className="fmtm-font-bold">{additionalFeatureGeojson?.features?.length || 0}</span>
</p>
)}
</div>
)}
</div>
Expand All @@ -340,7 +346,7 @@ const DataExtract = ({
btnType="primary"
type="submit"
className="fmtm-font-bold"
dataTip={`${!dataExtractGeojson ? 'Please Generate Map Data First.' : ''}`}
dataTip={`${!dataExtractGeojson ? 'Please Fetch OSM Data First.' : ''}`}
disabled={
!dataExtractGeojson || (extractWays === 'osm_data_extract' && !dataExtractGeojson) || isFgbFetching
? true
Expand Down
5 changes: 2 additions & 3 deletions src/frontend/src/components/createnewproject/Description.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ const UploadArea = ({ hoveredSection }: hoveredSectionType) => {
ref={drawRef}
className={`${hoveredSection === 'uploadarea-draw' && 'fmtm-text-gray-800'} fmtm-duration-150`}
>
<p>You may also draw a freehand polygon on map interface.</p>{' '}
<p>Click on the reset button to redraw the AOI.</p>
<p>You can draw a freehand polygon on map interface.</p> <p>Click on the reset button to redraw the AOI.</p>
</div>
<div
ref={uploadRef}
className={`${hoveredSection === 'uploadarea-upload_file' && 'fmtm-text-gray-800'} fmtm-duration-150`}
>
<p>You can choose to upload the AOI. Note: The file upload only supports .geojson format. </p>
<p>You may also choose to upload the AOI. Note: The file upload only supports .geojson format. </p>
</div>
<span>The total area of the AOI is also calculated and displayed on the screen.</span>
<p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const SelectForm = ({ flag, geojsonFile, customFormFile, setCustomFormFile }) =>
onChange={changeFileHandler}
onResetFile={resetFile}
customFile={customFormFile}
btnText="Select a Form"
btnText="Upload XLSForm"
accept=".xls,.xlsx,.xml"
fileDescription="*The supported file formats are .xlsx, .xls, .xml"
errorMsg={errors.customFormUpload}
Expand Down
10 changes: 2 additions & 8 deletions src/frontend/src/components/createnewproject/SplitTasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const SplitTasks = ({ flag, setGeojsonFile, customDataExtractUpload, additionalF
{
name: 'define_tasks',
value: task_split_type.CHOOSE_AREA_AS_TASK,
label: 'Choose area as task',
label: 'Use uploaded AOI as task areas',
disabled: false,
},
{
Expand Down Expand Up @@ -240,7 +240,7 @@ const SplitTasks = ({ flag, setGeojsonFile, customDataExtractUpload, additionalF
<div>
<RadioButton
value={splitTasksSelection || ''}
topic="Select an option to split the task"
topic="Select an option to split your project area"
options={taskSplitOptions}
direction="column"
onChangeData={(value) => {
Expand All @@ -267,12 +267,6 @@ const SplitTasks = ({ flag, setGeojsonFile, customDataExtractUpload, additionalF
Total number of features:{' '}
<span className="fmtm-font-bold">{dataExtractGeojson?.features?.length || 0}</span>
</p>
{additionalFeatureGeojson && (
<p className="fmtm-text-gray-500 fmtm-mt-1">
Total number of additional features:{' '}
<span className="fmtm-font-bold">{additionalFeatureGeojson?.features?.length || 0}</span>
</p>
)}
</div>
{splitTasksSelection === task_split_type.DIVIDE_ON_SQUARE && (
<>
Expand Down
21 changes: 9 additions & 12 deletions src/frontend/src/components/createnewproject/UploadArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,14 @@ const UploadArea = ({ flag, geojsonFile, setGeojsonFile, setCustomDataExtractUpl
{uploadAreaSelection === 'draw' && (
<div>
<p className="fmtm-text-gray-700 fmtm-pt-5 fmtm-pb-5">Draw a polygon on the map to plot the area</p>
<Button
btnText="Reset"
btnType="secondary"
type="button"
onClick={() => resetFile()}
className=""
disabled={drawnGeojson ? false : true}
/>
<p className="fmtm-text-gray-700 fmtm-mt-5">
Total Area: <span className="fmtm-font-bold">{totalAreaSelection}</span>
</p>
{drawnGeojson && (
<>
<Button btnText="Reset" btnType="secondary" type="button" onClick={() => resetFile()} />
<p className="fmtm-text-gray-700 fmtm-mt-5">
Total Area: <span className="fmtm-font-bold">{totalAreaSelection}</span>
</p>
</>
)}
{errors.drawnGeojson && (
<div>
<p className="fmtm-form-error fmtm-text-red-600 fmtm-text-sm fmtm-py-1">{errors.drawnGeojson}</p>
Expand All @@ -278,7 +275,7 @@ const UploadArea = ({ flag, geojsonFile, setGeojsonFile, setCustomDataExtractUpl
onResetFile={resetFile}
accept=".geojson, .json"
fileDescription="*The supported file format is geojson file."
btnText="Upload a Geojson"
btnText="Upload"
errorMsg={errors.uploadedAreaFile}
/>
<p className="fmtm-text-gray-700">
Expand Down
Loading