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

refactor: remove unnecessary padding from lib component picker [FC-0076] #36073

Merged
merged 2 commits into from
Jan 10, 2025
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
1 change: 1 addition & 0 deletions cms/static/js/views/components/add_library_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function($, _, gettext, BaseModal) {
// Translators: "title" is the name of the current component being edited.
titleFormat: gettext('Add library content'),
addPrimaryActionButton: false,
showEditorModeButtons: false,
}),

initialize: function() {
Expand Down
1 change: 1 addition & 0 deletions cms/static/js/views/modals/select_v2_library_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function($, _, gettext, BaseModal) {
viewSpecificClasses: 'modal-add-component-picker confirm',
titleFormat: gettext('Add library content'),
addPrimaryActionButton: false,
showEditorModeButtons: false,
}),

events: {
Expand Down
3 changes: 3 additions & 0 deletions cms/static/sass/views/_container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -585,13 +585,16 @@
// cms/static/js/views/components/add_library_content_with_picker.js
.modal-add-component-picker {
top: 10%;
padding: 0px !important;
.modal-content {
padding: 0 !important;
border-radius: ($baseline/5);

& > iframe {
width: 100%;
min-height: 80vh;
background: url('#{$static-path}/images/spinner.gif') center center no-repeat;
border-radius: ($baseline/5);
}
}
}
Expand Down
28 changes: 15 additions & 13 deletions cms/templates/js/basic-modal.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@
<div class="modal-window-overlay"></div>
<div class="modal-window <%- viewSpecificClasses %> modal-<%- size %> modal-type-<%- type %>" tabindex="-1" aria-labelledby="modal-window-title">
<div class="<%- name %>-modal">
<div class="modal-header">
<h2 id="modal-window-title" class="title modal-window-title">
<%- title %>
<% if (modalSRTitle) { %>
<span class="sr modal-sr-title">
<%- modalSRTitle %>
</span>
<% if (title || modalSRTitle || showEditorModeButtons) { %>
<div class="modal-header">
<h2 id="modal-window-title" class="title modal-window-title">
<%- title %>
<% if (modalSRTitle) { %>
<span class="sr modal-sr-title">
<%- modalSRTitle %>
</span>
<% } %>
</h2>
<% if (showEditorModeButtons) { %>
<ul class="editor-modes action-list action-modes">
</ul>
<% } %>
</h2>
<% if (showEditorModeButtons) { %>
<ul class="editor-modes action-list action-modes">
</ul>
<% } %>
</div>
</div>
<% } %>
<div class="modal-content">
</div>
<div class="modal-actions">
Expand Down
Loading