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

DEP Upgrade bootstrap and reactstrap #3050

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/dist/js/SilverStripeNavigator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/dist/styles/bundle.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/src/legacy/SilverStripeNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
});
}

const closeLinks = popup.querySelectorAll('a.close');
const closeLinks = popup.querySelectorAll('a.close,a.btn-close');
if (closeLinks.length > 0) {
for (const link of closeLinks.values()) {
link.addEventListener('click', function(e) {
Expand Down
14 changes: 0 additions & 14 deletions client/src/styles/legacy/_CMSMain.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,6 @@
flex: 0 1 250px;
}

.input-group-append {
z-index: 2;

&:last-of-type {
z-index: 1;
}

.btn {
margin-top: 0;
padding-top: $input-padding-y;
padding-bottom: $input-padding-y;
}
}
Comment on lines -149 to -161
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://getbootstrap.com/docs/5.0/migration/#forms

Dropped .input-group-append and .input-group-prepend. You can now just add buttons and .input-group-text as direct children of the input groups.

Turns out the styling isn't needed anymore in any case, from what I can tell, so just removed this block outright.


.help {
margin-left: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion code/Controllers/CMSMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ public function ListViewForm()
if ($num) {
$screenReaderText = _t(__CLASS__ . '.NUM_CHILD_RECORDS', 'one child record|{count} child records', ['count' => $num]);
return sprintf(
'<a class="btn btn-secondary btn--no-text btn--icon-large font-icon-right-dir cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s"><span class="sr-only">%s</span></a>',
'<a class="btn btn-secondary btn--no-text btn--icon-large font-icon-right-dir cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s"><span class="visually-hidden">%s</span></a>',
$this->LinkListViewChildren((int)$item->ID),
$screenReaderText
);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"homepage": "https://github.com/silverstripe/silverstripe-cms#readme",
"dependencies": {
"@popperjs/core": "^2.11.6",
"bootstrap": "^4.6.2",
"bootstrap": "^5.2.0",
"classnames": "^2.3.2",
"deep-freeze-strict": "^1.1.1",
"isomorphic-fetch": "^3.0.0",
Expand All @@ -43,7 +43,7 @@
"react-dom": "^18.2.0",
"react-redux": "^9.2.0",
"react-select": "^5.6.0",
"reactstrap": "^8.9.0",
"reactstrap": "^9.2.0",
"reactstrap-confirm": "^1.3.2",
"redux": "^5.0.1",
"redux-form": "^8.3.10"
Expand Down
16 changes: 6 additions & 10 deletions templates/SilverStripe/CMS/Forms/SiteTreeURLSegmentField.ss
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
<div class="edit-holder">
<div class="input-group">
<input $AttributesHTML />
<div class="input-group-append">
<button role="button" type="button" class="btn btn-primary update">
<%t SilverStripe\CMS\Forms\SiteTreeURLSegmentField.OK 'OK' %>
</button>
</div>
<div class="input-group-append">
<button role="button" type="button" class="btn btn-outline-secondary btn-sm input-group-append cancel">
<%t SilverStripe\CMS\Forms\SiteTreeURLSegmentField.Cancel 'Cancel' %>
</button>
</div>
<button role="button" type="button" class="btn btn-primary update">
<%t SilverStripe\CMS\Forms\SiteTreeURLSegmentField.OK 'OK' %>
</button>
<button role="button" type="button" class="btn btn-outline-secondary btn-sm cancel">
<%t SilverStripe\CMS\Forms\SiteTreeURLSegmentField.Cancel 'Cancel' %>
</button>
</div>
<% if $HelpText %><p class="form__field-description">$HelpText</p><% end_if %>
</div>
Loading
Loading