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

[DYN-6868] migrate to typeScript #24

Merged
merged 21 commits into from
Jul 9, 2024

Conversation

Enzo707
Copy link
Contributor

@Enzo707 Enzo707 commented Jun 28, 2024

This PR is for migrating DynamoHome from js to typeScript as a first step before adding test coverage.
Ref.: DYN-6868

Review
@QilongTang
@dnenov

package.json Outdated
@@ -3,16 +3,16 @@
"version": "1.0.15",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please bump up version always

@QilongTang
Copy link
Collaborator

@Enzo707 Did you get the chance to fix the unit tests?

import { Sidebar } from './Sidebar/Sidebar.jsx';
import { useState } from 'react';
import { MainContent } from '../components/MainContent';
import { Sidebar } from '../components/Sidebar/Sidebar';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant we import from the same folder?

Copy link
Contributor Author

@Enzo707 Enzo707 Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can also implement an index file and import everything from feature folder or just from /components root:

import { MainContent } from './MainContent';  
import { Sidebar } from './Sidebar';

Or

import { MainContent, Sidebar } from './';

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Enzo707 Would you update? I would like the import statements to be consistent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@QilongTang I already updated the imports. PTAL

import { useState, useEffect } from 'react';
import { RecentPage } from '../components/Recent/PageRecent';
import { SamplesPage } from '../components/Samples/PageSamples';
import { LearningPage } from '../components/Learning/PageLearning';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question here

import { GridViewIcon, ListViewIcon } from '../Common/CustomIcons.jsx';
import { openFile, saveHomePageSettings } from '../../functions/utility.js';
import { GraphGridItem } from './GraphGridItem';
import { CustomNameCellRenderer } from './CustomNameCellRenderer';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are able to import from the folder here?

Copy link
Collaborator

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with couple questions

@QilongTang QilongTang merged commit 91c9f39 into DynamoDS:master Jul 9, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants