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

IBX-1526: change edit fields width to full column; Page Builder updates #170

Merged
merged 5 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 4 additions & 1 deletion src/bundle/Resources/public/scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@

&:hover {
color: $ibexa-color-primary;
fill: $ibexa-color-primary;

.ibexa-icon {
fill: $ibexa-color-primary;
}
}

&:focus {
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/public/scss/_edit-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
padding-left: 0;

.ibexa-icon {
margin-right: calculateRem(16px);
margin-right: calculateRem(8px);
fill: $ibexa-color-dark-400;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/bundle/Resources/public/scss/_inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@
}

.ibexa-input-text-wrapper {
width: calculateRem(288px);
position: relative;

&__actions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
position: relative;
border: calculateRem(1px) dashed $ibexa-color-dark-300;
border-radius: $ibexa-border-radius;
width: 65%;

.ibexa-data-source {
border-radius: $ibexa-border-radius;
Expand Down

This file was deleted.

6 changes: 0 additions & 6 deletions src/bundle/Resources/public/scss/fieldType/edit/_ezemail.scss

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.ibexa-field-edit--ezfloat {
.ibexa-data-source__input {
.ibexa-input-text-wrapper {
width: calculateRem(84px);
height: calculateRem(48px);
}

.ibexa-data-source__input {
&.is-invalid {
background-image: none;
padding-right: calculateRem(12px);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

&__map {
z-index: 0;
width: 50%;
height: calculateRem(400px);
border-top-left-radius: $ibexa-border-radius;
border-bottom-left-radius: $ibexa-border-radius;
Expand All @@ -28,7 +27,6 @@
}

&__options {
width: 50%;
padding: calculateRem(24px);

.ibexa-input {
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions src/bundle/Resources/public/scss/ibexa.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
@import 'fieldType/edit/base-field';
@import 'fieldType/edit/base-preview';
@import 'fieldType/edit/ezauthor';
@import 'fieldType/edit/ezstring';
@import 'fieldType/edit/ezemail';
@import 'fieldType/edit/ezcountry';
@import 'fieldType/edit/ezinteger';
@import 'fieldType/edit/ezfloat';
@import 'fieldType/edit/ezboolean';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
margin-top: calculateRem(16px);
}

&__details-item-row {
width: 50%;
}

&__toggle-bookmark-button {
border: none;
align-self: flex-start;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{% include '@ibexadesign/ui/anchor_navigation_menu.html.twig' with anchor_params %}
{% endblock %}

{% block content%}
{% block content %}
{% block form_before %}{% endblock %}

{% block form %}
Expand Down Expand Up @@ -62,7 +62,7 @@
</div>
{% else %}
<div class="row">
<div class="offset-1 col-6 p-0">
<div class="{{ is_full_width|default(false) ? 'col-12' : 'col-6 offset-1 p-0' }}">
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's not yours but could we not use the class p-0 and the like because later there are more problems than good

{% for field in form.fieldsData %}
{% if not field.rendered %}
{% if field.value is defined %}
Expand Down
20 changes: 15 additions & 5 deletions src/bundle/ui-dev/src/modules/common/popup/popup.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ class Popup extends Component {
}

componentDidMount() {
const { noKeyboard, hasFocus } = this.props;
const { isVisible: show } = this.state;

if (show) {
const bootstrapModal = window.bootstrap.Modal.getOrCreateInstance(this._refModal, {
...MODAL_CONFIG,
focus: this.props.hasFocus,
keyboard: !noKeyboard,
focus: hasFocus,
});

bootstrapModal.show();
Expand Down Expand Up @@ -86,8 +88,6 @@ class Popup extends Component {
}

renderHeader() {
const closeBtnLabel = Translator.trans(/*@Desc("Close")*/ 'popup.close.label', {}, 'universal_discovery_widget');

return (
<div className={'modal-header c-popup__header'}>
{this.renderHeadline()}
Expand All @@ -97,6 +97,10 @@ class Popup extends Component {
}

renderCloseButton() {
if (this.props.noCloseBtn) {
return;
}

const closeBtnLabel = Translator.trans(/*@Desc("Close")*/ 'popup.close.label', {}, 'universal_discovery_widget');

return (
Expand Down Expand Up @@ -148,9 +152,9 @@ class Popup extends Component {

render() {
const { isVisible } = this.state;
const { additionalClasses, size, noHeader } = this.props;
const { additionalClasses, size, noHeader, extraClasses } = this.props;
const modalAttrs = {
className: 'c-popup modal fade',
className: `c-popup modal fade ${extraClasses}`,
ref: this.setModalRef,
tabIndex: this.props.hasFocus ? -1 : undefined,
};
Expand Down Expand Up @@ -193,6 +197,9 @@ Popup.propTypes = {
footerChildren: PropTypes.element,
size: PropTypes.string,
noHeader: PropTypes.bool,
noCloseBtn: PropTypes.bool,
noKeyboard: PropTypes.bool,
extraClasses: PropTypes.string,
};

Popup.defaultProps = {
Expand All @@ -201,6 +208,9 @@ Popup.defaultProps = {
hasFocus: true,
size: 'large',
noHeader: false,
noCloseBtn: false,
noKeyboard: false,
extraClasses: '',
onConfigIframeLoad: () => {},
};

Expand Down