Skip to content
Open

Msm #919

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
4ec1df9
msm implementation
ravuthu Apr 6, 2026
f5fd616
Satellite site can control the sync features and inheritance
ravuthu Apr 6, 2026
e4266cb
renamed global publish to msm
ravuthu Apr 6, 2026
f2a7f9a
read msm mapping from Org config and preview/publish the page from ba…
ravuthu Apr 7, 2026
76356e1
Show a link to edit the page on custom sites
ravuthu Apr 7, 2026
adb8f58
readme added
ravuthu Apr 7, 2026
f04bc7d
Merge branch 'main' of https://github.com/ravuthu/da-live into msm
ravuthu Apr 7, 2026
2a4fe87
moved the shared file inside msm as the da-title is not using it anymore
ravuthu Apr 7, 2026
2b0b3e6
moved the utils methods to helpers folder
ravuthu Apr 7, 2026
0e39224
msm unit tests
ravuthu Apr 8, 2026
09b6728
fix: fix block description icon (#872)
auniverseaway Apr 8, 2026
1928c69
fix: page decoration visibility
auniverseaway Apr 11, 2026
6ba856e
fix: allow table node selection, fix table select handle z-index (#874)
usman-khalid Apr 16, 2026
aefd0f2
make the preview dialog respect our ref pattern for DA library (#869)
kunwarsaluja Apr 16, 2026
77c384e
chore(deps): update dependency @babel/core (#731)
renovate[bot] Apr 16, 2026
70b4e1e
chore(deps): update dependency eslint to v9.39.4 (#876)
renovate[bot] Apr 17, 2026
7ae0b0e
Add Insert Image slashmenu command (#881)
chrischrischris Apr 20, 2026
83f1870
fix: show scroll bars on da-dialog when needed (#883)
chrischrischris Apr 21, 2026
9c14870
fix: disallow double hyphen in names (#885)
chrischrischris Apr 22, 2026
6498abc
fix: Strip da-diff-added attrs when accepting diff content (#887)
chrischrischris Apr 22, 2026
f26f7c9
fix: shift-tab should not create a new row (#886)
usman-khalid Apr 23, 2026
ac2dc97
fix: Switch to live preview proxy. Remove client side feature flag (#…
andreituicu Apr 28, 2026
7890b19
feat: Support using "features" column to enable focal-point (#890)
chrischrischris Apr 28, 2026
5d13fa5
Fetch token using org and site parameters
auniverseaway Apr 28, 2026
f01e285
feat: detect stale sheet/config and prevent concurrent overwrites (#877)
auniverseaway Apr 28, 2026
ebfdeaa
fix: Update wording for list status (#892)
chrischrischris Apr 28, 2026
cd12054
fix: sort editor.path matches by path prefix length, not total string…
sagarsane Apr 28, 2026
eba7b96
fix: Show if file has redirect setup in list view (#898)
chrischrischris Apr 28, 2026
6153d82
feat: Do not auto-create docs on edit nav (#894)
chrischrischris Apr 28, 2026
b2cf02d
feat: Delete enhancements (#888)
chrischrischris Apr 28, 2026
883a1bc
fix: Focus input when editing sheet names (#891)
chrischrischris Apr 28, 2026
a959aa8
fix: detect links in pasted text (#893)
chrischrischris Apr 28, 2026
fa40753
fix: await content cookie later in loading (#906)
chrischrischris Apr 29, 2026
49b0493
feat: NX2 - support custom background images and dark scheme on da-si…
auniverseaway Apr 29, 2026
4909b6b
Change action bar position from absolute to fixed
auniverseaway Apr 29, 2026
abe2ad1
fix: Create versions for forms. (#910)
kozmaadrian Apr 30, 2026
33bfb8d
fix: prevent IMS auth fragments from leaking into API org path (#909)
kptdobe Apr 30, 2026
5885e69
fix: start loading ims early (#911)
chrischrischris Apr 30, 2026
c5141f2
fix: e2e tests (#912)
chrischrischris Apr 30, 2026
e28ff7e
fix: update delete dialog (#901)
chrischrischris May 1, 2026
abae945
fix: Improve unit test coverage (#899)
chrischrischris May 1, 2026
9e83439
fix: delete e2e test for now ui (#915)
chrischrischris May 1, 2026
9f95694
Update file icon in da-list-item component
auniverseaway May 2, 2026
224b0c6
feat: Improved html diffing & version compare (#914)
chrischrischris May 4, 2026
1a0f72a
Merge branch 'main' of https://github.com/ravuthu/da-live into msm
ravuthu May 4, 2026
0e57c77
fix: prevent FPO placeholder from reappearing after image upload (#918)
kptdobe May 4, 2026
0e4735a
fix: prevent malformed API paths (double slashes, undefined segments,…
kptdobe May 5, 2026
fc1f437
use the sl-select from nx for action dropdown
ravuthu May 5, 2026
c589e75
Merge branch 'main' of https://github.com/ravuthu/da-live into msm
ravuthu May 5, 2026
c024d44
use se- components from nx2
ravuthu May 5, 2026
56a5bdc
missed test file added
ravuthu May 5, 2026
13fe3ee
multi level inheritance implemented
ravuthu May 20, 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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

65 changes: 0 additions & 65 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/lint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24]
node-version: [22]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
30 changes: 30 additions & 0 deletions blocks/browse/browse.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.light-scheme {
.browse:has(da-sites) {
[data-scheme="light"] {
display: block;
}
}
}

.dark-scheme {
.browse:has(da-sites) {
[data-scheme="dark"] {
display: block;
}
}
}

picture {
display: none;
position: absolute;
left: 0;
right: 0;
top: 0;
}

img {
display: block;
width: 100%;
height: auto;
mask-image: linear-gradient(to bottom, rgb(0 0 0) 50%, transparent 100%);
}
59 changes: 24 additions & 35 deletions blocks/browse/browse.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,43 @@
import getPathDetails from '../shared/pathDetails.js';
import { getNx } from '../../scripts/utils.js';

// Preload Lit
import('../../deps/lit/dist/index.js');
const { hashChange, loadStyle } = await import(`${getNx()}/utils/utils.js`);

async function loadComponent(el, cmpName, details) {
el.innerHTML = '';
const styles = await loadStyle(import.meta.url);
document.adoptedStyleSheets.push(styles);

async function loadComponent(el, cmpName, pathDetails) {
const existing = el.querySelector(cmpName);
if (existing && pathDetails) {
existing.details = pathDetails;
return;
}
// Swapping views — remove whichever component is currently mounted.
el.querySelector('da-sites, da-browse')?.remove();
await import(`./${cmpName}/${cmpName}.js`);
const cmp = document.createElement(cmpName);
if (details) cmp.details = details;
cmp.details = pathDetails;
el.append(cmp);
}

function setRecentSite(details) {
if (!details.repo) return;
if (details.repo.startsWith('.')) return;
if (!details.site) return;
// .trash, .da, .helix, .versions
if (details.site.startsWith('.')) return;
const currentSites = JSON.parse(localStorage.getItem('da-sites')) || [];
const siteString = `${details.owner}/${details.repo}`;
const siteString = `${details.org}/${details.site}`;
const foundIdx = currentSites.indexOf(siteString);
if (foundIdx === 0) return;
if (foundIdx !== -1) currentSites.splice(foundIdx, 1);
localStorage.setItem('da-sites', JSON.stringify([siteString, ...currentSites].slice(0, 8)));
}

async function setupExperience(el, e) {
const details = getPathDetails();
if (details) setRecentSite(details);
if (e) {
const oldHash = new URL(e.oldURL).hash;
const newHash = new URL(e.newURL).hash;

// Are they already browsing
if (oldHash.startsWith('#/') && newHash.startsWith('#/')) {
document.querySelector('da-browse').details = details;
return;
}
}
if (!details) {
await loadComponent(el, 'da-sites');
} else {
await loadComponent(el, 'da-browse', details);
}
}

export default async function init(el) {
await setupExperience(el);
export default function init(el) {
hashChange.subscribe((pathDetails) => {
const cmpName = pathDetails ? 'da-browse' : 'da-sites';
loadComponent(el, cmpName, pathDetails);
if (pathDetails) setRecentSite(pathDetails);
});

// Lazily preload the editor
setTimeout(() => { import('da-y-wrapper'); }, 3000);

window.addEventListener('hashchange', async (e) => {
await setupExperience(el, e);
});
}
12 changes: 6 additions & 6 deletions blocks/browse/da-actionbar/da-actionbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ button {
.da-action-bar {
bottom: 12px;
position: fixed;
background: #BC1C74;
background-color: rgb(188 28 116);
min-height: 48px;
border-radius: 6px;
width: var(--grid-container-width);
border-radius: var(--s2-corner-radius-700);
width: var(--se-grid-container-width);
z-index: 400;
filter: drop-shadow(rgb(0 0 0 / 15%) 0 1px 4px);
display: flex;
Expand All @@ -25,7 +25,7 @@ button {
height: 32px;
color: #FFF;
border: none;
border-radius: 4px;
border-radius: var(--s2-corner-radius-500);
display: flex;
align-items: center;
gap: 12px;
Expand All @@ -43,14 +43,14 @@ button {
}

.da-action-bar-left-rail {
margin-left: 14px;
margin-left: 3px;
display: flex;
align-items: center;
gap: 12px;
}

.da-action-bar-right-rail {
margin: 0 3px;
margin-right: 3px;
display: flex;
gap: 8px;
}
Expand Down
4 changes: 2 additions & 2 deletions blocks/browse/da-actionbar/da-actionbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { LitElement, html } from 'da-lit';
import { getNx } from '../../../scripts/utils.js';

// Styles
const { default: getStyle } = await import(`${getNx()}/utils/styles.js`);
const STYLE = await getStyle(import.meta.url);
const { loadStyle } = await import(`${getNx()}/utils/utils.js`);
const STYLE = await loadStyle(import.meta.url);

export default class DaActionBar extends LitElement {
static properties = {
Expand Down
8 changes: 4 additions & 4 deletions blocks/browse/da-breadcrumbs/da-breadcrumbs.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ button {

.da-breadcrumb-list-item-link-wrapper {
padding: 0 10px;
background: #dcdcdc;
background: var(--s2-gray-200);
border-radius: 6px;
line-height: 32px;
display: flex;
Expand All @@ -38,7 +38,7 @@ button {

.da-breadcrumb-list-item a {
text-decoration: none;
color: rgb(44 44 44);
color: var(--s2-gray-800);
}

.da-breadcrumb-list-item-config {
Expand All @@ -54,7 +54,7 @@ button {
}

.da-breadcrumb-list-item-config:hover {
background-color: #147af3;
background-color: var(--s2-blue-900);
color: #FFF;
}

Expand Down Expand Up @@ -90,7 +90,7 @@ button {
}
}

@media (min-width: 900px) {
@media (width >= 900px) {
.da-breadcrumb {
margin-bottom: 12px;
display: flex;
Expand Down
40 changes: 17 additions & 23 deletions blocks/browse/da-breadcrumbs/da-breadcrumbs.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import { LitElement, html } from 'da-lit';
import { LitElement, html, nothing } from 'da-lit';
import { getNx } from '../../../scripts/utils.js';

// Styles & Icons
const getStyle = (await import(`${getNx()}/public/utils/styles.js`)).default;
const getSvg = (await import(`${getNx()}/public/utils/svg.js`)).default;

const STYLE = await getStyle(import.meta.url);
const ICONS = await getSvg({ paths: ['/blocks/browse/da-browse/img/Smock_Settings_18_N.svg'] });
const { loadStyle } = await import(`${getNx()}/utils/utils.js`);
const style = await loadStyle(import.meta.url);

export default class DaBreadcrumbs extends LitElement {
static properties = {
fullpath: { type: String },
depth: { type: Number },
details: { attribute: false },
_breadcrumbs: { state: true },
};

connectedCallback() {
super.connectedCallback();
this.shadowRoot.adoptedStyleSheets = [STYLE];
this.shadowRoot.append(...ICONS);
this.shadowRoot.adoptedStyleSheets = [style];
}

update(props) {
Expand All @@ -27,23 +21,23 @@ export default class DaBreadcrumbs extends LitElement {
}

getBreadcrumbs() {
const pathSplit = this.fullpath.split('/').filter((part) => part !== '');
const pathSplit = this.details.fullpath.split('/').filter((part) => part !== '');
this._breadcrumbs = pathSplit.map((part, idx) => ({
name: part,
path: `#/${pathSplit.slice(0, idx + 1).join('/')}`,
}));
}

renderConfig(length, crumb, idx) {
if (this.depth <= 2 && idx + 1 === length) {
return html`
<a class="da-breadcrumb-list-item-config"
href="/config${crumb.path}/"
aria-label="Config">
<svg class="da-breadcrumb-list-item-icon"><use href="#spectrum-settings"/></svg>
</a>`;
}
return null;
renderConfig(crumb) {
if (this.details.path) return nothing;
return html`
<a class="da-breadcrumb-list-item-config"
href="/config${crumb.path}/"
aria-label="Config">
<svg class="da-breadcrumb-list-item-icon" viewBox="0 0 20 20">
<use href="/img/icons/s2-icon-settings-20-n.svg#icon"/>
</svg>
</a>`;
}

render() {
Expand All @@ -54,7 +48,7 @@ export default class DaBreadcrumbs extends LitElement {
<li class="da-breadcrumb-list-item">
<div class=da-breadcrumb-list-item-link-wrapper>
<a href="${crumb.path}">${crumb.name}</a>
${this.renderConfig(this._breadcrumbs.length, crumb, idx)}
${this._breadcrumbs.length === idx + 1 ? this.renderConfig(crumb) : nothing}
</a>
</li>
`)}
Expand Down
10 changes: 5 additions & 5 deletions blocks/browse/da-browse/da-browse.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:host {
display: block;
max-width: var(--grid-container-width);
max-width: var(--se-grid-container-width);
margin: 0 auto;
padding: 80px 0;
}
Expand All @@ -19,7 +19,7 @@
padding: 0 0 6px;
margin: 0;
box-sizing: border-box;
color: rgb(143 143 143);
color: var(--s2-gray-700);
text-transform: uppercase;
font-size: 22px;
font-weight: 700;
Expand All @@ -34,12 +34,12 @@
width: 100%;
opacity: 0;
transition: opacity 0.2s ease-in-out 0s;
background: rgb(19 19 19);
background: var(--s2-gray-900);
border-radius: 3px;
}

button[aria-selected="true"] {
color: rgb(19 19 19);
color: var(--s2-gray-900);
}

button[aria-selected="true"]::after {
Expand All @@ -51,7 +51,7 @@
display: none;
}

@media (min-width: 900px) {
@media (width >= 900px) {
.da-list-header.context-browse {
display: flex;
flex-wrap: wrap;
Expand Down
Loading