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

Redesign/Refactor: Simplify data passed into GeneratorComponent.js from GeneratorList.js #23

Closed
8 tasks done
ash1eygrace opened this issue Mar 26, 2023 · 1 comment
Closed
8 tasks done
Labels

Comments

@ash1eygrace
Copy link
Owner

ash1eygrace commented Mar 26, 2023

Currently, the data being passed from the GeneratorList.js to the GeneratorComponent.js is complex and contains a large amount of unnecessary information. This can lead to performance issues and make it harder to reason about state management. Therefore, I'll want to analyze the data being passed and simplify it, which will not only improve the overall performance and maintainability of our code but also enable us to take advantage of the latest React features.

The main goals of this analysis are to:

  • Analyze the array of objects in GeneratorList.js to identify unnecessary data.
  • Simplify the data being passed from GeneratorList.js to GeneratorComponent.js without compromising the functionality.
  • Potentially redesign the user interface to accommodate the new data flow.

To achieve these goals, I'll need to perform the following tasks:

  • First, consider UX and the data the user should see to make their experience exceptional.
  • Analyze the properties of the object key-value pairs to see if any are not currently being passed as props to the GeneratorComponent.
  • Analyze the array of objects in GeneratorList.js to identify data that is not being used or is redundant.
  • Identify data that can be moved from GeneratorList.js to GeneratorComponent.js to simplify the data flow.
  • Create a new design flow that accommodates the changes made to the data flow.
  • Create modular issues to pick tasks of one by one and complete the entire project. (leave a comment below)
  • Complete all tasks and merge all Pull requests testing to make sure the app still works as expected.
  • Close this issue and give yourself a pat on the back.

Keep in mind that the UX should come first; if the data needs to be contextual to make the UX better, don't delete it just because it'll save space, consider ways to make the same data more modular.

@ash1eygrace
Copy link
Owner Author

ash1eygrace commented Mar 27, 2023

  • First, consider UX and the data the user should see to make their experience exceptional.
  • Analyze the properties of the object key-value pairs to see if any are not currently being passed as props to the GeneratorComponent.
  • Analyze the array of objects in GeneratorList.js to identify data that is not being used or is redundant.
  • Identify data that can be moved from GeneratorList.js to GeneratorComponent.js to simplify the data flow.
  • Create a new design flow that accommodates the changes made to the data flow.

Create modular issues to pick tasks of one by one and complete the entire project. (leave a comment below)

Looked over the data and the following tasks need to be to complete bring this issue to a close:

    • title and h1 in the objects in the data are the same. Remove h1 and replace it with title and update line 41 in GeneratorComponent.js to be <h1>{title}</h1> instead of <h1>{h1}</h1>
    • response1 in the objects in the data is not being used and will not be used. Its goal was to display a contextual message, e.g., response1: 'List of blog post ideas generated by the AI will show here.', instead, hard card the initial <Card.Text> state to say "Response from AI will show here."
    • description2 from the objects in the data should show in the GeneratorComponent.js description under the <h1> {title} </h1>. Update line 42 of GeneratorComponent.js to be <p id="pageDescription">{description2}</p> instead of <p id="pageDescription">{description}</p>
    • remove response1 from the objects in the data and set an initial state description for the GeneratorComponent.js to something like "Response from AI for {title} will display here."
    • remove response2 from the generator objects in the data since and load this state within GeneratorComponent.js using the title prop. e.g.: The AI is thinking up a Response fore {title}"
    • remove response3 from the generator objects in the data and instead display the state in GeneratorComponent.js to something like "{title} for {prompt}:" in the <Card.Header> on line 57.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant