-
Notifications
You must be signed in to change notification settings - Fork 110
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
Upgrade Bootstrap #3144
Comments
Thanks for confirming this @benjaminfaure |
For the Bootstrap upgrade, we can probably refer to official guide (https://getbootstrap.com/docs/5.0/migration/) and (https://getbootstrap.com/docs/4.0/migration/) for the possible broken points We should upgrade incrementally. For example upgrade to 4.x first and verify changes before moving to 5.x |
see if we can go directly to 5 or if going to 4 first is necessary |
First step in moving from Bootstrap 3 to 5. - Node package changes: - Changed version of bootstrap "^3.4.1" --> "^5.2.3". - Added @popperjs/core. -Removed bootstrap-3-typeahead, bootstrap-sass & popper.js. - Commented out code that was breaking assets:precompile. This will need to be fixed. This was based on ideas in article "Use Bootstrap 5 with Ruby on Rails 6 and webpack" https://medium.com/daily-web-dev/use-bootstrap-4-with-ruby-on-rails-6-and-webpack-fe7300604267
@briri Following your advice, I have created a branch for @gjacob24 and I to play with moving straight to Bootstrap 5. First commit just added packages that upgraded to Bootstrap 5 and commented out broken code in scss and javascript files. issue_3144-bootstrap5-upgrade-dcc-glenys-john-preliminary-work We will be using migration and sass docs here to fix and update code: |
thanks @gjacob24 and @johnpinto1 that sounds like a good plan. |
app/assets/stylesheets/archived-blocks for referencing during development.
These changes were based on ideas in article "Use Bootstrap 5 with Ruby on Rails 6 and webpack" https://medium.com/daily-web-dev/use-bootstrap-4-with-ruby-on-rails-6-and-webpack-fe7300604267 Changes - Node package changes: * Changed version of bootstrap "^3.4.1" --> "^5.2.3" * Added @popperjs/core. * Removed bootstrap-3-typeahead, bootstrap-sass & popper.js. - In app/assets/stylesheets/application.scss: * removed bootstrap-sass import and replaced with @import "../../../node_modules/bootstrap/scss/bootstrap"; - In app/assets/stylesheets/blocks/: * Replaced in relevant files @use "../../../../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss" as * ; with @use "../../../../node_modules/bootstrap/scss/bootstrap" as *; * Enclosed all calculations / with calc() function, e.g., replaced padding-right: $grid-gutter-width / 2; with padding-right: calc($grid-gutter-width / 2); * Replaced with breaking media queries since Bootstrap 3: ** @media (max-width: $grid-float-breakpoint-max) {} with @include media-breakpoint-down(md){} ** @media (max-width: $grid-float-breakpoint-max) {} with @include media-breakpoint-down(md) {} (Based on blogs https://bibwild.wordpress.com/2019/06/10/what-happened-to-grid-float-breakpoint-in-bootstrap-4-and-screen-size-breakpoint-shift-from-3-4/ & https://www.educative.io/answers/what-are-media-queries-in-bootstrap-4)
These changes were based on ideas in article "Use Bootstrap 5 with Ruby on Rails 6 and webpack" https://medium.com/daily-web-dev/use-bootstrap-4-with-ruby-on-rails-6-and-webpack-fe7300604267 Changes - Node package changes: * Changed version of bootstrap "^3.4.1" --> "^5.2.3" * Added @popperjs/core. * Removed bootstrap-3-typeahead, bootstrap-sass & popper.js. - In app/assets/stylesheets/application.scss: * removed bootstrap-sass import and replaced with @import "../../../node_modules/bootstrap/scss/bootstrap"; - In app/assets/stylesheets/blocks/: * Replaced in relevant files @use "../../../../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss" as * ; with @use "../../../../node_modules/bootstrap/scss/bootstrap" as *; * Enclosed all calculations / with calc() function, e.g., replaced padding-right: $grid-gutter-width / 2; with padding-right: calc($grid-gutter-width / 2); * Replaced with breaking media queries since Bootstrap 3: ** @media (max-width: $grid-float-breakpoint-max) {} with @include media-breakpoint-down(md){} ** @media (max-width: $grid-float-breakpoint-max) {} with @include media-breakpoint-down(md) {} (Based on blogs https://bibwild.wordpress.com/2019/06/10/what-happened-to-grid-float-breakpoint-in-bootstrap-4-and-screen-size-breakpoint-shift-from-3-4/ & https://www.educative.io/answers/what-are-media-queries-in-bootstrap-4) - Deleted app/javascript/src/utils/popoverHelper.js
Signed-off-by: John Pinto <[email protected]>
Signed-off-by: John Pinto <[email protected]>
notification'. Two issue: - The tags in app/views/org_admin/conditions/_webhook_form.html.erb were incorrectly changed: label_tag, email_field_tag and text_area_tag there inputs should be as label_tag(name = nil, content_or_options = nil, options = nil, &block), email_field_tag(name, value = nil, options = {}) and text_area_tag(name, content = nil, options = {}) respectively. - In Bootstrap 5 the Jquery elements for links and buttons cannot be triggered by trigger('click') programmatical;ly. The work around is to use the Vanilla Javascript element or in the case of modals using the modal('show') method.
notification'. Two issue: - The tags in app/views/org_admin/conditions/_webhook_form.html.erb were incorrectly changed: label_tag, email_field_tag and text_area_tag there inputs should be as label_tag(name = nil, content_or_options = nil, options = nil, &block), email_field_tag(name, value = nil, options = {}) and text_area_tag(name, content = nil, options = {}) respectively. - In Bootstrap 5 the Jquery elements for links and buttons cannot be triggered by trigger('click') programmatically. The work around is to use the Vanilla Javascript element or in the case of modals using the modal('show') method.
notification'. Two issue: - The tags in app/views/org_admin/conditions/_webhook_form.html.erb were incorrectly changed: label_tag, email_field_tag and text_area_tag there inputs should be as label_tag(name = nil, content_or_options = nil, options = nil, &block), email_field_tag(name, value = nil, options = {}) and text_area_tag(name, content = nil, options = {}) respectively. - In Bootstrap 5 the Jquery elements for links and buttons cannot be triggered by trigger('click') programmatically. The work around is to use the Vanilla Javascript element with click() or in the case of modals using the modal('show') method.
…emplate editing phase for customisations.
This commit consists of the file changes required for the upgrade from Bootstrap 3 to 5. A more detailed version is in CHANGELOG.md (and in wiki: https://github.com/DMPRoadmap/roadmap/wiki/Release-notes-for-Bootstrap-5-upgrade)
1: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click spec/features/super_admins/orgs_spec.rb & spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts xcripts.
1: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click spec/features/super_admins/orgs_spec.rb & spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts xcripts.
1: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts.
1: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts. 2: Fixed errors in ./spec/features/questions/textarea_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 3: Fix for errors in ./spec/features/annotations/annotations_editing_spec.rb Changed "Noo bar" -> "<p>Noo bar</p>". 4: Fixed errors in ./spec/features/questions/radiobuttons_questions_spec.rb. Changed "(0/1) answered" -> "(0 / 1)". 5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)".5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)".5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)".5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)".5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)".
1: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts. 2: Fixed errors in ./spec/features/questions/textarea_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 3: Fix for errors in ./spec/features/annotations/annotations_editing_spec.rb Changed "Noo bar" -> "<p>Noo bar</p>". 4: Fixed errors in ./spec/features/questions/radiobuttons_questions_spec.rb. Changed "(0/1) answered" -> "(0 / 1)". 5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)". 6: Fixed error in spec/features/feedback_requests_spec.rb Replaced "within('div.panel') do" -> "within('.tab-pane.active')"
1: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts. 2: Fixed errors in ./spec/features/questions/textarea_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 3: Fix for error in ./spec/features/annotations/annotations_editing_spec.rb Changed "Noo bar" -> "<p>Noo bar</p>". 4: Fixed error in ./spec/features/questions/radiobuttons_questions_spec.rb. Changed "(0/1) answered" -> "(0 / 1)". 5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)". 6: Fixed error in spec/features/feedback_requests_spec.rb Replaced "within('div.panel') do" -> "within('.tab-pane.active')" 7: Fixed errors in ./spec/features/questions/checkbox_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)"
1: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts. 2: Fixed errors in ./spec/features/questions/textarea_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 3: Fix for error in ./spec/features/annotations/annotations_editing_spec.rb Changed "Noo bar" -> "<p>Noo bar</p>". 4: Fixed error in ./spec/features/questions/radiobuttons_questions_spec.rb. Changed "(0/1) answered" -> "(0 / 1)". 5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)". 6: Fixed error in spec/features/feedback_requests_spec.rb Replaced "within('div.panel') do" -> "within('.tab-pane.active')" 7: Fixed errors in ./spec/features/questions/checkbox_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 8: Fixed error in ./spec/features/templates/templates_editings_spec.rb. Changed "Foo bar" -. "<p>Foo bar</p>".
1: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts. 2: Fixed errors in ./spec/features/questions/textarea_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 3: Fix for error in ./spec/features/annotations/annotations_editing_spec.rb Changed "Noo bar" -> "<p>Noo bar</p>". 4: Fixed error in ./spec/features/questions/radiobuttons_questions_spec.rb. Changed "(0/1) answered" -> "(0 / 1)". 5: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)". 6: Fixed error in spec/features/feedback_requests_spec.rb Replaced "within('div.panel') do" -> "within('.tab-pane.active')" 7: Fixed errors in ./spec/features/questions/checkbox_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 8: Fixed error in ./spec/features/templates/templates_editings_spec.rb. Changed "Foo bar" -. "<p>Foo bar</p>". 9: Fix for ./spec/features/questions/textfield_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)"
1: Added to spec/rails_helper.rb: Capybara.default_max_wait_time = 10 2: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts. 3: Fixed errors in ./spec/features/questions/textarea_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 4: Fix for error in ./spec/features/annotations/annotations_editing_spec.rb Changed "Noo bar" -> "<p>Noo bar</p>". 5: Fixed error in ./spec/features/questions/radiobuttons_questions_spec.rb. Changed "(0/1) answered" -> "(0 / 1)". 6: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)". 7: Fixed error in spec/features/feedback_requests_spec.rb Replaced "within('div.panel') do" -> "within('.tab-pane.active')" 8: Fixed errors in ./spec/features/questions/checkbox_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 9: Fixed error in ./spec/features/templates/templates_editings_spec.rb. Changed "Foo bar" -. "<p>Foo bar</p>". 10: Fix for ./spec/features/questions/textfield_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)"
1: Added to spec/rails_helper.rb: Capybara.default_max_wait_time = 10 2: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts. 3: Fixed errors in ./spec/features/questions/textarea_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 4: Fix for error in ./spec/features/annotations/annotations_editing_spec.rb Changed "Noo bar" -> "<p>Noo bar</p>". 5: Fixed error in ./spec/features/questions/radiobuttons_questions_spec.rb. Changed "(0/1) answered" -> "(0 / 1)". 6: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)". 7: Fixed error in spec/features/feedback_requests_spec.rb Replaced "within('div.panel') do" -> "within('.tab-pane.active')" 8: Fixed errors in ./spec/features/questions/checkbox_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 9: Fixed error in ./spec/features/templates/templates_editings_spec.rb. Changed "Foo bar" -. "<p>Foo bar</p>". 10: Fix for ./spec/features/questions/textfield_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)"
This commit consists of the file changes required for the upgrade from Bootstrap 3 to 5. A more detailed version is in CHANGELOG.md (and in wiki: https://github.com/DMPRoadmap/roadmap/wiki/Release-notes-for-Bootstrap-5-upgrade)
1: Added to spec/rails_helper.rb: Capybara.default_max_wait_time = 10 2: Fix for SuperAdmins Orgs Super admin removes links Failure/Error: all('.link a > .fa-circle-xmark').last.click Changed selectors in spec/features/super_admins/orgs_spec.rb & updated spec/support/helpers/links_helper.rb updated. It was necessary, to scroll to links that were not visible and click by using Javascripts scripts. 3: Fixed errors in ./spec/features/questions/textarea_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 4: Fix for error in ./spec/features/annotations/annotations_editing_spec.rb Changed "Noo bar" -> "<p>Noo bar</p>". 5: Fixed error in ./spec/features/questions/radiobuttons_questions_spec.rb. Changed "(0/1) answered" -> "(0 / 1)". 6: Fixed error in ./spec/features/questions/dropdown_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)". 7: Fixed error in spec/features/feedback_requests_spec.rb Replaced "within('div.panel') do" -> "within('.tab-pane.active')" 8: Fixed errors in ./spec/features/questions/checkbox_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)" 9: Fixed error in ./spec/features/templates/templates_editings_spec.rb. Changed "Foo bar" -. "<p>Foo bar</p>". 10: Fix for ./spec/features/questions/textfield_questions_spec.rb. Changed "(0/1) answered" -> "( 0 / 1)", "(1/1) answered" -> "( 1 / 1)"
…rap_5 Issue #3144 - Upgrade to Bootstrap 5
As I mentionned during our last meeting, at some point the roadmap code was running Bootstrap 4.
But it seems the version got reverted from 4 to 3 between Roadmap V2.2.1 and V3.0.0
https://github.com/DMPRoadmap/roadmap/blob/v2.2.1/package.json
https://github.com/DMPRoadmap/roadmap/blob/v3.0.0/package.json
The upgrade seems minimal (since it's been reverted to 3 without noticing :D ) but in Bootstrap 4 the dropdown menus are no longer "hoverable"
The latest version is 4.6.1
The text was updated successfully, but these errors were encountered: