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

Manage duplication between projects #276

Closed
xi opened this issue May 2, 2017 · 1 comment
Closed

Manage duplication between projects #276

xi opened this issue May 2, 2017 · 1 comment
Labels
Dev: Refactor issues to be fixed with code refactor Type: Question issue or PR needing answer

Comments

@xi
Copy link
Contributor

xi commented May 2, 2017

Our projects tend to have a large overlap in terms of features and UI. In the past we tried to limit duplication by sharing a lot of code. The downside of this was that the shared code became very abstract and hard to reason about.

With the switch from a3 to a4, we went the other way and did a lot of duplication. In order to find a good balance, we should think about ways to limit duplication while keeping it simple. At the very least, we should have an understanding of:

  • what is our current approach to code duplication between projects?
  • what are its advantages and limitations?

According to @2e2a, we already have a good balance in the python code. The same is true for CSS. So for now we can concentrate on the templates.

We already tried to work on this in some pull requests (#206, #237, #239). We found that the templates are in fact very similar, but also different in some key places:

  • similar but different permissions (e.g. create_idea / create_proposal) (see refactor item detail templates #206)
  • similar but different URL names (e.g. idea-create / proposal-create) (see refactor item detail templates #206)
  • similar but different navigation (breadcrumbs)
  • different terms that appear in natural language sentences (e.g. "Delete this idea" / "Delete this proposal")
@xi xi added the Dev: Refactor issues to be fixed with code refactor label May 2, 2017
This was referenced May 2, 2017
@xi xi added the Type: Question issue or PR needing answer label May 2, 2017
@xi
Copy link
Contributor Author

xi commented Sep 27, 2017

The current approach of duplicating a lot is fine. Once this becomes a real issue, we can reopen this.

@xi xi closed this as completed Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev: Refactor issues to be fixed with code refactor Type: Question issue or PR needing answer
Projects
None yet
Development

No branches or pull requests

1 participant