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-8647: MFU UI improvements #1301

Merged
merged 3 commits into from
Aug 2, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

&__message {
color: $ibexa-color-dark;
margin-bottom: calculateRem(16px);
margin-bottom: calculateRem(12px);
}

&__message--main {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
flex-wrap: wrap;
background: $ibexa-color-white;
padding: 0;
margin: calculateRem(12px) 0;
margin: calculateRem(4px) 0;
height: calculateRem(48px);

&--errored {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.c-upload-list {
height: 100%;
flex-grow: 1;
overflow: auto;
margin-top: calculateRem(16px);
margin: calculateRem(16px) 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

.c-tooltip-popup {
width: 100%;
max-height: 100vh;
max-height: 90vh;
max-width: calculateRem(800px);
position: absolute;
z-index: 2;
Expand All @@ -30,8 +30,8 @@
@include modal-header();

height: calculateRem(92px);
padding: calculateRem(32px) calculateRem(32px) 0;
margin-bottom: calculateRem(36px);
padding: calculateRem(24px) calculateRem(32px) 0;
margin-bottom: calculateRem(24px);
}

&__title {
Expand All @@ -42,20 +42,29 @@
top: 0;
}

&__subtitle {
margin-top: calculateRem(8px);
}

&__content {
@include modal-body();

display: flex;
flex-direction: column;
padding: 0 calculateRem(32px);
max-height: calc(100vh - calculateRem(208px));
overflow: auto;
max-height: calc(90vh - calculateRem(212px));
}

&__footer {
padding: calculateRem(16px) calculateRem(32px) calculateRem(32px) calculateRem(32px);
padding: calculateRem(24px);
}

.c-drop-area {
padding: calculateRem(24px);
}

&--with-uploaded-items {
.c-tooltip-popup {
&__footer {
box-shadow: 0 0 calculateRem(16px) 0 rgba($ibexa-color-dark, 0.16);
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { useRef } from 'react';
import PropTypes from 'prop-types';

import { createCssClassNames } from '../helpers/css.class.names';

const TooltipPopupComponent = ({
title,
subtitle,
Expand All @@ -12,10 +14,15 @@ const TooltipPopupComponent = ({
closeBtnAttrs,
closeLabel,
visible,
extraClasses,
}) => {
const contentRef = useRef();
const className = createCssClassNames({
'c-tooltip-popup': true,
[extraClasses]: true,
});
const attrs = {
className: 'c-tooltip-popup',
className,
hidden: !visible,
};

Expand Down Expand Up @@ -55,6 +62,7 @@ TooltipPopupComponent.propTypes = {
closeLabel: PropTypes.string,
confirmBtnAttrs: PropTypes.object,
closeBtnAttrs: PropTypes.object,
extraClasses: PropTypes.string,
};

TooltipPopupComponent.defaultProps = {
Expand All @@ -65,6 +73,7 @@ TooltipPopupComponent.defaultProps = {
closeLabel: '',
confirmBtnAttrs: {},
closeBtnAttrs: {},
extraClasses: '',
};

export default TooltipPopupComponent;
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ export default class UploadPopupModule extends Component {
enableUploadedItemEdit,
};

if (hasAnyUploadedItems || hasAnyItemsToUpload) {
tooltipAttrs.extraClasses = 'c-tooltip-popup--with-uploaded-items';
}

return (
<div className="c-upload-popup" ref={this.refTooltip}>
<TooltipPopup {...tooltipAttrs}>
Expand Down
Loading