Skip to content

Commit

Permalink
Merge branch 'adobecom:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
suhjainadobe committed Apr 24, 2024
2 parents f67eab2 + b6f187f commit 6596fe3
Show file tree
Hide file tree
Showing 49 changed files with 3,281 additions and 116 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/graybox-sync-repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Graybox Repo Sync

on:
workflow_dispatch:
inputs:
syncBranch:
description: 'Branch to sync'
required: true
default: 'stage'
type: choice
options:
- 'stage'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.FG_SYNC_APP_ID }}
private-key: ${{ secrets.FG_SYNC_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: "cc-graybox"

- name: Checkout Repo
uses: actions/checkout@v2
with:
persist-credentials: false
ref: ${{ inputs.syncBranch }}

- name: Clone Graybox Repository and Checkout Stage Branch
run: |
git clone https://github.com/adobecom/cc-graybox.git ../cc-graybox
cd ../cc-graybox
git checkout $GB_SYNC_BRANCH
echo "cc-graybox branch"
git branch
cd ../cc
echo "cc branch"
git branch
env:
GB_SYNC_BRANCH: ${{ inputs.syncBranch }}

- name: Overwrite graybox repo files with latest from source repo
run: |
rsync -av --exclude='fstab.yaml' --exclude='.github' --exclude='.kodiak' --exclude='.git' --exclude='.idea' --exclude='.husky' --exclude='.vscode' --exclude='tools/sidekick/config.json' ./ ../cc-graybox/
- name: Commit and Push Changes to Graybox Repository
run: |
cd ../cc-graybox
echo "cc-graybox branch"
git branch
git config user.email "$FG_SYNC_BOT_EMAIL"
git config user.name "milo-repo-sync[bot]"
git status
git remote set-url origin https://oauth2:[email protected]/adobecom/cc-graybox.git
git remote -v
git add .
git commit -m "Syncing cc to cc-graybox"
git push origin $GB_SYNC_BRANCH --force
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
FG_SYNC_BOT_EMAIL: ${{ secrets.FG_SYNC_BOT_EMAIL }}
GB_SYNC_BRANCH: ${{ inputs.syncBranch }}
5 changes: 4 additions & 1 deletion .hlxignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*.json
!*/**/*.json
.*
*.md
LICENSE
test/*
!tools/sidekick/config.json
web-test-runner.config.mjs
codecov.yaml
4 changes: 2 additions & 2 deletions creativecloud/blocks/catalog/catalog.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
}
}

.catalog > merch-sidenav {
.catalog.app > merch-sidenav {
grid-column: 1 / span 1;
order: 0;
}

.catalog > merch-cards {
.catalog.app > merch-card-collection {
align-self: baseline;
grid-column: 2 / span 1;
order: 1;
Expand Down
50 changes: 30 additions & 20 deletions creativecloud/blocks/catalog/catalog.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
/* eslint-disable chai-friendly/no-unused-expressions */
import { getLibs } from '../../scripts/utils.js';

const miloLibs = getLibs('/libs');
const { loadStyle } = await import(`${miloLibs}/utils/utils.js`);

// Helps with TBT: MWPW-145127
loadStyle(`${miloLibs}/blocks/global-navigation/features/profile/dropdown.css`);

/** container block */
export default async function init(el) {
const miloLibs = getLibs();
import(`${miloLibs}/deps/lit-all.min.js`);
import(`${miloLibs}/blocks/merch-cards/merch-cards.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/theme.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/button.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/icons/checkmark.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/icons/chevron.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/help-text.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/icon.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/icons-ui.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/icons-workflow.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/menu.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/overlay.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/popover.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/reactive-controllers.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/search.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/shared.js`);
import(`${miloLibs}/features/spectrum-web-components/dist/textfield.js`);
el.classList.add('merch', 'app');
el.classList.add('app');
const libs = getLibs();
const sidenavEl = el.querySelector('.sidenav');
const merchCardsEl = el.querySelector('.merch-card-collection');
el.innerHTML = '';
let merchCards;
if (merchCardsEl) {
el.appendChild(merchCardsEl);
merchCardsEl.classList.add('four-merch-cards');
const { default: initMerchCards } = await import(`${libs}/blocks/merch-card-collection/merch-card-collection.js`);
merchCards = await initMerchCards(merchCardsEl);
}
if (sidenavEl) {
(merchCards?.updateComplete ?? Promise.resolve()).then(async () => {
const { default: initSidenav } = await import('../sidenav/sidenav.js');
const sidenav = await initSidenav(sidenavEl);
el.appendChild(sidenav);
await sidenav.updateComplete;
if (merchCards) {
merchCards.sidenav = sidenav;
merchCards.requestUpdate();
}
});
}
return el;
}
Loading

0 comments on commit 6596fe3

Please sign in to comment.