feat: polish mobile agent and project interactions
This commit is contained in:
@@ -1475,11 +1475,13 @@ function syncOneLinerRunPolling() {
|
|||||||
|
|
||||||
function openOneLinerPanel() {
|
function openOneLinerPanel() {
|
||||||
ensureOneLinerUi();
|
ensureOneLinerUi();
|
||||||
|
document.body.classList.add("oneliner-open");
|
||||||
document.querySelector(".oneliner-backdrop")?.classList.remove("hidden");
|
document.querySelector(".oneliner-backdrop")?.classList.remove("hidden");
|
||||||
syncOneLinerRunPolling();
|
syncOneLinerRunPolling();
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeOneLinerPanel() {
|
function closeOneLinerPanel() {
|
||||||
|
document.body.classList.remove("oneliner-open");
|
||||||
document.querySelector(".oneliner-backdrop")?.classList.add("hidden");
|
document.querySelector(".oneliner-backdrop")?.classList.add("hidden");
|
||||||
clearOneLinerRunPollTimer();
|
clearOneLinerRunPollTimer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1255,6 +1255,13 @@ select {
|
|||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: transform 160ms ease, opacity 160ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.oneliner-open .oneliner-fab {
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transform: translateY(16px) scale(0.96);
|
||||||
}
|
}
|
||||||
|
|
||||||
.oneliner-fab-mark {
|
.oneliner-fab-mark {
|
||||||
|
|||||||
@@ -97,7 +97,10 @@ test("mobile shell removes duplicated desktop topbar and collapses the main agen
|
|||||||
|
|
||||||
test("mobile action sheets and oneliner runtime behave like bottom sheets", () => {
|
test("mobile action sheets and oneliner runtime behave like bottom sheets", () => {
|
||||||
assert.match(APP, /class="sheet-handle"/);
|
assert.match(APP, /class="sheet-handle"/);
|
||||||
|
assert.match(APP, /document\.body\.classList\.add\("oneliner-open"\)/);
|
||||||
|
assert.match(APP, /document\.body\.classList\.remove\("oneliner-open"\)/);
|
||||||
assert.match(CSS, /\.sheet-handle\s*\{/);
|
assert.match(CSS, /\.sheet-handle\s*\{/);
|
||||||
|
assert.match(CSS, /\.oneliner-open \.oneliner-fab\s*\{[\s\S]*opacity:\s*0/);
|
||||||
assert.match(CSS, /@media \(max-width: 760px\)[\s\S]*\.auth-modal,\s*[\s\S]*\.action-modal,\s*[\s\S]*\.oneliner-panel\s*\{[\s\S]*border-radius:\s*24px 24px 0 0/);
|
assert.match(CSS, /@media \(max-width: 760px\)[\s\S]*\.auth-modal,\s*[\s\S]*\.action-modal,\s*[\s\S]*\.oneliner-panel\s*\{[\s\S]*border-radius:\s*24px 24px 0 0/);
|
||||||
assert.match(CSS, /@media \(max-width: 760px\)[\s\S]*\.auth-actions\s*\{[\s\S]*position:\s*sticky/);
|
assert.match(CSS, /@media \(max-width: 760px\)[\s\S]*\.auth-actions\s*\{[\s\S]*position:\s*sticky/);
|
||||||
assert.match(CSS, /@media \(max-width: 760px\)[\s\S]*\.oneliner-composer\s*\{[\s\S]*position:\s*sticky/);
|
assert.match(CSS, /@media \(max-width: 760px\)[\s\S]*\.oneliner-composer\s*\{[\s\S]*position:\s*sticky/);
|
||||||
|
|||||||
Reference in New Issue
Block a user