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

feat: tup-700 @tacc/core-components node pkg #239

Closed
Closed
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: 0 additions & 2 deletions react/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
dist/
build/
coverage/
src/core-components/
src/core-wrappers/
10 changes: 5 additions & 5 deletions react/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
coverageDirectory: 'coverage',

// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: ['src/core-components/', 'src/core-wrappers'],
// coveragePathIgnorePatterns: ['src/some-components/', 'src/some-wrappers'],

// Indicates which provider should be used to instrument code for coverage
// coverageProvider: "babel",
Expand Down Expand Up @@ -157,10 +157,10 @@ module.exports = {
// ],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: [
'<rootDir>/src/core-components/',
'<rootDir>/src/core-wrappers/',
],
// testPathIgnorePatterns: [
// '<rootDir>/src/some-components/',
// '<rootDir>/src/some-wrappers/',
// ],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
Expand Down
8,350 changes: 7,758 additions & 592 deletions react/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@babel/preset-typescript": "^7.21.0",
"@changey/react-leaflet-markercluster": "^4.0.0-rc1",
"@reduxjs/toolkit": "^1.8.4",
"@tacc/core-components": "file:../../tacc-core-components-0.0.1.tgz",
"@tacc/core-styles": "^2.24.1",
"@testing-library/react": "^13.4.0",
"@turf/turf": "^6.5.0",
Expand Down
35 changes: 23 additions & 12 deletions react/src/components/CreateMapModal/CreateMapModal.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import React, { useState, useEffect } from 'react';
import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import { Button } from '../../core-components';
import { Button } from '@tacc/core-components';
import styles from './CreateMapModal.module.css';
import { Formik, Form } from 'formik';
import { Formik, Form, Field } from 'formik';
import * as Yup from 'yup';
import useCreateProject from '../../hooks/projects/useCreateProject';
import useAuthenticatedUser from '../../hooks/user/useAuthenticatedUser';
import { useNavigate } from 'react-router-dom';
import { ProjectRequest } from '../../types';
import {
FieldWrapperFormik,
FormikInput,
FormikTextarea,
FormikCheck,
} from '../../core-wrappers';
} from '@tacc/core-components';
// import {
// FormikInput,
// FormikTextarea,
// FormikCheck,
// } from '../../core-wrappers';

type CreateMapModalProps = {
isOpen: boolean;
Expand Down Expand Up @@ -115,21 +119,26 @@ const CreateMapModal = ({
}, [values.name, values.system_file, setFieldValue, previousName]);

return (
<Form className="c-form">
<FieldWrapperFormik name="map-form-info" label="">
<FormikInput
<Form className="c-form" name="map-form-info">
{/* TODO: Remove superfluous empty tag, and re-nest markup */}
{/* NOTE: Added to simplify diff of PR #239 */}
<>
<Field
component={FormikInput}
name="name"
label="Name"
required
data-testid="name-input"
/>
<FormikTextarea
<Field
component={FormikTextarea}
name="description"
label="Description"
required
/>
<div className={`${styles['field-wrapper']}`}>
<FormikInput
<Field
component={FormikInput}
name="system_file"
label="Custom File Name"
required
Expand All @@ -140,20 +149,22 @@ const CreateMapModal = ({
</span>
</div>
<div className={`${styles['field-wrapper-alt']}`}>
<FormikInput
<Field
component={FormikInput}
name="save-location"
label="Save Location"
value={`/${userData?.username}`}
readOnly
disabled
/>
</div>
<FormikCheck
<Field
component={FormikCheck}
name="syncFolder"
label="Sync Folder"
description="When enabled, files in this folder are automatically synced into the map periodically."
/>
</FieldWrapperFormik>
</>
{errorMessage && (
<div className="c-form__errors">{errorMessage}</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/MapProjectNavBar/MapProjectNavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useLocation } from 'react-router-dom';
import styles from './MapProjectNavBar.module.css';
import { QueryNavItem } from '../../core-wrappers';
import { QueryNavItem } from '@tacc/core-components';
import { queryPanelKey, Panel } from '../../utils/panels';

import assetsImage from '../../assets/assets.png';
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/Projects/ProjectListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
useProjects,
mergeDesignSafeProject,
} from '../../hooks';
import { Button, LoadingSpinner } from '../../core-components';
import { Button, LoadingSpinner } from '@tacc/core-components';
import CreateMapModal from '../CreateMapModal/CreateMapModal';

export const ProjectListing: React.FC = () => {
Expand Down
9 changes: 0 additions & 9 deletions react/src/core-components/Button/Button.module.css

This file was deleted.

109 changes: 0 additions & 109 deletions react/src/core-components/Button/Button.test.jsx

This file was deleted.

116 changes: 0 additions & 116 deletions react/src/core-components/Button/Button.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions react/src/core-components/Button/index.ts

This file was deleted.

Loading
Loading