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

Implementation of Linked Issues Component in Issue Modal #10

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

claygorman
Copy link
Contributor

@claygorman claygorman commented Dec 20, 2023

Type

Enhancement


Description

This PR introduces a new component called 'IssueLinkedIssues' to the issue modal. This component displays a list of issues linked to the current one. The main changes include:

  • Creation of the 'IssueLinkedIssues' component with sample data. The data structure will be updated in the future to pull live data from the backend.
  • Addition of 'IssueLinkedIssues' component to the 'IssueOverview' component.
  • Addition of 'search' and 'searchOperator' fields to the 'QueryIssueInput' type.

PR changes walkthrough

Relevant files                                                                                                                                 
Enhancement
3 files
IssueLinkedIssues.tsx                                                                             
    frontend/components/IssueModal/IssueLinkedIssues.tsx

    This file introduces a new component 'IssueLinkedIssues'
    that displays a list of issues linked to the current one. It
    currently uses sample data which will be replaced with live
    data from the backend in the future.
+63/-0
IssueOverview.tsx                                                                                     
    frontend/components/IssueModal/IssueOverview.tsx

    The 'IssueLinkedIssues' component has been added to the
    'IssueOverview' component.
+4/-0
graphql.ts                                                                                                   
    frontend/gql/__generated__/graphql.ts

    The 'QueryIssueInput' type has been updated to include
    'search' and 'searchOperator' fields.
+2/-0

A new component called 'IssueLinkedIssues' has been added to the issue modal, which displays the list of issues linked to the current one. It includes sample data which needs to be replaced by live data from the backend in the future. Additionally, search and searchOperator fields have been added to the QueryIssueInput type.
Copy link
Contributor

PR Analysis

  • 🎯 Main theme: Adding a new component to display linked issues in the issue modal
  • 📝 PR summary: This PR introduces a new component 'IssueLinkedIssues' to the issue modal which displays a list of issues linked to the current one. It currently uses sample data which will be replaced by live data from the backend in the future. The PR also adds 'search' and 'searchOperator' fields to the 'QueryIssueInput' type.
  • 📌 Type of PR: Enhancement
  • ⏱️ Estimated effort to review [1-5]: 2, because the PR is relatively small and straightforward, adding a new component and minor changes to existing ones.
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: The PR is well-structured and the new component is implemented cleanly. However, it would be beneficial to add some tests to ensure the new component works as expected. Also, consider replacing the hardcoded sample data with a mock service until the backend is ready.

  • 🤖 Code feedback:
    relevant filefrontend/components/IssueModal/IssueLinkedIssues.tsx
    suggestion      Consider using a mock service to fetch the data instead of hardcoding it. This will make it easier to switch to the live data once the backend is ready. [medium]
    relevant line// TODO: This is sample data we need to pull from backend

    relevant filefrontend/components/IssueModal/IssueLinkedIssues.tsx
    suggestion      It would be beneficial to add error handling for the case where the data fetch fails or returns an error. [important]
    relevant lineconst IssueLinkedIssues = ({ issueId }: { issueId?: string }) => {

    relevant filefrontend/components/IssueModal/IssueLinkedIssues.tsx
    suggestion      Consider adding PropTypes for the new component to ensure type safety. [medium]
    relevant lineconst IssueLinkedIssues = ({ issueId }: { issueId?: string }) => {

    relevant filefrontend/gql/__generated__/graphql.ts
    suggestion      It would be good to add some comments explaining the purpose of the new fields 'search' and 'searchOperator' in the 'QueryIssueInput' type. [medium]
    relevant linesearch?: InputMaybe;

How to use

Instructions

To invoke the PR-Agent, add a comment using one of the following commands:
/review: Request a review of your Pull Request.
/describe: Update the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
/ask <QUESTION>: Ask a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.
/add_docs: Generate docstring for new components introduced in the PR.
/generate_labels: Generate labels for the PR based on the PR's contents.
see the tools guide for more details.

To edit any configuration parameter from the configuration.toml, add --config_path=new_value.
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, add a /config comment.

@claygorman
Copy link
Contributor Author

/improve

Comment on lines +8 to +24
const blockedIssues = [
{
id: 1,
key: 'ticket-1',
subject: 'PLACEHOLDER: blocked ticket subject',
priority: 3,
assignee: 'test',
status: 'in progress',
},
{
id: 2,
key: 'ticket-2',
subject: 'PLACEHOLDER: next ticket name',
priority: 5,
assignee: 'test',
status: 'done',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Use a more descriptive name for the 'blockedIssues' constant. The name should reflect that it's sample data and not actual blocked issues.

Suggested change
const blockedIssues = [
{
id: 1,
key: 'ticket-1',
subject: 'PLACEHOLDER: blocked ticket subject',
priority: 3,
assignee: 'test',
status: 'in progress',
},
{
id: 2,
key: 'ticket-2',
subject: 'PLACEHOLDER: next ticket name',
priority: 5,
assignee: 'test',
status: 'done',
},
const sampleBlockedIssues = [
{
id: 1,
key: 'ticket-1',
subject: 'PLACEHOLDER: blocked ticket subject',
priority: 3,
assignee: 'test',
status: 'in progress',
},
{
id: 2,
key: 'ticket-2',
subject: 'PLACEHOLDER: next ticket name',
priority: 5,
assignee: 'test',
status: 'done',
},
];

frontend/components/IssueModal/IssueLinkedIssues.tsx Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@claygorman
Copy link
Contributor Author

/describe

@github-actions github-actions bot changed the title Add linked issues component to issue modal Implementation of Linked Issues Component in Issue Modal Dec 20, 2023
@github-actions github-actions bot added the enhancement New feature or request label Dec 20, 2023
Copy link
Contributor

PR Description updated to latest commit (03b7e8e)

@claygorman claygorman merged commit 7b0882f into master Dec 20, 2023
2 checks passed
@claygorman claygorman deleted the linked-issue-fe branch December 20, 2023 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant