Skip to content

Commit

Permalink
Fix: #453 Marketplace UI issues on IE (dev portal) (#518)
Browse files Browse the repository at this point in the history
Fix: #453 Marketplace UI issues on IE (DEV portal)
  • Loading branch information
nphivu414 authored Mar 4, 2020
1 parent 31014db commit 7725e4f
Show file tree
Hide file tree
Showing 14 changed files with 111 additions and 19 deletions.
24 changes: 23 additions & 1 deletion packages/elements/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,29 @@ module.exports = ({ config }) => {
config.module.rules.push(
{
test: /\.(ts|tsx)$/,
use: [require.resolve('awesome-typescript-loader'), require.resolve('react-docgen-typescript-loader')]
use: [
{
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'entry',
corejs: '3',
targets: {
esmodules: true,
chrome: '58',
ie: '11',
},
},
],
],
},
},
{ loader: 'ts-loader', options: { happyPackMode: true, transpileOnly: true } },
require.resolve('react-docgen-typescript-loader'),
],
},
{
test: /\.stories\.tsx?$/,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export const calculateElement = ({
if (circleRef.current && activeRef.current && lineRef.current) {
const circlePosY = caculateCircleRef({ activeRef, circleRef })
circleRef.current.style.transform = `translateY(${circlePosY}px)`
if (window.matchMedia('(-ms-high-contrast:none)').matches) {
circleRef.current.style.transform = `translate(-20px, ${circlePosY}px)`
}

const lineHeight = caculateLineRef({ activeRef })
lineRef.current.style.height = `${lineHeight}px`
Expand Down
9 changes: 9 additions & 0 deletions packages/elements/src/styles/components/help-guide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@
top: 50%;
transform: translateX(-50%);
z-index: -3;
@media all and (-ms-high-contrast:none) {
left: 50%;
}
}

li:last-child:after {
Expand All @@ -119,6 +122,9 @@
background: white;
transition: all 0.3s;
text-align: center;
@media all and (-ms-high-contrast:none) {
transform: translate(-20px, 25px);
}
}

& .line-active {
Expand All @@ -129,6 +135,9 @@
background-color: $reapit-mid-blue;
transition: all 0.3s;
z-index: -2;
@media all and (-ms-high-contrast:none) {
transform: translateX(-2px);
}
}
}

Expand Down
9 changes: 8 additions & 1 deletion packages/elements/src/styles/components/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $nav-dimensions: 66px;
overflow-x: scroll;
overflow-y: hidden;
height: $nav-dimensions;
-ms-overflow-style: -ms-autohiding-scrollbar;

@media screen and (min-width: 768px) {
height: 100%;
Expand Down Expand Up @@ -69,7 +70,7 @@ $nav-dimensions: 66px;

.nav-item-link {
cursor: pointer;

&.is-secondary {
margin-left: auto;

Expand All @@ -83,10 +84,16 @@ $nav-dimensions: 66px;
.nav-item-icon {
width: 50%;
height: 100%;
@media all and (-ms-high-contrast:none) {
height: 23px;
}
}

.is-logo .nav-item-icon {
width: 75%;
@media all and (-ms-high-contrast:none) {
height: 42px;
}
}

&.is-desktop {
Expand Down
27 changes: 27 additions & 0 deletions packages/elements/src/styles/vendor/bulma-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,40 @@
}
}

.form-section {
.level-right {
.column {
@media all and (-ms-high-contrast:none) {
flex-basis: auto;
}
}
}
}


.level-right {
@media all and (-ms-high-contrast:none) {
justify-content: flex-start;
}
}

.container-footer {
.level-right {
@media all and (-ms-high-contrast:none) {
justify-content: flex-start;
}
}
}

@media (max-width: 767px) {
.reverse-columns {
flex-direction: column-reverse;
display: flex;
}
}



.content {
& ul {
margin: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ exports[`DeveloperSubmitAppSuccessfully renders correctly 1`] = `
hasPadding={true}
>
<CallToAction
className="container-footer"
dataTest="submit-success-section"
footerItems={
<React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`Elements should match a snapshot 1`] = `
style={
Object {
"border": "none",
"height": "auto",
"height": "100%",
}
}
width="100%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const DeveloperSubmitAppSuccessfully: React.FC<DeveloperSubmitAppSuccessf
<FlexContainerResponsive hasPadding flexColumn centerContent className={styles.wrapDeveloperSuccess}>
<FlexContainerResponsive flexColumn hasBackground hasPadding>
<CallToAction
className="container-footer"
isCard
title="Success"
dataTest="submit-success-section"
Expand Down
2 changes: 1 addition & 1 deletion packages/marketplace/src/components/pages/elements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const ElementsPage: React.SFC = () => (
<FlexContainerBasic flexColumn hasPadding>
<FlexContainerBasic className="container">
<iframe
style={{ border: 'none', height: 'auto' }}
style={{ border: 'none', height: '100%' }}
scrolling="no"
src={IFRAME_URLS.elements}
width="100%"
Expand Down
20 changes: 8 additions & 12 deletions packages/marketplace/src/scripts/chat-bot.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = loginIdentity => {
module.exports = function(loginIdentity) {
window._chatlio = window._chatlio || []

!(function() {
Expand Down Expand Up @@ -26,17 +26,13 @@ module.exports = loginIdentity => {
c.parentNode.insertBefore(n, c)

if (loginIdentity) {
document.addEventListener(
'chatlio.ready',
function(e) {
_chatlio.identify(loginIdentity.developerId || '', {
name: loginIdentity.name || '',
email: loginIdentity.email || ''
})
_chatlio.show({ expanded: true })
},
false
)
document.addEventListener('chatlio.ready', function() {
_chatlio.identify(loginIdentity.developerId || '', {
name: loginIdentity.name || '',
email: loginIdentity.email || '',
})
_chatlio.show({ expanded: true })
})
}
})()
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.wrapDeveloperSuccess {
max-width: 768px;
width: 768px;
flex-grow: 0;
}
9 changes: 9 additions & 0 deletions packages/marketplace/src/styles/pages/help.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
}
.wrapListItems {
padding: 1rem;
@media all and (-ms-high-contrast:none) {
background-color: $white;
}
}
.item {
padding: 1.5rem;
Expand All @@ -17,6 +20,9 @@
.wrapImage {
width: 100%;
margin-bottom: 2rem;
@media all and (-ms-high-contrast:none) {
min-height: 218px;
}
}
.image {
width: 100%;
Expand All @@ -25,6 +31,9 @@
.text {
flex-grow: 1;
margin-bottom: 1.5rem;
@media all and (-ms-high-contrast:none) {
width: 100%;
}
}
.wrapButton {
width: 100%;
Expand Down
20 changes: 18 additions & 2 deletions scripts/webpack/webpack.base.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,25 @@ module.exports = {
},
},
{
loader: 'ts-loader',
options: { transpileOnly: true },
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'entry',
corejs: '3',
targets: {
esmodules: true,
chrome: '58',
ie: '11',
},
},
],
],
},
},
{ loader: 'ts-loader', options: { happyPackMode: true, transpileOnly: true } },
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/webpack/webpack.sass.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const { PATHS } = require('./constants')
module.exports = {
...{
...webpackBase,
entry: [webpackBase.entry, PATHS.elementsIndexSass],
entry: ['@babel/polyfill', 'core-js', 'isomorphic-fetch', webpackBase.entry, PATHS.elementsIndexSass],
},
module: {
rules: [
Expand Down

0 comments on commit 7725e4f

Please sign in to comment.