feat: extend module platform with UI slots, runtime components, CLI tooling and {{userId}} search support
Completes the generic module platform that enables modules to contribute
UI elements, runtime JS components, and search resources without any
core hardcoding.
New generic UI slot types:
- topbar.right_item: module-contributed topbar buttons
- layout.body_end_template: module-contributed dialog/overlay templates
- layout.head_style: module-contributed global CSS
- runtime.component: declarative JS component registration with phase ordering
New infrastructure:
- ModuleAutoloader: PSR-4 autoloading for module-local PHP classes
- ModuleRuntimePageBuilder: symlinks module pages into runtime directory
- ModuleRuntimeAssetPublisher: publishes module CSS/JS to web/modules/
- ModulePermissionSynchronizer: syncs module permissions to DB
- CLI scripts: module-runtime-sync, module-build, module-migrate,
module-permissions-sync, module-assets-sync
- {{userId}} placeholder in SearchDataService for user-scoped search queries
- Component runtime with phased initialization (early/default/late)
- AppContainer.protectExistingBindings() to prevent module→core overwrites
- Architecture tests: ModuleStructureContractTest, CoreTemplateIsolationTest,
FrontendComponentRuntimeContractTest, AppContainerIsolationContractTest
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,34 +1,36 @@
|
||||
.page-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
@layer layout {
|
||||
.page-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.page-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-bottom: 1px solid var(--app-border);
|
||||
}
|
||||
|
||||
.page-header .app-brand img {
|
||||
height: 2.5rem;
|
||||
width: auto;
|
||||
}
|
||||
.page-header .app-brand img {
|
||||
height: 2.5rem;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.page-header nav ul {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.page-header nav ul {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
flex: 1;
|
||||
max-width: 60rem;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.5rem;
|
||||
width: 100%;
|
||||
.page-content {
|
||||
flex: 1;
|
||||
max-width: 60rem;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2769,10 +2769,6 @@
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
dialog > article > footer button {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.bi::before,
|
||||
[class^="bi-"]::before,
|
||||
[class*=" bi-"]::before {
|
||||
@@ -2791,68 +2787,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
dialog > article > header > * {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dialog > article > header .close,
|
||||
dialog > article > header :is(a, button)[rel="prev"] {
|
||||
margin: 0;
|
||||
margin-left: var(--app-spacing);
|
||||
padding: 0;
|
||||
float: right;
|
||||
}
|
||||
|
||||
dialog > article > footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
dialog > article > footer [role="button"],
|
||||
dialog > article > footer button {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dialog > article > footer [role="button"]:not(:first-of-type),
|
||||
dialog > article > footer button:not(:first-of-type) {
|
||||
margin-left: calc(var(--app-spacing) * 0.5);
|
||||
}
|
||||
|
||||
dialog > article .close,
|
||||
dialog > article :is(a, button)[rel="prev"] {
|
||||
display: block;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
margin-top: calc(var(--app-spacing) * -1);
|
||||
margin-bottom: var(--app-spacing);
|
||||
margin-left: auto;
|
||||
border: none;
|
||||
background-image: var(--app-icon-close);
|
||||
background-position: center;
|
||||
background-size: auto 1rem;
|
||||
background-repeat: no-repeat;
|
||||
background-color: transparent;
|
||||
opacity: 0.5;
|
||||
transition: opacity var(--app-transition);
|
||||
}
|
||||
|
||||
dialog
|
||||
> article
|
||||
.close:is(
|
||||
[aria-current]:not([aria-current="false"]),
|
||||
:hover,
|
||||
:active,
|
||||
:focus
|
||||
),
|
||||
dialog
|
||||
> article
|
||||
:is(a, button)[rel="prev"]:is(
|
||||
[aria-current]:not([aria-current="false"]),
|
||||
:hover,
|
||||
:active,
|
||||
:focus
|
||||
) {
|
||||
opacity: 1;
|
||||
}
|
||||
/* Dialog header/footer/close styles → web/css/components/app-dialog.css */
|
||||
|
||||
dialog:not([open]),
|
||||
dialog[open="false"] {
|
||||
|
||||
@@ -287,263 +287,4 @@
|
||||
margin-bottom: var(--app-spacing);
|
||||
}
|
||||
|
||||
.app-sidebar .app-sidebar-bookmark-item > a > i {
|
||||
flex-shrink: 0;
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.app-sidebar #aside-panel-bookmarks .app-sidebar-bookmark-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.app-sidebar #aside-panel-bookmarks .app-sidebar-bookmark-group-shell {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.app-sidebar #aside-panel-bookmarks .app-sidebar-bookmark-group-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-left: var(--app-spacing);
|
||||
}
|
||||
|
||||
.app-sidebar #aside-panel-bookmarks .app-sidebar-bookmark-group-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
color: var(--app-muted-color);
|
||||
font-size: 0.72rem;
|
||||
letter-spacing: 0.03em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.app-sidebar #aside-panel-bookmarks .app-sidebar-bookmark-group-label > span {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.app-sidebar #aside-panel-bookmarks .app-sidebar-bookmark-group-label > i {
|
||||
flex-shrink: 0;
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.app-sidebar #aside-panel-bookmarks .app-sidebar-bookmark-action-menu {
|
||||
margin: 0;
|
||||
margin-right: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
summary:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary {
|
||||
list-style: none;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--app-muted-color);
|
||||
padding: 0.25rem;
|
||||
min-width: 1.5rem;
|
||||
min-height: 1.5rem;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition:
|
||||
color 120ms ease,
|
||||
background 120ms ease,
|
||||
opacity 120ms ease;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-item:hover
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-item:focus-within
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-group-header:hover
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-group-header:focus-within
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu[open]
|
||||
> summary,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary:focus-visible {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary
|
||||
i {
|
||||
font-size: 0.95rem;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu[open]
|
||||
> summary,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary:hover,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary:focus-visible {
|
||||
color: var(--app-contrast);
|
||||
background: color-mix(in srgb, var(--app-contrast) 10%, transparent);
|
||||
}
|
||||
|
||||
@media (hover: none), (pointer: coarse) {
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu
|
||||
> summary {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.app-sidebar #aside-panel-bookmarks .app-sidebar-bookmark-action-menu-list {
|
||||
position: absolute;
|
||||
inset-inline-end: 0;
|
||||
inset-block-start: calc(100% + 4px);
|
||||
min-width: 10rem;
|
||||
max-width: calc(220px - 2 * var(--app-spacing));
|
||||
border: 1px solid var(--app-border);
|
||||
border-radius: var(--app-border-radius);
|
||||
background: var(--app-card-bg, var(--app-background-color));
|
||||
box-shadow:
|
||||
0 4px 16px rgba(0, 0, 0, 0.14),
|
||||
0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
padding: 0.25rem;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
> li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
button {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
text-align: start;
|
||||
padding: 0.375rem 0.5rem;
|
||||
margin: 0;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
button:hover,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
button:focus-visible {
|
||||
background: color-mix(in srgb, var(--app-contrast) 8%, transparent);
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
button[disabled] {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
li:has(> .app-sidebar-bookmark-action-danger) {
|
||||
margin-top: 0.2rem;
|
||||
padding-top: 0.2rem;
|
||||
border-top: 1px solid var(--app-border);
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
.app-sidebar-bookmark-action-danger {
|
||||
color: var(--app-del-color, #c62828);
|
||||
}
|
||||
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
.app-sidebar-bookmark-action-danger:hover,
|
||||
.app-sidebar
|
||||
#aside-panel-bookmarks
|
||||
.app-sidebar-bookmark-action-menu-list
|
||||
.app-sidebar-bookmark-action-danger:focus-visible {
|
||||
background: rgba(198, 40, 40, 0.12);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user