Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cf5166b
fix: set analytic attribute for side nav
timkim Feb 19, 2026
cbff000
fix: also add tracking headers to other components
timkim Feb 19, 2026
cc1525c
fix: also add in analytics to search
timkim Feb 19, 2026
ac7bc8f
fix: remove this tracking
timkim Feb 19, 2026
5725aa8
fix: just use the url for tracking in search
timkim Feb 20, 2026
18cc2d7
fix: track sign in button
timkim Feb 20, 2026
4341e62
fix: add in tracking to the profile
timkim Feb 20, 2026
415e641
removed the role check
BaskarMitrah Feb 25, 2026
b50f9b0
added edge case with proper description
BaskarMitrah Feb 25, 2026
4b766bf
feat: read resource paths from adp-site-metadata.json with fallback t…
Feb 27, 2026
9b7d634
fix the orgdropdown issue
BaskarMitrah Mar 3, 2026
7148124
fixed the org dropdown issue
BaskarMitrah Mar 3, 2026
0e31395
added console
BaskarMitrah Mar 3, 2026
dd0620c
added fetch entitlment
BaskarMitrah Mar 3, 2026
7469270
added fetch entitlment
BaskarMitrah Mar 3, 2026
a9b4af0
remove the console
BaskarMitrah Mar 3, 2026
f8bb499
disable buttonn
BaskarMitrah Mar 4, 2026
2d6412e
fix the undefined issue
BaskarMitrah Mar 4, 2026
3f2a95a
added css for disabled button
BaskarMitrah Mar 4, 2026
c281efd
removed the fill in disable button
BaskarMitrah Mar 4, 2026
47b4d4d
test change to IS_DEV_DOCS
dianeba3 Mar 6, 2026
f3673d5
remove console log for non-documentation pages in buildEmbeds function
dianeba3 Mar 6, 2026
e0bf5e0
fix : codeblock try in playground issue
BaskarMitrah Mar 10, 2026
e6db6c4
fix : test url issue
BaskarMitrah Mar 10, 2026
3bc3c5b
fix : pr comments
BaskarMitrah Mar 10, 2026
6f277b9
feat : added test case - playground
BaskarMitrah Mar 10, 2026
39e2b1e
added playground url for the stage
BaskarMitrah Mar 3, 2026
f033394
added : local url test for playground
BaskarMitrah Mar 4, 2026
a8d9936
checked islocal path
BaskarMitrah Mar 5, 2026
9f1137b
fix : PR comments
BaskarMitrah Mar 10, 2026
9e84bcd
fix : typo mistake
BaskarMitrah Mar 10, 2026
fef0fc9
feat: dynamic contributors
Mar 10, 2026
0e269fd
Add in ai assistant
timkim Mar 10, 2026
71d544d
Add figma icons
dianeba3 Mar 11, 2026
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
547 changes: 547 additions & 0 deletions hlx_statics/blocks/ai-assistant/ai-assistant.css

Large diffs are not rendered by default.

1,067 changes: 1,067 additions & 0 deletions hlx_statics/blocks/ai-assistant/ai-assistant.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions hlx_statics/blocks/breadcrumbs/breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default async function decorate(block) {
const nav = document.createElement('nav');
nav.ariaLabel = "Breadcrumb";
nav.role = "navigation";
nav.setAttribute("daa-lh", "breadcrumbs");
block.append(nav);

const ol = document.createElement('ol');
Expand Down
36 changes: 3 additions & 33 deletions hlx_statics/blocks/code/code.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import decoratePreformattedCode, { applyLanguageDirectives, extractLanguageDirectives } from '../../components/code.js';
import decoratePreformattedCode, { applyLanguageDirectives } from '../../components/code.js';

export default function decorate(block) {
const code = block.querySelector('code');
Expand All @@ -10,39 +10,9 @@ export default function decorate(block) {
code.parentElement.replaceChild(pre, code);
pre.appendChild(code);
}
// Process each class from code element
[...code.classList].forEach(cls => {
if (cls.includes('-data')) {
const parts = cls.split('-data');
const languagePart = parts.find(item => item.includes('language-'));

// Add data attributes from class parts
parts.forEach(item => {
if (!item.includes('language-') && item.includes('=')) {
const match = item.match(/^-?([^=]+)="?([^"]*)"?$/);
if (match) {
const attrName = `data-${match[1]}`;
const attrValue = match[2];
pre.setAttribute(attrName, attrValue);
code.setAttribute(attrName, attrValue);
}
}
});

// Remove the messy class and add clean language class
code.classList.remove(cls);
pre.classList.remove(cls);
if (languagePart) {
const cleanClass = languagePart.trim();
code.classList.add(cleanClass);
pre.classList.add(cleanClass);
}
} else {
pre.classList.add(cls);
}
});

const languageClass = [...pre.classList].find(cls => cls.startsWith('language-'));
const languageClass = [...pre.classList].find(cls => cls.startsWith('language-'))
|| (code && [...code.classList].find(cls => cls.startsWith('language-')));
let language = languageClass ? languageClass.replace('language-', '') : 'none';

if (language) {
Expand Down
5 changes: 5 additions & 0 deletions hlx_statics/blocks/contributors/contributors.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ main div.contributors-wrapper .imageList {
padding-left: 16px;
}

main div.contributors-wrapper .imageList:empty,
main div.contributors-wrapper .lastUpdatedText:empty {
display: none;
}

.contributor-modal .model-comp-contributors {
display: flex;
justify-content: center;
Expand Down
60 changes: 45 additions & 15 deletions hlx_statics/blocks/contributors/contributors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
import { getMetadata, getContributorsJsonPath } from '../../scripts/lib-helix.js';
import insertWrapperContainer from '../../components/wrapperContainer.js';

async function fetchContributorsData() {
try {
const pathPrefix = getMetadata('pathprefix');
const pagePath = window.location.pathname;
if (!pathPrefix || !pagePath || !pagePath.startsWith(pathPrefix)) {
return null;
}

const jsonPath = await getContributorsJsonPath();
if (!jsonPath) return null;

const response = await fetch(jsonPath);
if (!response.ok) {
console.warn('Network response was not ok:', jsonPath);
return null;
}

const json = await response.json();
const page = pagePath.slice(pathPrefix.length);
return json?.data?.find(item => item.page === page) ?? null;

} catch (e) {
console.error('Contributors fetch error:', e);
return null;
}
}

/**
* Decorates the contributors block
* @param {Element} block The contributors block element
Expand Down Expand Up @@ -38,13 +66,12 @@ export default async function decorate(block) {
modal.innerHTML = modalHTML;
document.body.appendChild(modal);

const github_user_profile_pic = [
"https://github.com/hollyschinsky.png",
"https://github.com/vamshich13.png",
"https://github.com/nimithajalal.png"
];
const data = await fetchContributorsData();
const avatars = data?.avatars ?? [];
const lastUpdated = data?.lastUpdated ?? '';

const contribution_date = "2/21/2024";
const blobUrl = getMetadata('githubblobpath');
const commitsUrl = blobUrl?.replace('/blob/', '/commits/');

const firstDiv = block.querySelector('div');
firstDiv.classList.add("contributors-content");
Expand All @@ -57,14 +84,16 @@ export default async function decorate(block) {

const lastUpdate = document.createElement("div");
lastUpdate.classList.add("lastUpdateDetails");
const lastUpdateWrapper = document.createElement("a");
lastUpdateWrapper.href = "https://github.com/AdobeDocs/express-add-ons-docs/commits/main/src/pages/references/index.md";
lastUpdateWrapper.target = "_blank";
lastUpdate.appendChild(lastUpdateWrapper);
const lastUpdatedWrapper = document.createElement("a");
if (commitsUrl) {
lastUpdatedWrapper.href = commitsUrl;
lastUpdatedWrapper.target = "_blank";
}
lastUpdate.appendChild(lastUpdatedWrapper);

const imageList = document.createElement("div");
imageList.classList.add("imageList");
github_user_profile_pic.forEach(src => {
avatars.forEach(src => {
const img = document.createElement('img');
img.src = src;
img.classList.add("image-contributor");
Expand All @@ -73,11 +102,12 @@ export default async function decorate(block) {
span.appendChild(img);
imageList.appendChild(span);
});
lastUpdateWrapper.appendChild(imageList);
lastUpdatedWrapper.appendChild(imageList);

const imageTextWrapper = document.createElement("span");
imageTextWrapper.innerText = `Last updated ${contribution_date}`;
lastUpdateWrapper.appendChild(imageTextWrapper);
const lastUpdatedText = document.createElement("span");
lastUpdatedText.classList.add("lastUpdatedText");
lastUpdatedText.innerText = lastUpdated ? `Last updated ${lastUpdated}` : '';
lastUpdatedWrapper.appendChild(lastUpdatedText);

const feedback = document.createElement("div");
feedback.classList.add("feedback");
Expand Down
8 changes: 5 additions & 3 deletions hlx_statics/blocks/getcredential/getcredential-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ export function createOrganizationModal(organizations, currentOrg, onOrgChange)
organizations.forEach((org, index) => {
const option = createTag('option', { value: org.code || org.id });
option.textContent = org.name || org.code || `Organization ${index + 1}`;
if (currentOrg && (org.code === currentOrg.code || org.id === currentOrg.code)) {
const currentId = currentOrg?.code || currentOrg?.id;
if (currentId && (org.code || org.id) === currentId) {
option.selected = true;
}
dropdown.appendChild(option);
Expand Down Expand Up @@ -979,7 +980,7 @@ export function createCredentialSection(config) {
return credentialSection;
}

export function createOrgNotice(text, className = 'org-notice', organizationsData = null, currentOrg = null, onOrgChange = null) {
export function createOrgNotice(text, className = 'org-notice', organizationsData = null, currentOrg = null, onOrgChange = null, getCurrentOrg = null) {
const orgNotice = createTag('div', { class: className });
const orgText = createTag('span', { class: 'org-text' });
orgText.textContent = text;
Expand All @@ -988,7 +989,8 @@ export function createOrgNotice(text, className = 'org-notice', organizationsDat
changeOrgLink.textContent = 'Change organization';
changeOrgLink.addEventListener('click', (e) => {
e.preventDefault();
document.body.appendChild(createOrganizationModal(organizationsData, currentOrg, onOrgChange));
const orgForModal = (typeof getCurrentOrg === 'function' ? getCurrentOrg() : null) ?? currentOrg;
document.body.appendChild(createOrganizationModal(organizationsData, orgForModal, onOrgChange));
});

orgNotice.appendChild(orgText);
Expand Down
73 changes: 73 additions & 0 deletions hlx_statics/blocks/getcredential/getcredential.css
Original file line number Diff line number Diff line change
Expand Up @@ -2551,6 +2551,79 @@
align-self: flex-start;
}

.request-access-request-btn-wrap {
position: relative;
margin-top: 8px;
display: inline-flex;
align-items: center;
gap: 8px;
align-self: flex-start;
}

.request-access-request-btn.request-access-request-btn--disabled {
background: #f5f5f5;
border-color: #d7d7d7;
color: #8b8b8b;
cursor: not-allowed;
opacity: 1;
}

.request-access-request-btn.request-access-request-btn--disabled .spectrum-Button-label {
color: #8b8b8b;
}

.request-access-pending-info-trigger {
width: 18px;
height: 18px;
border: none;
background: transparent;
color: #4b4b4b;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
cursor: pointer;
}

.request-access-pending-popover {
position: absolute;
top: 24px;
left: calc(100% + 8px);
width: 230px;
background: var(--color-white);
border: 1px solid var(--color-light-gray-border);
border-radius: 4px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
padding: 12px;
z-index: 5;
}

.request-access-pending-popover.hidden {
display: none;
}

.request-access-pending-title {
margin: 0 0 8px;
font-size: 0.875rem;
font-weight: 700;
color: var(--color-dark-bg);
}

.request-access-pending-body {
margin: 0;
font-size: 0.75rem;
line-height: 1.4;
color: var(--color-text);
}

.request-access-pending-link {
display: inline-block;
margin-top: 8px;
font-size: 0.75rem;
color: var(--color-primary);
text-decoration: underline;
}

/* EdgeCase variants (NoProduct, Type1User, NotMember, NotSignUp) from credential JSON */
.request-access-edge-case-card {
border: 2px solid var(--color-primary);
Expand Down
Loading
Loading