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

move Chat component logic to separate file #1000

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

davidschinteie
Copy link
Contributor

Motivation and Context

  1. Why is this change required?

    • This change is required to improve the modularity and readability.
  2. What problem does it solve?

    • This change reduces the complexity of the app.tsx file by isolating the <Chat /> component into its own file.
  3. What scenario does it contribute to?

    • This contributes to scenarios where developers need to work on or debug the <Chat/> component independently of the main app logic. It also makes it easier for new developers to understand the structure of the application.
  4. If it fixes an open issue, please link to the issue here.

    • Not applicable/This PR does not address a specific open issue.

Description

In this PR, I have created a new file named Chat.tsx and moved the relevant JSX and TypeScript code from app.tsx into this new component file. The main goals were to enhance modularity and readability. Here are some specifics:

  • File Creation: A new file Chat.tsx was created.
  • Code Migration: Logic specific to <Chat /> was moved from app.tsx to the new file.
  • Testing: Ensured that the application behaves as expected after the component migration. No functionality has been altered, only restructured.
  • Imports/Exports: Updated import statements in app.tsx to reflect the change.

Contribution Checklist

@github-actions github-actions bot added the webapp Pull requests that update Typescript code label Jun 7, 2024
@davidschinteie
Copy link
Contributor Author

License

@microsoft-github-policy-service agree

Copy link
Collaborator

@glahaye glahaye left a comment

Choose a reason for hiding this comment

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

Thanks for the change

@glahaye glahaye added this pull request to the merge queue Jun 12, 2024
Merged via the queue into microsoft:main with commit 2f182d2 Jun 12, 2024
6 checks passed
teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
### Motivation and Context

<!-- Thank you for your contribution to the chat-copilot repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

1. Why is this change required?
   - This change is required to improve the modularity and readability.

2. What problem does it solve?
- This change reduces the complexity of the app.tsx file by isolating
the `<Chat />` component into its own file.

3. What scenario does it contribute to?

- This contributes to scenarios where developers need to work on or
debug the `<Chat/>` component independently of the main app logic. It
also makes it easier for new developers to understand the structure of
the application.

4. If it fixes an open issue, please link to the issue here.

   - Not applicable/This PR does not address a specific open issue.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

In this PR, I have created a new file named `Chat.tsx` and moved the
relevant JSX and TypeScript code from app.tsx into this new component
file. The main goals were to enhance modularity and readability. Here
are some specifics:

- File Creation: A new file Chat.tsx was created.
- Code Migration: Logic specific to `<Chat />` was moved from app.tsx to
the new file.
- Testing: Ensured that the application behaves as expected after the
component migration. No functionality has been altered, only
restructured.
- Imports/Exports: Updated import statements in app.tsx to reflect the
change.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
webapp Pull requests that update Typescript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants