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

Release 20240726 #41

Merged
merged 79 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
9e23319
1154 [SEO] Embed Placeholder
Jul 1, 2024
ec00cc4
[UE] Added auth header for author
rgravitvl Jul 1, 2024
5cb6a2f
Merge branch 'main' into 1154-embed-placeholder
sharanagoudapatil Jul 5, 2024
c20ab92
[UE] manage metadata from AEM UI
jckautzmann Jul 17, 2024
7c21f94
[UE] manage metadata from AEM UI
jckautzmann Jul 18, 2024
445fddf
Merge pull request #1209 from hlxsites/ue-metadata
rgravitvl Jul 18, 2024
1921959
[UE] manage metadata from AEM UI
jckautzmann Jul 18, 2024
4a45ee3
Merge pull request #1210 from hlxsites/ue-metadata-2
rgravitvl Jul 18, 2024
2a2538b
[UE] manage metadata from AEM UI (#1211)
jckautzmann Jul 18, 2024
96452b5
[UE] manage metadata from AEM UI (#1212)
jckautzmann Jul 18, 2024
088440a
Merge branch 'main' of https://github.com/hlxsites/danaher-ls-aem int…
Jul 19, 2024
772092b
Merge branch 'main' into UE-added-auth-header
rgravitvl Jul 19, 2024
156b7db
Updated test cases
Jul 19, 2024
bcf26e6
Merge pull request #1195 from hlxsites/1154-embed-placeholder
sharanagoudapatil Jul 19, 2024
61481e3
1215 Video Embed Converter Update
Jul 19, 2024
3666871
Merge pull request #1216 from hlxsites/1215-embed-converter-update
sharanagoudapatil Jul 19, 2024
4aab305
Updated for carousel for UE
rgravitvl Jul 22, 2024
5dd32cb
Updated the review commnents
rgravitvl Jul 22, 2024
7065972
Merge pull request #1218 from hlxsites/1217-home-page-to-ue
rgravitvl Jul 22, 2024
d9a40a6
Merge branch 'main' into UE-added-auth-header
rgravitvl Jul 22, 2024
6d419be
Updated importer package
rgravitvl Jul 22, 2024
b2a128a
Updated accordion
rgravitvl Jul 23, 2024
075a1b3
reverted package lock
rgravitvl Jul 23, 2024
ac1b651
reverted
rgravitvl Jul 23, 2024
b397855
Merge pull request #1213 from hlxsites/UE-added-auth-header
rgravitvl Jul 23, 2024
75926fd
Merge branch 'main' into 1217-home-page-to-ue
rgravitvl Jul 23, 2024
6985216
Merge pull request #1219 from hlxsites/1217-home-page-to-ue
rgravitvl Jul 23, 2024
5be309e
updated accordion and carousel
rgravitvl Jul 23, 2024
84b0764
Merge pull request #1220 from hlxsites/1217-home-page-to-ue
rgravitvl Jul 23, 2024
befa945
fix: treat RTE wrappers as default content
buuhuu Jul 23, 2024
94845b4
fix: treat RTE wrappers as default content
buuhuu Jul 23, 2024
2714f8b
Fixed minor issue on carousel
rgravitvl Jul 23, 2024
511cc01
Merge pull request #1223 from hlxsites/fix-carousel-minor
rgravitvl Jul 23, 2024
75b4fb6
Solutions paragraph margin bottom
davenichols-DHLS Jul 23, 2024
48b1873
Fixed layout issue for carousel and accordion for UE
rgravitvl Jul 24, 2024
74e7ba5
Fixed lint issues
rgravitvl Jul 24, 2024
d45709c
synced lock json
rgravitvl Jul 24, 2024
5551d5d
Fixed test error
rgravitvl Jul 24, 2024
18cb499
Merge pull request #1224 from hlxsites/fix-ue-accordion
rgravitvl Jul 24, 2024
6e1f7a7
Added break-words to the word break options
davenichols-DHLS Jul 24, 2024
e095c06
Updated buttons
davenichols-DHLS Jul 24, 2024
61f7a7e
[UE] update to the latest xwalk boilerplate
jckautzmann Jul 24, 2024
ce732a4
Merge branch 'main' into authoring-experience2
jckautzmann Jul 24, 2024
bb17884
[UE] update to the latest xwalk boilerplate code
jckautzmann Jul 24, 2024
652030f
Merge pull request #1222 from hlxsites/authoring-experience2
rgravitvl Jul 24, 2024
655dc15
Updated for rest of the block in home page
rgravitvl Jul 24, 2024
b4ac9b4
Merge branch 'main' into 1217-home-page-to-ue
rgravitvl Jul 24, 2024
02438ad
Merge pull request #1226 from hlxsites/1217-home-page-to-ue
rgravitvl Jul 24, 2024
5a879ab
Updated the component definition
rgravitvl Jul 24, 2024
9b4fb3b
Merge pull request #1227 from hlxsites/fix-ue-home-page
rgravitvl Jul 24, 2024
b969cfb
Updated the component definition
rgravitvl Jul 24, 2024
247ef57
Merge pull request #1228 from hlxsites/fix-ue-home-page
rgravitvl Jul 24, 2024
070b492
Updated the component definition
rgravitvl Jul 24, 2024
e5d8a70
Merge pull request #1229 from hlxsites/fix-ue-home-page1
rgravitvl Jul 24, 2024
df91d51
Updated CSS to match - manually
davenichols-DHLS Jul 24, 2024
8cd2a68
Updated component models
rgravitvl Jul 24, 2024
2b91907
Merge pull request #1230 from hlxsites/fix-ue-card-blk
rgravitvl Jul 24, 2024
9e64fde
Added workflow tabs to build css
rgravitvl Jul 24, 2024
35e1127
Revert "1215 Video Embed Converter Update"
sharanagoudapatil Jul 25, 2024
1bc1f87
Reverted 1215
Jul 25, 2024
79b7fd7
[UE] migrate blog pages (#1231)
jckautzmann Jul 25, 2024
b257b9c
Merge branch 'main' into revert-1216-1215-embed-converter-update
sharanagoudapatil Jul 25, 2024
d1ba810
Merge pull request #1232 from hlxsites/revert-1216-1215-embed-convert…
sharanagoudapatil Jul 25, 2024
439171f
Updated cards block for UE
rgravitvl Jul 25, 2024
6092b18
Fixed lint issues
rgravitvl Jul 25, 2024
e0a3779
Merge pull request #1233 from hlxsites/fix-cards-home-ue
rgravitvl Jul 25, 2024
9f7a4c9
Updated the code to use Danaher colours
davenichols-DHLS Jul 25, 2024
37f6611
Merge pull request #1225 from hlxsites/1221-ux-solutions-pages
davenichols-DHLS Jul 25, 2024
f92569e
[UE] migrate News pages (#1234)
jckautzmann Jul 25, 2024
91a8fc0
1235 [Bug] Embed video not rendered width issue
Jul 25, 2024
acbee09
Merge branch 'main' into 1235-video-width-issue
sharanagoudapatil Jul 25, 2024
d7289da
Updated the options name
rgravitvl Jul 25, 2024
0469790
Merge branch 'main' into fix-options-home-ue
rgravitvl Jul 25, 2024
d1de332
Merge pull request #1236 from hlxsites/1235-video-width-issue
sharanagoudapatil Jul 25, 2024
c51e696
Merge pull request #1238 from hlxsites/fix-options-home-ue
rgravitvl Jul 25, 2024
1efc69b
Added the heading text field
rgravitvl Jul 26, 2024
7eb0ab0
Merge pull request #1239 from hlxsites/fix-artlist-home-ue
rgravitvl Jul 26, 2024
f7f9998
Updated options model
rgravitvl Jul 26, 2024
7638176
Merge pull request #1240 from hlxsites/fix-opts-home-ue
rgravitvl Jul 26, 2024
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
3 changes: 3 additions & 0 deletions authHeaders.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Authorization" : "Basic Y3Jvc3N3YWxrLXJlYWRlcjpENzk4NTEwOS1CQkNFLTRGQjUtQkM2NS1EMzRDNEFDNjVGRjI="
}
23 changes: 14 additions & 9 deletions blocks/accordion/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ function toggleAccordion(blockUUID, activeAccordion) {
});
}

function createAccordionBlock(question, answer, image, uuid, index, customUUID) {
const divEl = div({ id: `accordion-item-${index}`, class: 'accordion-item relative py-2' });
function createAccordionBlock(question, answer, image, uuid, parentElement, index, customUUID) {
parentElement.innerHTML = '';
parentElement.classList.add('accordion-item', 'relative', 'py-2');
parentElement.id = `accordion-item-${index}`;

const summaryInput = input({
type: 'checkbox',
class: 'peer hidden absolute',
Expand Down Expand Up @@ -63,7 +66,7 @@ function createAccordionBlock(question, answer, image, uuid, index, customUUID)
});

summaryContent.addEventListener('click', () => {
toggleAccordion(customUUID, divEl);
toggleAccordion(customUUID, parentElement);
if (image) {
const selectedImage = document.querySelector(`div[data-id="${uuid}"]`);
selectedImage.parentElement.childNodes.forEach((imageEl) => {
Expand All @@ -78,8 +81,8 @@ function createAccordionBlock(question, answer, image, uuid, index, customUUID)
});
}
});
divEl.append(summaryInput, summaryContent, panel);
return divEl;
parentElement.append(summaryInput, summaryContent, panel);
return parentElement;
}

export default function decorate(block) {
Expand All @@ -94,6 +97,7 @@ export default function decorate(block) {
image: imageElements?.parentElement,
answer: answerElements.map((elem) => elem.outerHTML),
uuid: generateUUID(),
parentElement: element,
};
});

Expand All @@ -104,6 +108,7 @@ export default function decorate(block) {
question.answer,
question.image,
question.uuid,
question.parentElement,
index,
customUUID,
));
Expand All @@ -120,11 +125,11 @@ export default function decorate(block) {
...accordionImages,
);

const title = [...block.children][0].querySelector(':scope > div > h2');
block.innerHTML = '';
if (title && title.textContent) {
const titleEl = [...block.children][0];
const title = titleEl.querySelector(':scope > div > h2');
if (titleEl && title) {
title.classList.add(...'lg:text-center align-middle lg:pl-44 eyebrow'.split(' '));
block.parentElement.prepend(title);
block.parentElement.prepend(titleEl);
}
if (block.classList.contains('image')) {
block.classList.add(...'grid max-w-7xl w-full mx-auto grid-cols-1 lg:grid-cols-2 gap-16 pt-4'.split(' '));
Expand Down
26 changes: 11 additions & 15 deletions blocks/cards/cards.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { createOptimizedPicture } from '../../scripts/lib-franklin.js';
import {
a, div, li, ul,
a, div,
} from '../../scripts/dom-builder.js';
import { makePublicUrl } from '../../scripts/scripts.js';

export default function decorate(block) {
if (block.parentElement.parentElement.classList.contains('cards-container')) {
block.parentElement.parentElement.classList.remove(...'bg-danaherlightblue-50'.split(' '));
}
const ulElement = ul({ class: 'list-none m-0 p-0 grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-16' });
if (block.classList.contains('cols-4')) ulElement.classList.add('lg:grid-cols-4');
else ulElement.classList.add('lg:grid-cols-3');
block.classList.add(...'list-none m-0 p-0 grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-16'.split(' '));
if (block.classList.contains('cols-4')) block.classList.add('lg:grid-cols-4');
else block.classList.add('lg:grid-cols-3');

[...block.children].forEach((row) => {
let type = '';
Expand All @@ -23,16 +23,16 @@ export default function decorate(block) {
typeP.remove();
block.classList.add(type.toLowerCase());
}
let readMoreLink = row.querySelector('a');
const readMoreLink = row.querySelector('a');
const cardWrapper = (readMoreLink)
? a({ href: makePublicUrl(readMoreLink.href), title: readMoreLink.title })
: div();
cardWrapper.className = 'card-wrapper flex flex-col col-span-1 mx-auto justify-center max-w-xl overflow-hidden pl-8 pr-2 border-l-[0.5px] border-gray-300 transform transition duration-500 hover:scale-105';
if (!block.classList.contains('opco')) cardWrapper.classList.remove(...'border-l-[0.5px] border-gray-300 pl-8 pr-2 transform transition duration-500 hover:scale-105'.split(' '));
if (!type) cardWrapper.classList.add('...cursor-pointer relative transform transition duration-500 border hover:scale-105 shadow-lg rounded-lg'.split(' '));
const card = li((heading) || '', cardWrapper);
cardWrapper.innerHTML = row.innerHTML;
[...cardWrapper.children].forEach((elem) => {
row.append((heading) || '');
[...row.children].forEach((elem) => {
cardWrapper.append(elem);
if (elem.querySelector('picture, img')) {
elem.className = 'cards-card-image h-52 leading-5';
} else {
Expand All @@ -42,22 +42,18 @@ export default function decorate(block) {
if (elem?.querySelector('h3') && !block.classList.contains('opco')) elem.querySelector('h3').className = 'pl-2 text-lg font-semibold text-danahergray-900 !line-clamp-3 !break-words !h-24';
if (elem?.querySelector('p')) elem.querySelector('p').className = 'mb-4 text-sm !h-20 !line-clamp-4 !break-words';
if (elem?.querySelector('p') && !block.classList.contains('opco')) elem.querySelector('p').className = 'pl-2 mb-4 text-sm !h-20 !line-clamp-4 !break-words';
row.append(cardWrapper);
});

readMoreLink = cardWrapper.querySelector('a');
if (readMoreLink) {
readMoreLink.innerHTML += ' →';
if (block.classList.contains('opco')) { readMoreLink.className = 'card-link inline-flex w-full pt-5 text-base text-danaherpurple-500 font-semibold'; } else readMoreLink.className = 'pl-2 card-link inline-flex w-full pt-5 text-base text-danaherpurple-500 font-semibold';
card.querySelector('div.cards-card-body').append(readMoreLink);
row.querySelector('div.cards-card-body').append(readMoreLink);
}
ulElement.append(card);
});
ulElement.querySelectorAll('img').forEach((img) => {
block.querySelectorAll('img').forEach((img) => {
const picture = img.closest('picture');
const cardImage = createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }]);
if (block.classList.contains('opco')) { cardImage.querySelector('img').className = 'h-48 w-full rounded-t !object-contain'; }
if (picture) picture.replaceWith(cardImage);
});
block.textContent = '';
block.append(ulElement);
}
29 changes: 12 additions & 17 deletions blocks/carousel/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ export default function decorate(block) {
block.style = 'grid-auto-columns: 100%';
block.classList.remove('block');
block.classList.add(...'grid grid-flow-col overflow-x-auto space-x-2 snap-x snap-mandatory gap-6 rounded-md scroll-smooth'.split(' '));
const clonedBlock = [...block.children];
block.innerHTML = '';
const slides = clonedBlock.map((ele, eleIndex) => {
const carouselSlider = div({ class: `card carousel-slider flex snap-start list-none bg-white flex-col rounded-md duration-${SLIDE_TRANSITION} ease-in-out inset-0 transition-transform transform`, 'data-carousel-item': (eleIndex + 1) });
const slides = [...block.children].map((ele, eleIndex) => {
ele.classList.add(...`card carousel-slider flex snap-start list-none bg-white flex-col rounded-md duration-${SLIDE_TRANSITION} ease-in-out inset-0 transition-transform transform`.split(' '));
ele.setAttribute('data-carousel-item', (eleIndex + 1));
const contentEl = ele.querySelector('h2, p');
const picture = ele.querySelector('picture');
let changedBtn = 0;
Expand Down Expand Up @@ -89,28 +88,24 @@ export default function decorate(block) {
});
content.append(actions);
}
carouselSlider.append(div({ class: 'lg:m-auto w-full h-auto max-w-7xl py-8 lg:py-0 overflow-hidden' }, content));
ele.append(div({ class: 'lg:m-auto w-full h-auto max-w-7xl py-8 lg:py-0 overflow-hidden' }, content));
}
if (picture) {
picture.querySelector('img').classList.add(...'absolute bottom-0 h-full w-full object-cover'.split(' '));
carouselSlider.append(div({ class: 'relative h-48 w-full md:h-[35rem] block lg:absolute lg:inset-y-0 lg:right-0 lg:w-1/2' }, picture));
ele.append(div({ class: 'relative h-48 w-full md:h-[35rem] block lg:absolute lg:inset-y-0 lg:right-0 lg:w-1/2' }, picture));
}
changedBtn = 0;
decorateModals(carouselSlider);
block.append(carouselSlider);
return { position: parseInt(eleIndex, 10), el: carouselSlider };
decorateModals(ele);
return { position: parseInt(eleIndex, 10), el: ele };
}).filter((item) => item);
if (block.parentElement.className.includes('carousel-wrapper')) {
let carouselControls;
if (block.children.length > 2 && block.parentElement.className.includes('carousel-wrapper')) {
block.parentElement.classList.add(...'relative w-full'.split(' '));
block.parentElement.setAttribute('data-carousel', 'slide');
block.parentElement.setAttribute('id', uuid);
if (block.children.length > 1) {
carouselControls = div({ class: 'relative md:absolute md:bottom-16 flex gap-x-4 items-center space-x-3 z-10 px-4 lg:px-8 xl:pr-10' });
configurePagination(carouselControls, slides.length);
configureNavigation(carouselControls);
block.parentElement.append(div({ class: 'carousel-controls relative max-w-7xl mx-auto' }, carouselControls));
}
const carouselControls = div({ class: 'relative md:absolute md:bottom-16 flex gap-x-4 items-center space-x-3 z-10 px-4 lg:px-8 xl:pr-10' });
configurePagination(carouselControls, slides.length);
configureNavigation(carouselControls);
block.parentElement.append(div({ class: 'carousel-controls relative max-w-7xl mx-auto' }, carouselControls));
if (block.classList.contains('add-border')) block.classList.add(...'border-t border-b border-solid border-black'.split(' '));
setTimeout(() => {
/* eslint-disable no-new */
Expand Down
2 changes: 1 addition & 1 deletion blocks/columns/columns.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
text-decoration-thickness: 2px;
text-underline-offset: 4px;
text-decoration-style: solid;
word-break: break-all;
word-break: break-words;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
Expand Down
4 changes: 4 additions & 0 deletions blocks/embed/embed.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
display: flex
}

.embed-wrapper :is(.w-full) {
width: 100%
}

.embed-wrapper :is(.max-w-3xl) {
max-width: 48rem
}
Expand Down
1 change: 1 addition & 0 deletions blocks/embed/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const loadEmbed = (block, link, autoplay) => {
if (config) {
block.innerHTML = config.embed(block, url, autoplay);
block.classList = `block embed embed-${toClassName(config.match[0])} my-8 mx-auto text-center max-w-3xl`;
block.parentNode.classList.add('w-full');
} else {
block.innerHTML = getDefaultEmbed(url);
block.classList = 'block embed my-8 mx-auto text-center max-w-3xl';
Expand Down
2 changes: 1 addition & 1 deletion blocks/logo-clouds/logo-clouds.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
text-decoration-thickness: 2px;
text-underline-offset: 4px;
text-decoration-style: solid;
word-break: break-all;
word-break: break-words;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
Expand Down
2 changes: 1 addition & 1 deletion blocks/product-overview/product-overview.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
text-decoration-thickness: 2px;
text-underline-offset: 4px;
text-decoration-style: solid;
word-break: break-all;
word-break: break-words;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
Expand Down
Loading
Loading