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

Modularize flavors and base apps #656

Open
modulitos opened this issue Mar 13, 2017 · 1 comment
Open

Modularize flavors and base apps #656

modulitos opened this issue Mar 13, 2017 · 1 comment

Comments

@modulitos
Copy link
Member

modulitos commented Mar 13, 2017

We need better dependency management for our flavors and base apps. These currently exist as separate Django applications, where each flavor lives as a folder under our flavors app. This is creating a monolithic repo, which contains all flavors, and does not manage the dependencies of each flavor with the base flavor.

To fix this, our flavors and our base apps should be modularized, where a flavor app requires the base app dependency, and uses semantic versioning to do so. So I think we should package each flavor that has custom code separately under it's own repo and it should extend our base flavor.

We can do this using Django apps. But since we are moving towards a static site (#655), I think we should finish that issue first, then modularize our flavors using npm modules. We'll still need to figure out a proper API for extending our base module, but I imagine the solution will still involve extending Backbone views as we are currently doing.

So I propose the following TODO's (feel free to update these as needed):

  • Complete Static site conversion #655
  • Create a spec that outlines and API for our base module, and some examples around how a flavor module containing custom code will extend the base module.
@modulitos modulitos mentioned this issue Mar 13, 2017
6 tasks
@zmbc
Copy link
Contributor

zmbc commented Mar 17, 2017

[continuing discussion from #655]

That is a fair point. An API that we could use would be great, although I wonder how difficult it would be to abstract something like that effectively? To take a specific example, think about the feature in the pboakland flavor that swapped the show list button and add a place button when a page was open, then swapped them back when a page was closed. Making that work involved tweaking and overriding several methods inside the app view. To abstract something like that, I feel like we'd need generic "insert button" and "hide button" api calls, combined with events we can listen to that signal state changes (user opened a page, user closed a page, etc.). All of which would be great, but the use case is pretty specific.

Any API that would solve this use case without giving the user the full power of code would be a mess, obviously. 🤣
Examples like these are good things to think about. Can we come up with a coherent, small set of changes that will cover 75% of customizations people want? (Note that this isn't entirely separate from the design of the config--in fact, they're almost the same thing.) I'm not sure what the answer to that question is. If it's "no," then it's probably not worth implementing at all.

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

No branches or pull requests

2 participants