diff --git a/apps/dashboard/Gemfile b/apps/dashboard/Gemfile index 987a507b61..b356097bcc 100644 --- a/apps/dashboard/Gemfile +++ b/apps/dashboard/Gemfile @@ -49,7 +49,7 @@ gem 'dotenv-rails', '~> 2.1' gem 'redcarpet', '~> 3.3' gem 'browser', '~> 2.2' gem 'addressable', '~> 2.4' -gem 'bootstrap_form', '~> 4.0' +gem 'bootstrap_form', '5.0' gem 'mocha', '~> 2.1', group: :test gem 'autoprefixer-rails', '~> 10.2.5' gem 'dotiw' diff --git a/apps/dashboard/Gemfile.lock b/apps/dashboard/Gemfile.lock index 0083fe4863..af3e539959 100644 --- a/apps/dashboard/Gemfile.lock +++ b/apps/dashboard/Gemfile.lock @@ -71,7 +71,7 @@ GEM autoprefixer-rails (10.2.5.1) execjs (> 0) base64 (0.2.0) - bootstrap_form (4.5.0) + bootstrap_form (5.0.0) actionpack (>= 5.2) activemodel (>= 5.2) browser (2.7.1) @@ -118,7 +118,7 @@ GEM http-accept (1.7.0) http-cookie (1.0.5) domain_name (~> 0.5) - i18n (1.14.4) + i18n (1.14.5) concurrent-ruby (~> 1.0) jbuilder (2.11.5) actionview (>= 5.0.0) @@ -147,8 +147,8 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2024.0305) mini_mime (1.1.5) - mini_portile2 (2.8.5) - minitest (5.22.3) + mini_portile2 (2.8.6) + minitest (5.23.0) mocha (2.1.0) ruby2_keywords (>= 0.0.5) multi_json (1.15.0) @@ -291,7 +291,7 @@ PLATFORMS DEPENDENCIES addressable (~> 2.4) autoprefixer-rails (~> 10.2.5) - bootstrap_form (~> 4.0) + bootstrap_form (= 5.0) browser (~> 2.2) byebug capybara diff --git a/apps/dashboard/app/assets/stylesheets/_variables.scss b/apps/dashboard/app/assets/stylesheets/_variables.scss index b9243791bb..17c7abfbc3 100644 --- a/apps/dashboard/app/assets/stylesheets/_variables.scss +++ b/apps/dashboard/app/assets/stylesheets/_variables.scss @@ -1,5 +1,5 @@ -// Place all Bootstrap 4 variable overrides in this file. -// Bootstrap 4 SASS variables list: https://github.com/twbs/bootstrap/blob/v4.6.0/scss/_variables.scss +// Place all Bootstrap 5 variable overrides in this file. +// Bootstrap 5 SASS variables list: https://github.com/twbs/bootstrap/blob/v5.0.2/scss/_variables.scss // Miscellaneous $enable-responsive-font-sizes: "true"; @@ -10,11 +10,16 @@ $blue: rgb(51, 122, 183); $green: #5cb85c; $body-color: rgb(51, 51, 51); -// see https://getbootstrap.com/docs/4.0/getting-started/theming/#modify-map +// see https://getbootstrap.com/docs/5.0/customize/sass/#modify-map $theme-colors: ( "primary": $blue, "success": $green, - "danger": #d9534f + "danger": #d9534f, + "secondary": #6c757d, + "info": #0dcaf0, + "warning": #ffc107, + "light": #f8f9fa, + "dark": #212529 ); // NOTE: bootstrap 3 info color was not teal but #5bc0de @@ -60,6 +65,9 @@ $navbar-nav-link-padding-x: 0.75rem; // breadcrumbs are purely visual for accessibility $breadcrumb-divider: ''; +$breadcrumb-bg: #e9ecef; +$breadcrumb-padding-y: 0.75rem; +$breadcrumb-padding-x: 1rem; // files get copied during 'yarn build' in esbuild.config.js -$fa-font-path: "../builds"; +$fa-font-path: "../builds"; \ No newline at end of file diff --git a/apps/dashboard/app/assets/stylesheets/application.scss b/apps/dashboard/app/assets/stylesheets/application.scss index 4d37e6d0b7..a022ebd674 100644 --- a/apps/dashboard/app/assets/stylesheets/application.scss +++ b/apps/dashboard/app/assets/stylesheets/application.scss @@ -123,7 +123,7 @@ pre.motd-monospaced { **/ pre:not(#editor) { - @extend .bg-light; + @extend .bg-light !optional; @extend .p-2; @extend .rounded; } diff --git a/apps/dashboard/app/assets/stylesheets/custom.scss b/apps/dashboard/app/assets/stylesheets/custom.scss index 68624f22dd..2bf302c4ad 100644 --- a/apps/dashboard/app/assets/stylesheets/custom.scss +++ b/apps/dashboard/app/assets/stylesheets/custom.scss @@ -6,6 +6,12 @@ } } +.breadcrumb-item { + a { + text-decoration: none !important; + } +} + .card-header h3 { font-size: 16px; font-weight: bold; diff --git a/apps/dashboard/app/assets/stylesheets/data_tables.scss b/apps/dashboard/app/assets/stylesheets/data_tables.scss index 16258f4111..54c1ae1fa8 100644 --- a/apps/dashboard/app/assets/stylesheets/data_tables.scss +++ b/apps/dashboard/app/assets/stylesheets/data_tables.scss @@ -27,4 +27,8 @@ table.dataTable th[aria-sort="ascending"] span::after { color: currentcolor; font-size: 100%; top: 0; +} + +table.dataTable td a { + text-decoration: none; } \ No newline at end of file diff --git a/apps/dashboard/app/helpers/batch_connect/session_contexts_helper.rb b/apps/dashboard/app/helpers/batch_connect/session_contexts_helper.rb index 180aeffb4a..daf23edc33 100644 --- a/apps/dashboard/app/helpers/batch_connect/session_contexts_helper.rb +++ b/apps/dashboard/app/helpers/batch_connect/session_contexts_helper.rb @@ -41,7 +41,7 @@ def create_widget(form, attrib, format: nil, hide_excludable: true, hide_fixed: end def resolution_field(form, id, opts = {}) - content_tag(:div, id: "#{id}_group", class: "form-group") do + content_tag(:div, id: "#{id}_group", class: "mb3") do concat form.label(id, opts[:label]) concat form.hidden_field(id, id: "#{id}_field") concat( diff --git a/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb b/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb index 3e822243ba..5d51415876 100644 --- a/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb +++ b/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb @@ -136,7 +136,7 @@ def delete(session) button_to( batch_connect_session_path(session.id), method: :delete, - class: "btn btn-danger float-right btn-delete", + class: "btn btn-danger float-end btn-delete", title: title, 'aria-label': title, data: { confirm: t('dashboard.batch_connect_sessions_delete_confirm'), toggle: "tooltip", placement: "bottom"} @@ -150,7 +150,7 @@ def cancel(session) button_to( batch_connect_cancel_session_path(session.id), method: :post, - class: "btn btn-danger float-right btn-cancel", + class: "btn btn-danger float-end btn-cancel", title: title, 'aria-label': title, data: { confirm: t('dashboard.batch_connect_sessions_cancel_confirm'), toggle: "tooltip", placement: "bottom" } diff --git a/apps/dashboard/app/javascript/active_jobs.js b/apps/dashboard/app/javascript/active_jobs.js index 6b65a644cc..91387b98ba 100644 --- a/apps/dashboard/app/javascript/active_jobs.js +++ b/apps/dashboard/app/javascript/active_jobs.js @@ -222,7 +222,7 @@ function create_datatable(options){ }, { data: "walltime_used", - className: "text-right", + className: "text-end", "autoWidth": true, render: function (data, type, _row, _meta) { if(type === 'display' || type === 'filter') { diff --git a/apps/dashboard/app/javascript/application.js b/apps/dashboard/app/javascript/application.js index 416528b65a..6a1db6e4c3 100644 --- a/apps/dashboard/app/javascript/application.js +++ b/apps/dashboard/app/javascript/application.js @@ -23,10 +23,10 @@ import 'datatables.net-plugins/api/processing().mjs'; import Rails from '@rails/ujs'; -// Import popper.js for Bootstrap 4 -import Popper from 'popper.js'; +// Import @popperjs/core for Bootstrap 5 +import { createPopper } from '@popperjs/core'; -// Import Bootstrap 4 +// Import Bootstrap 5 import 'bootstrap/dist/js/bootstrap'; // FIXME: confim modals don't work in esbuild. diff --git a/apps/dashboard/app/javascript/dynamic_forms.js b/apps/dashboard/app/javascript/dynamic_forms.js index 90890aaa1c..c550054713 100644 --- a/apps/dashboard/app/javascript/dynamic_forms.js +++ b/apps/dashboard/app/javascript/dynamic_forms.js @@ -416,9 +416,17 @@ function updateVisibility(event, changeId) { const val = valueFromEvent(event); const id = event.target['id']; let changeElement = undefined; + $(`#${changeId}`).parents().each(function(_i, parent) { - if(parent.classList.contains('form-group')) { - changeElement = $(parent); + var classListValues = parent.classList.values(); + for (const val of classListValues) { + // TODO: Using 'mb-3' here because 'form-group' was removed + // from Bootstrap 5 and replaced with 'mb-3' - however, this + // is a grid class which could (??) apply to parent elements + // in unpredictable parts of the chain - test for & resolve + if (val.match('mb-3')) { + changeElement = $(parent); + } } }); diff --git a/apps/dashboard/app/javascript/files/data_table.js b/apps/dashboard/app/javascript/files/data_table.js index dda7f291a3..38df5f6659 100644 --- a/apps/dashboard/app/javascript/files/data_table.js +++ b/apps/dashboard/app/javascript/files/data_table.js @@ -205,7 +205,7 @@ class DataTable { // // put breadcrmbs below filter!!! dom: "<'row'<'col-sm-12'f>>" + // normally <'row'<'col-sm-6'l><'col-sm-6'f>> but we disabled pagination so l is not needed (dropdown for selecting # rows) - "<'row'<'col-sm-12'<'dt-status-bar'<'datatables-status float-right'><'transfers-status'>>>>" + + "<'row'<'col-sm-12'<'dt-status-bar'<'datatables-status float-end'><'transfers-status'>>>>" + "<'row'<'col-sm-12'tr>>", // normally this is <'row'<'col-sm-5'i><'col-sm-7'p>> but we disabled pagination so have info take whole row columns: [ { diff --git a/apps/dashboard/app/javascript/path_selector/path_selector_data_table.js b/apps/dashboard/app/javascript/path_selector/path_selector_data_table.js index 1811918d01..cc9d550c44 100644 --- a/apps/dashboard/app/javascript/path_selector/path_selector_data_table.js +++ b/apps/dashboard/app/javascript/path_selector/path_selector_data_table.js @@ -56,7 +56,7 @@ export class PathSelectorTable { // // put breadcrumbs below filter!!! dom: "<'row'<'col-sm-12'f>>" + // normally <'row'<'col-sm-6'l><'col-sm-6'f>> but we disabled pagination so l is not needed (dropdown for selecting # rows) - "<'row'<'col-sm-12'<'dt-status-bar'<'datatables-status float-right'><'transfers-status'>>>>" + + "<'row'<'col-sm-12'<'dt-status-bar'<'datatables-status float-end'><'transfers-status'>>>>" + "<'row'<'col-sm-12'tr>>", // normally this is <'row'<'col-sm-5'i><'col-sm-7'p>> but we disabled pagination so have info take whole row columns: [ { diff --git a/apps/dashboard/app/javascript/products_show.js b/apps/dashboard/app/javascript/products_show.js index 773b110c8c..a4c2c8e44e 100644 --- a/apps/dashboard/app/javascript/products_show.js +++ b/apps/dashboard/app/javascript/products_show.js @@ -4,7 +4,7 @@ const id = 'product_cli_modal'; const spinnerId = `${id}_spinner`; const headerId = `${id}_header`; const buttonId = `${id}_button`; -const closeButton = ``; +const closeButton = ``; jQuery(function(){ $('[data-toggle="cli"]').on('click', (event) => updateModal(event)); @@ -43,7 +43,7 @@ function updateModal(event){ xhr.onloadend = function() { $(`#${spinnerId}`).replaceWith(` - + `); if (this.status != 200) { $(`#${id} .product-cli-body`).html(`${header}A fatal error has occurred`); diff --git a/apps/dashboard/app/javascript/projects.js b/apps/dashboard/app/javascript/projects.js index 28f1966f60..62bafb6172 100644 --- a/apps/dashboard/app/javascript/projects.js +++ b/apps/dashboard/app/javascript/projects.js @@ -7,7 +7,7 @@ jQuery(function() { pollForJobInfo(ele); }); - $("[data-toggle='project']").each((_index, ele) => { + $("[data-bs-toggle='project']").each((_index, ele) => { updateProjectSize(ele); }); }); @@ -50,7 +50,7 @@ function pollForJobInfo(element) { function jobInfoDiv(jobId, state, stateTitle='', stateDescription='') { return `
">Click the box to attach a file. Screenshots or other files can help troubleshoot your problem.
+">Click the box to attach a file. Screenshots or other files can help troubleshoot your problem.
<% if has_error %><%= form.object.errors[attrib.id].join(", ") %>
@@ -9,5 +9,5 @@ <% end %> - +<%= @settings.app.title %>
- " aria-expanded="true" aria-controls="<%= "saved-settings-#{index}" %>"> + " aria-expanded="true" aria-controls="<%= "saved-settings-#{index}" %>"> <%= icon_tag(link.icon_uri) unless link.icon_uri.to_s.blank? %> <%= app.title %> diff --git a/apps/dashboard/app/views/files/_breadcrumb.html.erb b/apps/dashboard/app/views/files/_breadcrumb.html.erb index 25bc4eb31f..980ab92f98 100644 --- a/apps/dashboard/app/views/files/_breadcrumb.html.erb +++ b/apps/dashboard/app/views/files/_breadcrumb.html.erb @@ -1,6 +1,6 @@ <% if file_counter == 0 %>
{{error_message}}diff --git a/apps/dashboard/app/views/files/_file_action_menu.html.erb b/apps/dashboard/app/views/files/_file_action_menu.html.erb index cf386678e7..4083b9bb5a 100755 --- a/apps/dashboard/app/views/files/_file_action_menu.html.erb +++ b/apps/dashboard/app/views/files/_file_action_menu.html.erb @@ -4,7 +4,7 @@ for example the border-left: 4px solid #0088cc on the checkbox td and then some very very light blue highlight that still has the necessary contrast ratio with black on white/black on grey for WCAG %> -