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
Bootstrap3 migration for frontend templates #1569
Conversation
… by side. Start migrating frontend templates and styles.
Thanks for that huge amount of work! Some comments:
I know my OCD is more severe than normal people's - I'm happy to do any or all of these steps myself as well :) |
@kapt, this is great work, thank you! Can't wait to merge this. Like Markus said, we're happy to pick it up from here; just let us know how you'd like to proceed. |
For reference, this is the PR for issue #1014. |
@mbertheau I am a kind of a newbie with git: I don't know how to quickly rewrite old commits and I don't have more time to learn. But I fixed the 4 points you listed above. Sorry for the messy commits. |
@kapt very nice, thank you! We'll take it from here :) |
I pushed a preliminary reorganized branch to https://github.com/django-oscar/django-oscar/commits/bootstrap3. @kapt I didn't understand two changes: In 24bafbe kapt renamed the bootstrap2 responsive CSS. Was this strictly necessary, was it just to make clear that this file belongs to bootstrap2, or was there another reason? I will later separate frontend and dashboard further by loading no CSS or javascript in the shared |
I updated https://github.com/django-oscar/django-oscar/commits/bootstrap3 to remove the dashboard changes and the rename. A cursory glance at frontend and dashboard found no issues. After a thorough review from someone else I'll be glad to merge :) |
Hi! I started a new ecommerce project last week... again with oscar 👍 Today I worked a bit with the boostrap3 branch. I've some small suggestions:
|
I'm happy for this to be merged. Two things first though:
$ make css
# Compile CSS files from LESS
lessc --source-map --source-map-less-inline oscar/static/oscar/less/styles.less oscar/static/oscar/css/styles.css
lessc --source-map --source-map-less-inline oscar/static/oscar/less/responsive.less oscar/static/oscar/css/responsive.css
lessc --source-map --source-map-less-inline oscar/static/oscar/less/dashboard.less oscar/static/oscar/css/dashboard.css
# Compile CSS for demo site
lessc --source-map --source-map-less-inline sites/demo/static/demo/less/styles.less sites/demo/static/demo/css/styles.css
NameError: #grid > .core > .span is undefined in /Users/david/Workspace/django-oscar/sites/demo/static/demo/less/bootstrap/navbar.less on line 208, column 3:
207 .navbar-fixed-bottom .container {
208 #grid > .core > .span(@gridColumns);
209 } |
@codeinthehole we have something about the less version here: https://github.com/django-oscar/django-oscar/blob/master/docs/source/internals/contributing/development-environment.rst#writing-lesscss Do you think there's another place we should mention the less version? I'll update the release notes. I also addressed 8858208#commitcomment-8755258. |
@ITAbu thank you very much for your suggestions. I'll try them out and add them to this PR :-) |
Note to self: fix messages error tag from bootstrap2 error to bootstrap3 danger |
@ITAbu: why would you remove |
This allows us to use different CSS frameworks for frontend and dashboard. Part of #1569
Things explicitly shared between frontend and dashboard, in base.html: * jQuery Things referenced in both respective layout.html files so as to allow for hassle-free implementor customization of frontend and dashboard independently: * js/bootstrap/bootstrap.min.js * js/oscar/ui.js Part of #1569
This allows us to use different CSS frameworks for frontend and dashboard. Part of #1569
Things explicitly shared between frontend and dashboard, in base.html: * jQuery Things referenced in both respective layout.html files so as to allow for hassle-free implementor customization of frontend and dashboard independently: * js/bootstrap/bootstrap.min.js * js/oscar/ui.js Part of #1569
The the grid gutter padding was removed with .no-padding only on the main catalogue browse page, leaving search results, recent products on detail view and a number of other pages that have product pod lists in them with a double padding. Part of #1569
@mbertheau Sorry, didn't realise we already mentioned that about less. I did try to check but grepped the docs for |
@mbertheau whoops my bad, it's a misprint from a copy & paste. I had a glance at the latest commits and I have a 'lastminuteonelinechange' :) Now there are gutters around the |
This allows us to use different CSS frameworks for frontend and dashboard. Part of #1569
Things explicitly shared between frontend and dashboard, in base.html: * jQuery Things referenced in both respective layout.html files so as to allow for hassle-free implementor customization of frontend and dashboard independently: * js/bootstrap/bootstrap.min.js * js/oscar/ui.js Part of #1569
The the grid gutter padding was removed with .no-padding only on the main catalogue browse page, leaving search results, recent products on detail view and a number of other pages that have product pod lists in them with a double padding. Part of #1569
@itbabu, thanks, very reasonable, I changed as you said :) |
We did our best to keep the UI close to the bootstrap2 version, but there are some differences.
Some partials were shared between dashboard templates and frontend templates, so we had to duplicate them in dashboard/partials/.