Update default bootstrap version to 4 (latest cdn)#746
Conversation
faustinoaq
left a comment
There was a problem hiding this comment.
Hi @ChangJoo-Park Thank you for your collaboration!, very appreciated! 😄
I left some comments 👍
Btw, I think we should update other generated views as well (forms, grids, show page, recipes, etc)
Ref: https://github.com/amberframework/amber/tree/master/src/amber/cli/templates
| <a class="list-group-item list-group-item-action" target="_blank" href="https://github.com/veelenga/awesome-crystal">List of Awesome Crystal projects and shards</a> | ||
| <a class="list-group-item list-group-item-action" target="_blank" href="https://crystalshards.xyz">What's hot in Crystal right now</a> | ||
| <div class="row"> | ||
| <div id="logo" class="col-sm-6"></div> |
There was a problem hiding this comment.
:ditto: about the col-sm-6 class
There was a problem hiding this comment.
I'll do fix indents
|
Thank you for your awesome reviews! I'll check these. Can you explain for local development? Yesterday, I changed codes and pushed, created new repo again and again. I think it is wrong approach. 😭 |
@ChangJoo-Park Sure, no problem 😉
git clone git@github.com:ChangJoo-Park/amber.git
cd amber
git checkout bootstrap-4 # You already created this branch
git add . # add your modified files
git commit -m "Apply new changes" # commit changes
git push -a origin # Upload all your changesFinally you can see your commits here in this PR 😉 If you want to make new changes just repeat the step 4 the times you want 😄 BTW, if you can't do |
|
BTW, just to be clear, I think grids and forms need to be updated as well 😉 Also we should check views generated by:
And any other generator, (maybe recipes as well @damianham 👀 😅 ) |
|
Thanks @faustinoaq nice detailed explain. |
|
As per this issue The advice is to create a pull request with a single commit and a detailed commit log message so using -m would not allow you to create a detailed commit log message. Also you need to specify the new branchname in the push e.g. I use |
|
How can we get sign in /out and profile to pull right in the nav bar ? |
|
@damianham Did you think like this? |
eliasjpr
left a comment
There was a problem hiding this comment.
Thank you for taking the time to contribute, we truly appreciate it. I have left some small comments
|
I need help for "pull-right"ing auth navs. Someone help this issue? |
|
Yes - this PR is going to update jquery to v3 and bootstrap to v4 and they will still be downloaded from a CDN |
@faraazahmad Right now we're using links, I think we should consider using local assets for offline development, see #746 (comment) @amberframework/contributors Is bad idea to store a local version of Bootstrap or jQuery? WDYT? |
|
@faustinoaq for simplicity, I recommend using the CDN. If you require offline, you can use an npm package. |
|
@drujensen Oh, thank you, nice idea 👍 |
|
The bootstrap website recommends using a little more verbose of a script and link tag: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>Should we default to including the integrity and crossorigin options? From the MDN on Subresource Integrity:
|
|
@ChangJoo-Park I just updated this PR with master branch. If you get an error on |
|
@faraazahmad I did not get any errors 😀 |
|
@ChangJoo-Park any thoughts on adding the html attributes for subresources integrity as I mentioned above? |
|
@robacarp Yeah, I think html attributes is a nice idea to improve amber security in generated templates. However, Do you know if these html attributes have some usability issue? I mean, do html attributes get outdated or something like that? otherwise, I think this PR is ready to merge, @ChangJoo-Park WDYT? |
faustinoaq
left a comment
There was a problem hiding this comment.
I think this is ready to merge, we can open a new PR for other features/issues related to this
|
I am so sorry to reply late. I saw integrity and crossorigin attrbute. I think it may be good for security, but it is not must needed. |
@ChangJoo-Park Yeah, if this is required, then we can implement this in a new PR 😅 |
eliasjpr
left a comment
There was a problem hiding this comment.
I think this can be merged
|
Thanks everyone :) |




Description of the Change
Alternate Designs
Benefits
Using latest version of Bootstrap 4
Possible Drawbacks
I tested on initialize template and after scaffolding resources.
amber generate scaffold post