Conversation
Member
|
@hawkrives I am a big fan of this reorg 👍 |
Member
|
@hawkrives if you need help cleaning up merge conflicts, let me know |
This was referenced Aug 25, 2018
This was referenced Aug 26, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was originally a proof of concept that got a bit out of hand… and actually worked.
components/up undersource/source/init/folder for "initialization files" – think bugsnag, GA, etcAnd then, the big change is that it changes what a "view" is.
We currently kinda abuse the notion of a "view" – we call the thing that is produced by tapping a homescreen button a view, but we have nowhere for the detail views (or the views housed under the tab bars) to live, so they just kinda wander around.
This branch introduces the concept of a "module," which is a discrete … view. Each tab in a tabbed view is a module (
OtherModesTransitView,StudentJobPostingsView), as is each top-level view (those that are more than just a tab switcher, at least) –BonAppMenuView,CalendarEventsListView,BusLineView, for example.These "modules" are then composed into an actual "view", which is somehow presented by the app (usually by the homescreen buttons, but also by the toolbar buttons.)
Here's an example "view":
AAO-React-Native/source/views/campus-dictionary.js
Lines 1 to 20 in 94f6032
Every view must export two named exports:
navigationandview.navigationis used by the navigation system to allow links and buttons to work, and the keys there must be globally unique. All exported "navigation" exports are joined together into one giant object to create the currentnavigation.js.viewis used by the homescreen to render the buttons. (There's also a new type of view,hidden, which facilitates the toolbar buttons.)I think that this new organization method really shines in its consistency across all of our views – the "view" is now responsible for creating the tabs, and the content of each tab has to be created in a "module" and imported into the view.
This PR is not intended to be merged anytime soon. I just wanted to open it so it didn't languish in GitHub purgatory. (… actually, looking it over again, it needs some cleanup even beyond the merge conflicts. Some of the restructuring I did for the modules resulted in some code duplication, so I haven't found the right balance of "module separation" yet.)
I'd be interested to hear your thoughts, either here or in person, @elijahverdoorn.