Skip to content
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

Closed
benjaminfaure opened this issue Apr 6, 2022 · 5 comments
Closed

Upgrade Bootstrap #3144

benjaminfaure opened this issue Apr 6, 2022 · 5 comments
Assignees

Comments

@benjaminfaure
Copy link
Contributor

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

@briri
Copy link
Contributor

briri commented Apr 6, 2022

Thanks for confirming this @benjaminfaure

@briri
Copy link
Contributor

briri commented Apr 13, 2022

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

@briri briri changed the title Upgrade to Bootstrap 4 Upgrade Bootstrap Apr 13, 2022
@briri
Copy link
Contributor

briri commented Jan 23, 2023

see if we can go directly to 5 or if going to 4 first is necessary

johnpinto1 pushed a commit that referenced this issue Feb 27, 2023
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
@johnpinto1
Copy link
Contributor

johnpinto1 commented Feb 27, 2023

@briri
Copy link
Contributor

briri commented Feb 27, 2023

thanks @gjacob24 and @johnpinto1 that sounds like a good plan.

johnpinto1 pushed a commit that referenced this issue Mar 1, 2023
May require further work.
johnpinto1 pushed a commit that referenced this issue Mar 8, 2023
johnpinto1 pushed a commit that referenced this issue Mar 27, 2023
johnpinto1 pushed a commit that referenced this issue Mar 29, 2023
app/assets/stylesheets/archived-blocks for referencing during
development.
johnpinto1 pushed a commit that referenced this issue Mar 29, 2023
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)
johnpinto1 pushed a commit that referenced this issue Mar 30, 2023
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
johnpinto1 pushed a commit that referenced this issue Mar 30, 2023
johnpinto1 pushed a commit that referenced this issue Mar 30, 2023
johnpinto1 pushed a commit that referenced this issue Dec 18, 2023
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.
johnpinto1 pushed a commit that referenced this issue Dec 18, 2023
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.
johnpinto1 pushed a commit that referenced this issue Dec 18, 2023
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.
johnpinto1 pushed a commit that referenced this issue Dec 20, 2023
…emplate editing phase for customisations.
johnpinto1 pushed a commit that referenced this issue Jan 8, 2024
johnpinto1 pushed a commit that referenced this issue Jan 8, 2024
johnpinto1 pushed a commit that referenced this issue Jan 12, 2024
johnpinto1 pushed a commit that referenced this issue Jan 12, 2024
gjacob24 added a commit that referenced this issue Jan 26, 2024
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)
johnpinto1 pushed a commit that referenced this issue Mar 14, 2024
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.
johnpinto1 pushed a commit that referenced this issue Mar 14, 2024
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.
johnpinto1 pushed a commit that referenced this issue Mar 14, 2024
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.
johnpinto1 pushed a commit that referenced this issue Mar 20, 2024
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)".
johnpinto1 pushed a commit that referenced this issue Mar 20, 2024
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')"
johnpinto1 pushed a commit that referenced this issue Mar 20, 2024
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)"
johnpinto1 pushed a commit that referenced this issue Mar 20, 2024
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>".
johnpinto1 pushed a commit that referenced this issue Mar 20, 2024
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)"
johnpinto1 pushed a commit that referenced this issue Mar 21, 2024
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)"
johnpinto1 pushed a commit that referenced this issue Mar 25, 2024
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)"
johnpinto1 pushed a commit that referenced this issue Mar 25, 2024
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)
johnpinto1 pushed a commit that referenced this issue Mar 25, 2024
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)"
benjaminfaure added a commit that referenced this issue Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants