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-1384: Personalization - scenario preview redesign #62

Merged
merged 5 commits into from
Nov 25, 2021
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
5 changes: 3 additions & 2 deletions src/bundle/Resources/encore/ez.js.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,12 @@ module.exports = (Encore) => {
.addEntry('ezplatform-admin-ui-content-type-create-js', [
path.resolve(__dirname, '../public/js/scripts/admin.contenttype.selection.js'),
path.resolve(__dirname, '../public/js/scripts/admin.card.toggle.group.js'),
path.resolve(__dirname, '../public/js/scripts/edit.header.js'),
path.resolve(__dirname, '../public/js/scripts/admin.contenttype.edit'),
])
.addEntry('ezplatform-admin-ui-content-type-edit-js', [
path.resolve(__dirname, '../public/js/scripts/admin.contenttype.selection.js'),
path.resolve(__dirname, '../public/js/scripts/admin.card.toggle.group.js'),
path.resolve(__dirname, '../public/js/scripts/admin.contenttype.relation.default.location.js'),
path.resolve(__dirname, '../public/js/scripts/edit.header.js'),
path.resolve(__dirname, '../public/js/scripts/admin.contenttype.edit'),
])
.addEntry('ezplatform-admin-ui-content-type-list-js', [
Expand Down Expand Up @@ -230,5 +228,8 @@ module.exports = (Encore) => {
.addEntry('ezplatform-admin-ui-tabs-js', [
path.resolve(__dirname, '../public/js/scripts/admin.location.tab.js'),
path.resolve(__dirname, '../public/js/scripts/admin.location.adaptive.tabs.js'),
])
.addEntry('ezplatform-admin-ui-edit-base-js', [
path.resolve(__dirname, '../public/js/scripts/edit.header.js'),
]);
};
80 changes: 80 additions & 0 deletions src/bundle/Resources/public/img/no-gallery-items.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
class TagViewSelect {
constructor(config) {
this.inputSelector = config.inputSelector || 'input';
this.fieldContainer = config.fieldContainer;
this.container = config.container || config.fieldContainer.querySelector('.ibexa-tag-view-select')

if (!this.fieldContainer) {
if (!this.container) {
throw new Error('Field Container doesn\'t exist!');
}

this.container = this.fieldContainer.querySelector('.ibexa-tag-view-select');
this.listContainer = this.container.querySelector('.ibexa-tag-view-select__selected-list');
this.inputField = this.fieldContainer.querySelector(this.inputSelector);
this.inputField = this.container.querySelector(this.inputSelector);
this.selectBtn = this.container.querySelector('.ibexa-tag-view-select__btn-select-path')
this.isSingleSelect = this.container.dataset.isSingleSelect === '1';
this.canBeEmpty = this.container.dataset.canBeEmpty === '1';
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Resources/public/js/scripts/edit.header.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

const contextMenuNode = headerNode.querySelector('.ibexa-context-menu');
const { height: expandedHeaderHeight } = headerNode.getBoundingClientRect();
const form = doc.querySelector('.ibexa-form');
const scrolledContent = doc.querySelector('.ibexa-edit-content > :first-child');
const tooltipNode = headerNode.querySelector('.ibexa-edit-header__tooltip');
const fitHeader = (event) => {
const { height: formHeight } = form.getBoundingClientRect();
const { height: formHeight } = scrolledContent.getBoundingClientRect();
const contentHeightWithExpandedHeader = formHeight + expandedHeaderHeight;
const heightDiffBetweenWindowAndContent = contentHeightWithExpandedHeader - global.innerHeight;

Expand Down
1 change: 1 addition & 0 deletions src/bundle/Resources/public/scss/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
display: flex;
align-items: center;
flex-wrap: wrap;
margin-bottom: 0;

&:before,
&:after {
Expand Down
43 changes: 31 additions & 12 deletions src/bundle/Resources/public/scss/_edit-header.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
.ibexa-edit-header {
height: calculateRem(241px);
display: flex;
flex-direction: column;
background-color: $ibexa-color-white;
box-shadow: $ibexa-edit-header-box-shadow;
border-width: calculateRem(1px) calculateRem(1px) 0;
border-style: solid;
border-color: $ibexa-color-light-400;
border-top-left-radius: $ibexa-border-radius;
border-top-right-radius: $ibexa-border-radius;
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;

&__container {
display: flex;
flex-direction: column;
}

&__row {
display: flex;
flex-wrap: nowrap;
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;

&--top {
Expand All @@ -22,7 +29,9 @@
}

&--bottom {
height: calculateRem(154px);
flex-direction: column;
min-width: 60%;
min-height: calculateRem(150px);
}
}

Expand All @@ -42,9 +51,6 @@
}

&--left {
padding-left: 0;
border-bottom: calculateRem(1px) solid $ibexa-color-light;

.ibexa-label {
margin-bottom: 0;
color: $ibexa-color-dark-400;
Expand Down Expand Up @@ -99,28 +105,39 @@
transition-duration: $ibexa-admin-transition-duration;
}

&__extra-bottom-content {
margin-top: calculateRem(10px);
}

&__bottom-row-line {
margin-top: auto;
width: 75%;
border-bottom: calculateRem(1px) solid $ibexa-color-light;
}

.ibexa-autosave {
opacity: 1;
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
}

&--slim {
height: calculateRem(87px);

.ibexa-edit-header {
&__row {
&--bottom {
height: calculateRem(85px);
margin-top: calculateRem(-45px);
}
}

&__column {
&--left {
border-bottom: none;
&__row {
&--bottom {
min-height: initial;
}
}

&__bottom-row-line {
border-bottom: none;
}

&__action-name-container {
margin-top: calculateRem(-30px);
}
Expand All @@ -131,6 +148,8 @@

&__subtitle {
opacity: 0;
height: 0;
overflow: hidden;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/bundle/Resources/public/scss/_grid-view-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
min-height: calculateRem(238px);
border: calculateRem(1px) solid $ibexa-color-light;
border-radius: calculateRem(5px);
background: $ibexa-color-white;
box-shadow: calculateRem(4px) calculateRem(2px) calculateRem(17px) 0 rgba($ibexa-color-black, 0.05);
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;

Expand Down
1 change: 1 addition & 0 deletions src/bundle/Resources/public/scss/_main-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
width: 100%;
height: 100%;
overflow-y: auto;
box-shadow: $ibexa-edit-content-box-shadow;
}

&--without-anchor-menu-items {
Expand Down
3 changes: 1 addition & 2 deletions src/bundle/Resources/public/scss/mixins/_containers.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
@mixin edit-right-side-container {
flex-grow: 1;
position: relative;
padding-top: calculateRem(42px);
min-height: calc(100vh - #{calculateRem(273px)});
overflow-y: auto;
border-bottom-left-radius: $ibexa-border-radius;
border-width: 0 calculateRem(1px) calculateRem(1px);
border-style: solid;
border-color: $ibexa-color-light-400;
background-color: $ibexa-color-white;
box-shadow: $ibexa-edit-content-box-shadow;
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@
{% endblock %}

{% block javascripts %}
{{ parent() }}

{% include '@ezdesign/content/edit/javascripts.html.twig' %}
{{ encore_entry_script_tags('ezplatform-admin-ui-tabs-js', null, 'ezplatform') }}
{{ encore_entry_script_tags('ezplatform-admin-ui-edit-base-js', null, 'ezplatform') }}
{% endblock %}

{% block stylesheets %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@
{% endblock %}

{% block javascripts %}
{{ parent() }}

{{ encore_entry_script_tags('ezplatform-admin-ui-content-type-edit-js', null, 'ezplatform') }}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{% import '@ezdesign/ui/component/macros.html.twig' as html %}

{% set has_search = has_search|default(false) %}
{% set wrapper_attr = wrapper_attr|default({})|merge({
class: (wrapper_attr.class|default('') ~ ' ibexa-input-text-wrapper' ~ (has_search ? ' ibexa-input-text-wrapper--search'))|trim
}) %}

<div class="ibexa-input-text-wrapper {{ has_search ? 'ibexa-input-text-wrapper--search' }}">
<div {{ html.attributes(wrapper_attr) }}>
{% block content %}{% endblock %}
<div class="ibexa-input-text-wrapper__actions">
<button type="button" class="btn ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--clear" tabindex="-1">
Expand Down
Loading