This repository was archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Hybrid projects #38
Merged
Merged
Hybrid projects #38
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e0502cf
Initialized section and readme
zacharyhalvorson c0f443b
Added link to block comments page
zacharyhalvorson 0f3827e
Added recommended structure
zacharyhalvorson 15d9c3a
Added new page to index
zacharyhalvorson d46cd76
syntax fix
zacharyhalvorson 5855d2b
more syntax fixes
zacharyhalvorson 48e8a7d
More changes to recommended stylesheet
zacharyhalvorson 8682ee6
Added iOS to the example structure
zacharyhalvorson b280692
Rewording intro
zacharyhalvorson 2869ed6
reformatting example css
zacharyhalvorson 218f46d
Responding to UI Dev Feedback
zacharyhalvorson 69f6706
Added intended strategy for new builds.
zacharyhalvorson fca3705
Added link to CSS best practices readme
zacharyhalvorson c0738db
Fix SCSS comments to match our conventions
jeffkamo 39ac6da
Fixed typo in title of section
zacharyhalvorson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Hybrid App Projects | ||
|
|
||
| ## Structuring App Styles For a Legacy Mobify Site | ||
|
|
||
| CSS written specifically for webviews contained in a Native application should follow all normally prescribed [best practices](https://github.com/mobify/mobify-code-style/tree/master/css/css-best-practices). This page will outline how to start a new app project, avoid adhering to legacy CSS code style, and provide a minimally sized CSS file to the web. | ||
|
|
||
| A hybrid project has a stylesheet specific to the OS. So a typical app project for a legacy Mobify project would be structured as such: | ||
|
|
||
| ``` | ||
| /styles | ||
| /vellum | ||
| /components | ||
| /partials | ||
| /templates | ||
|
|
||
| /ios | ||
| /components | ||
| /partials | ||
| /templates | ||
|
|
||
| /android | ||
| /components | ||
| /partials | ||
| /templates | ||
|
|
||
| stylesheet.scss | ||
| ios.scss | ||
| android.scss | ||
| ``` | ||
|
|
||
| ``android.css`` will include all of the web styles and override them as needed. Building on top of whats there with all the styles specific to that OS will help in keeping the system maintainable. The system used to build out an example ``android.css`` would look something like this: | ||
|
|
||
| ```scss | ||
| // Android Styles | ||
| // === | ||
|
|
||
|
|
||
| // Web Base Styles | ||
| // --- | ||
|
|
||
| @import stylesheet.scss | ||
|
|
||
|
|
||
| // Components | ||
| // --- | ||
|
|
||
| @import 'android/components/arrange'; | ||
| @import 'android/components/card'; | ||
| @import 'android/components/stack'; | ||
|
|
||
|
|
||
| // Templates | ||
| // --- | ||
|
|
||
| @import 'android/templates/login'; | ||
| @import 'android/templates/store-finder'; | ||
| @import 'android/templates/store-details'; | ||
| @import 'android/templates/search-error'; | ||
| ``` | ||
|
|
||
| Stylesheets will be generated and served to the page depending on the context. If it’s an android app it gets ``android.css``, if its a website it gets ``stylesheet.css``, etc. | ||
|
|
||
| ## Structuring App Styles For a New Mobify Site | ||
|
|
||
| The current intended strategy in mind for future new builds is to have a single stylesheet for all platforms. Incorporating platform-specific theming and components into our existing CSS system. | ||
|
|
||
| This could serve to decrease the complexity associated with the system we use for legacy Mobify sites and potentially make hybrid projects easier to maintain. | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch is called "hybrid-apps", but we're talking about android here. Do we want to make this generic and call it hybrid, or are we wanting a separate file for iOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I know we did this because it was the fastest way to get app-specific changes, but I just want to make sure, is the consensus to have a separate file for different platforms as our long term solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it seems like an efficient way to utilize the cascade and keep the different projects somewhat separate. I only had android.css in there to illustrate an example, I'll put iOS in there as well to avoid any confusion.