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

Reuse team-overview and team-type-effectiveness on help page #18

Open
mirekdlugosz opened this issue Jul 2, 2018 · 4 comments
Open
Labels
help wanted Extra attention is needed

Comments

@mirekdlugosz
Copy link
Owner

We use output created by team-overview and team-type-effectiveness in help page. Not only this looks terrible in source code, but also require us to keep help page structure in sync with actual output of application. It would be nice if we could just use Angular components instead.

One major problem is that both of these components are tied to team definition (provided by team service), which describes empty team on static pages.

@mirekdlugosz mirekdlugosz added the help wanted Extra attention is needed label Jul 2, 2018
@thecouchcoder
Copy link
Contributor

Could we simply have some fake data that gets used on the help page?

@mirekdlugosz
Copy link
Owner Author

I'm not sure if I understand correctly what you mean. Could you elaborate, give brief description of what your idea / approach would be?

@thecouchcoder
Copy link
Contributor

Of course.
You say One major problem is that both of these components are tied to team definition (provided by team service), which describes empty team on static pages.

I took that to mean team-overview.component.ts has TeamService injected in the constructor and uses this to generate the correct number of resists, weak to, etc. Team will be empty on the help page currently.

I was thinking on help page we could use the method fillTeamData from TeamService to create a hard coded team to display on the help page. Then we could use the team-overview-component on the help page to show data from the hard coded team we setup.

@mirekdlugosz
Copy link
Owner Author

Thanks for explanation.

Yes, this approach sounds reasonable to me. I'm not that worried about maintaining separate copy of this data (moves and Pokemon types change rarely), and I'm totally OK with not making any API calls on help page. I'm mostly concerned that if we ever change main page components structure, the same changes must be applied manually on help page. What you describe looks like a way to solve this problem.

If you would like to try and work on this, please go ahead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants