-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Task/WG-260 add map control bar (#303)
* Keep track of mouse position using context/hook * Add docstr * Add useFeatureLoadingState hook * Add map hooks to index * Add position tracker to Map * Add missing index * Update package-lock.json * Add useFeatureLoadingState to index * Add MapControlBar * Add hook to get projects users and use in control bar * Improve project errors and handle switching to private map * Add useDesignProject hook * Rework ds project type and fixture * Update package-lock.json after merge main * Rework styling/layout * update to new react-query and lint issues * Remove unused properties * Remove error as handled elswhere * Format file * Improve style * Rework useCurrentFeatures * Fix tests * Refactor return type of useCurrentFeatures * Update useCurrentFeatures test * Add tests * Add tests * Add usefull comment to see request mocks * Fix test issue * Fix some lint errors * Fix some lint warnings * Add package-lock * Refactor MapProjectAccessError into own file Simpilfy MapProject * Fix merge conflict resoltion errors * Update package-lock.json * Use antd Text Spacing and ellipses were broken with upstream changes; unclear if my previous styles were incorrect or imcompatible. * Update useDsProjects to useDesignSafeProjects
- Loading branch information
1 parent
8acdb9e
commit 8e8c6de
Showing
36 changed files
with
1,129 additions
and
284 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 |
---|---|---|
|
@@ -5,82 +5,80 @@ import { | |
ProjectRequest, | ||
} from '../types'; | ||
|
||
export const designSafeProjectMock: DesignSafeProject = { | ||
uuid: 'proj-uuid', | ||
name: 'designsafe.project', | ||
created: '2019-10-31T16:04:26.327Z', | ||
lastUpdated: '2019-10-31T16:04:30.163Z', | ||
associationIds: [], | ||
value: { | ||
dois: [], | ||
coPis: [], | ||
title: 'Sample DesignSafe Project', | ||
users: [ | ||
{ | ||
inst: 'University of Texas at Austin (utexas.edu)', | ||
role: 'pi', | ||
email: '[email protected]', | ||
fname: 'Fixture First Name', | ||
lname: 'Fixture Last Name', | ||
username: 'fixture1Username', | ||
}, | ||
{ | ||
inst: 'University of Texas at Austin (utexas.edu)', | ||
role: 'co_pi', | ||
email: '[email protected]', | ||
fname: 'Tester', | ||
lname: 'Test', | ||
username: 'fixture2Username', | ||
}, | ||
], | ||
authors: [], | ||
frTypes: [], | ||
nhEvent: '', | ||
nhTypes: [], | ||
fileObjs: [], | ||
fileTags: [], | ||
keywords: [], | ||
nhEvents: [], | ||
dataTypes: [], | ||
projectId: 'proj-id', | ||
tombstone: false, | ||
facilities: [], | ||
nhLatitude: '', | ||
nhLocation: '', | ||
description: 'Map Test description required.', | ||
nhLongitude: '', | ||
projectType: 'None', | ||
teamMembers: [], | ||
awardNumbers: [], | ||
guestMembers: [], | ||
hazmapperMaps: [ | ||
{ | ||
name: 'Hazmapper_TestProject', | ||
path: '/', | ||
uuid: '620aeaf4-f813-4b90-ba52-bc87cfa7b07b', | ||
deployment: 'production', | ||
}, | ||
], | ||
referencedData: [], | ||
associatedProjects: [], | ||
}, | ||
}; | ||
|
||
export const projectMock: Project = { | ||
id: 1, | ||
uuid: 'abc123', | ||
name: 'Sample Project', | ||
description: 'A sample project for testing purposes.', | ||
public: true, | ||
system_file: 'sample-file', | ||
system_id: 'sample-id', | ||
system_id: | ||
'project-1234' /* 'project-' prefix implies its a DesignSafe project system */, | ||
system_path: '/path/to/sample', | ||
deletable: true, | ||
streetview_instances: null, | ||
ds_project: { | ||
uuid: 'proj-uuid', | ||
projectId: 'proj-id', | ||
title: 'Sample DesignSafe Project', | ||
value: { | ||
dois: [], | ||
coPis: [], | ||
title: 'Hazmapper V3 PROD Map Test 2024.08.07', | ||
users: [ | ||
{ | ||
inst: 'University of Texas at Austin (utexas.edu)', | ||
role: 'pi', | ||
email: '[email protected]', | ||
fname: 'Fixture First Name', | ||
lname: 'Fixture Last Name', | ||
username: 'fixture1Username', | ||
}, | ||
{ | ||
inst: 'University of Texas at Austin (utexas.edu)', | ||
role: 'co_pi', | ||
email: '[email protected]', | ||
fname: 'Tester', | ||
lname: 'Test', | ||
username: 'fixture2Username', | ||
}, | ||
], | ||
authors: [], | ||
frTypes: [], | ||
nhEvent: '', | ||
nhTypes: [], | ||
fileObjs: [], | ||
fileTags: [], | ||
keywords: [], | ||
nhEvents: [], | ||
dataTypes: [], | ||
projectId: 'PRJ-5566', | ||
tombstone: false, | ||
facilities: [], | ||
nhLatitude: '', | ||
nhLocation: '', | ||
description: 'Map Test description required.', | ||
nhLongitude: '', | ||
projectType: 'None', | ||
teamMembers: [], | ||
awardNumbers: [], | ||
guestMembers: [], | ||
hazmapperMaps: [ | ||
{ | ||
name: 'Hazmapper_TestProject', | ||
path: '/', | ||
uuid: '620aeaf4-f813-4b90-ba52-bc87cfa7b07b', | ||
deployment: 'production', | ||
}, | ||
], | ||
referencedData: [], | ||
associatedProjects: [], | ||
}, | ||
}, | ||
}; | ||
|
||
export const designSafeProjectMock: DesignSafeProject = { | ||
uuid: 'proj-uuid', | ||
projectId: 'proj-id', | ||
title: 'Sample DesignSafe Project', | ||
value: {}, | ||
ds_project: designSafeProjectMock, | ||
}; | ||
|
||
export const designSafeProjectCollectionMock: DesignSafeProjectCollection = { | ||
|
This file contains 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 @@ | ||
export const users = [{ id: 1, username: 'user' }]; |
This file contains 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 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 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
Oops, something went wrong.