You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrades Bootstrap from 3.4.1 to 4.6.2, swaps the removed Glyphicons for @rancher/icons, and cleans up the resulting Bootstrap-4 compatibility issues (class renames, dropdown/input-group markup, modal sizing).
We'll need to update Rancher to pick up version 1.2.0 once this is merged and published.
Changes
Note that a lot of the changes are style changes to update the icon classes - Bootstrap 4 has no icon set by default, so this PR adds in Rancher icons.
I have removed the Log out link as this was not working and is not needed for use in Rancher dashboard.
The script to patch a running container has been updated now that the old Ember UI has been removed (ui-dashboard rather than ui for the path.
Detail:
Bootstrap 3 → 4.6.2 (bootstrap.bundle.js so Popper is included for dropdowns/tooltips).
Glyphicons → @rancher/icons 2.0.63: removed all glyphicon-* references, mapped each to the closest rancher-icons glyph (icon icon-*). Font files are copied into dist/<v>/fonts/ and style.css is concatenated into the SCSS pipeline. font-display: block is stripped so a font-load failure shows a fallback glyph instead of nothing.
input-group-addon / input-group-btn → v4 input-group-prepend / input-group-append with .input-group-text
Dropdown restructured from <ul><li><a> to <div><a class="dropdown-item">; pull-right → dropdown-menu-right
Modal close button moved after the title
Removed "Log Out" links (visible UI only; the underlying logout option/method are kept for the embedding host contract)
Modal sizing (src/HTMLApi.js): also set max-width when sizing .modal-dialog — v4's default max-width: 500px was capping the intended 750px. Footer buttons now btn btn-sm btn-secondary (v4 has no btn-default). templates/modal.hbs footer switched from text-align: center to justify-content: center since .modal-footer is now a flexbox.
Styles (styles/main.scss): dropped the Glyphicons @font-face, added a .well compat shim, added a .icon base rule (display: inline-block; line-height: 1; vertical-align: -0.125em) so icons align with adjacent text.
Build script (scripts/build): switched to bootstrap.bundle.js, wired in rancher-icons, unset the deprecated npm_config_* env vars inherited from an outer npm run (silences Unknown env config warnings), and passes --no-fund to npm install.
The reason will be displayed to describe this comment to others. Learn more.
There appear to be minor differences like button styling but I don't think it's anything to hold this up over. The functionality appears to be there (I haven't confirmed why logout isn't present but I don't think that's important)
@codyrancher I wasn't too bothered about the colours, but looking at it again, I will try and make the button colours the same. I'll also look at the styling of the headers in the panel as they have lost their boldness.
I removed logout as on my Rancher it didn't do anything and I don't think we want to log the user out from this UI.
@codyrancher I wasn't too bothered about the colours, but looking at it again, I will try and make the button colours the same. I'll also look at the styling of the headers in the panel as they have lost their boldness.
I removed logout as on my Rancher it didn't do anything and I don't think we want to log the user out from this UI.
Sounds good, if you change your mind feel free to merge. I'll do another pass if more changes land.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades Bootstrap from 3.4.1 to 4.6.2, swaps the removed Glyphicons for
@rancher/icons, and cleans up the resulting Bootstrap-4 compatibility issues (class renames, dropdown/input-group markup, modal sizing).We'll need to update Rancher to pick up version
1.2.0once this is merged and published.Changes
ui-dashboardrather thanuifor the path.Detail:
bootstrap.bundle.jsso Popper is included for dropdowns/tooltips).@rancher/icons2.0.63: removed allglyphicon-*references, mapped each to the closest rancher-icons glyph (icon icon-*). Font files are copied intodist/<v>/fonts/andstyle.cssis concatenated into the SCSS pipeline.font-display: blockis stripped so a font-load failure shows a fallback glyph instead of nothing.templates/*.hbs,partials/*.hbs):col-xs-*→col-*btn-default→btn-secondary,btn-xs→btn-sminput-group-addon/input-group-btn→ v4input-group-prepend/input-group-appendwith.input-group-text<ul><li><a>to<div><a class="dropdown-item">;pull-right→dropdown-menu-rightlogoutoption/method are kept for the embedding host contract)src/HTMLApi.js): also setmax-widthwhen sizing.modal-dialog— v4's defaultmax-width: 500pxwas capping the intended 750px. Footer buttons nowbtn btn-sm btn-secondary(v4 has nobtn-default).templates/modal.hbsfooter switched fromtext-align: centertojustify-content: centersince.modal-footeris now a flexbox.src/HTMLApi.js,vendor/JSONFormatter.js): collapse toggle usesicon icon-plus/icon icon-minusinstead of glyphicons.styles/main.scss): dropped the Glyphicons@font-face, added a.wellcompat shim, added a.iconbase rule (display: inline-block; line-height: 1; vertical-align: -0.125em) so icons align with adjacent text.scripts/build): switched tobootstrap.bundle.js, wired in rancher-icons, unset the deprecatednpm_config_*env vars inherited from an outernpm run(silencesUnknown env configwarnings), and passes--no-fundtonpm install.Screenshots