[0.9.1] FORK_IA_UX: thumb-zone navigation — hive bottom-sheet + publish FAB + reordered bar
Mobile-usability experiment grounded in real studies (Hoober 2013, Bergstrom-Lehtovirta CHI 2011, Parhi 2006 target size, NN/g 2016 visible nav): - The hive (categories + modules) opens from the bottom bar as a thumb-reachable bottom-sheet (checkbox-hack, no JS), freeing the top for content. - Bottom bar reordered: Explore, PM, (+) publish FAB, Search, Inbox; the central FAB is the distinct, elevated primary action. - Network/status quick row (Peers, Graphos, Inbox, Settings) inside the sheet. - Tap targets >=48px. Additive and gated by OASIS_MOBILE (Linux untouched).
This commit is contained in:
parent
ed9f01e8e6
commit
745c340917
2 changed files with 122 additions and 18 deletions
|
|
@ -1169,26 +1169,29 @@ exports.PINNABLE_MODULES = PINNABLE_MODULES;
|
|||
const renderBottomBar = () => {
|
||||
if (process.env.OASIS_MOBILE !== '1') return "";
|
||||
const inboxN = sharedState.getInboxCount();
|
||||
const cfg = getConfig();
|
||||
const modOn = (m) => !m || cfg.modules[m] === 'on' || cfg.modules[m] === undefined;
|
||||
const bbLink = (href, ico, label, badge) => a(
|
||||
const bbLink = (href, ico, lbl, badge) => a(
|
||||
{ class: "bb-item", href },
|
||||
span({ class: "bb-ico" }, ico),
|
||||
(badge && badge > 0) ? span({ class: "bb-badge" }, String(badge)) : "",
|
||||
span({ class: "bb-lbl" }, label)
|
||||
span({ class: "bb-lbl" }, lbl)
|
||||
);
|
||||
// FORK_IA_UX (thumb-zone): Explorar (abre el hive en hoja inferior) · PM · (+) publicar FAB · Search · Inbox
|
||||
const exploreBtn = label(
|
||||
{ class: "bb-item bb-explore", for: "fork-explore-toggle", "aria-label": "Explore" },
|
||||
span({ class: "bb-ico" }, "☰"),
|
||||
span({ class: "bb-lbl" }, "Explore")
|
||||
);
|
||||
const fab = a(
|
||||
{ class: "bb-fab-btn", href: "/publish", "aria-label": "Write" },
|
||||
span({ class: "bb-fab-glyph" }, "+")
|
||||
);
|
||||
// barra inferior FIJA (estilo epsylon): Inbox · PM · Write · Search · Graphos · Peers
|
||||
const items = [
|
||||
bbLink("/inbox", "☂", "Inbox", inboxN),
|
||||
bbLink("/pm", "✉", "PM"),
|
||||
bbLink("/publish", "✎", "Write"),
|
||||
bbLink("/search", "ꔅ", "Search"),
|
||||
bbLink("/graphos", "◈", "Graphos"),
|
||||
bbLink("/peers", "⧖", "Peers"),
|
||||
];
|
||||
return nav(
|
||||
{ class: "oasis-bottombar oasis-bottombar-fixed", "aria-label": i18n.bbQuickActions || "Quick actions" },
|
||||
...items
|
||||
{ class: "oasis-bottombar oasis-bottombar-fixed oasis-bottombar-fork", "aria-label": i18n.bbQuickActions || "Quick actions" },
|
||||
exploreBtn,
|
||||
bbLink("/pm", "✉", "PM"),
|
||||
fab,
|
||||
bbLink("/search", "ꔅ", "Search"),
|
||||
bbLink("/inbox", "☂", "Inbox", inboxN)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -1258,6 +1261,33 @@ const renderHiveNav = () => {
|
|||
};
|
||||
exports.renderHiveNav = renderHiveNav;
|
||||
|
||||
// FORK_IA_UX: el hive vive en una HOJA INFERIOR (bottom-sheet) alcanzable con el pulgar; sin JS (checkbox-hack).
|
||||
// Un checkbox oculto (#fork-explore-toggle) y la hoja son hermanos dentro de .fork-sheet-wrap (display:contents),
|
||||
// así `#fork-explore-toggle:checked ~ .hive-sheet` la despliega; el botón "Explore" de la barra es su <label>.
|
||||
const renderHiveSheet = () => {
|
||||
if (process.env.OASIS_MOBILE !== '1') return "";
|
||||
const q = (href, ico, lbl) => a({ class: "hsq-item", href },
|
||||
span({ class: "hsq-ico" }, ico), span({ class: "hsq-lbl" }, lbl));
|
||||
return div({ class: "fork-sheet-wrap" },
|
||||
input({ type: "checkbox", id: "fork-explore-toggle", class: "fork-sheet-toggle" }),
|
||||
div({ class: "hive-sheet" },
|
||||
label({ class: "hive-sheet-backdrop", for: "fork-explore-toggle", "aria-label": "Close" }),
|
||||
div({ class: "hive-sheet-panel" },
|
||||
label({ class: "hive-sheet-grip", for: "fork-explore-toggle", "aria-label": "Close" }),
|
||||
// accesos que no están en el hive (CATS): red y estado
|
||||
div({ class: "hive-sheet-quick" },
|
||||
q("/peers", "⧖", "Peers"),
|
||||
q("/graphos", "◈", "Graphos"),
|
||||
q("/inbox", "☂", "Inbox"),
|
||||
q("/settings", "⚙", "Settings")
|
||||
),
|
||||
renderHiveNav()
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
exports.renderHiveSheet = renderHiveSheet;
|
||||
|
||||
const template = (titlePrefix, ...elements) => {
|
||||
const currentConfig = getConfig();
|
||||
const theme = currentConfig.themes.current || "Dark-SNH";
|
||||
|
|
@ -1290,10 +1320,10 @@ const template = (titlePrefix, ...elements) => {
|
|||
body(
|
||||
div(
|
||||
{ class: uxMode === "ainav" ? "header ainav-only" : "header" },
|
||||
renderMobileTopbar(),
|
||||
// hive global: los hexágonos salen en TODAS las páginas y SCROLLEAN bajo la topbar fija (antes solo en /activity)
|
||||
renderHiveNav()
|
||||
renderMobileTopbar()
|
||||
),
|
||||
// FORK_IA_UX: el hive se abre desde la barra inferior como HOJA alcanzable (thumb-zone), liberando el top para el contenido
|
||||
renderHiveSheet(),
|
||||
(() => {
|
||||
const updateFlagPath = path.join(__dirname, '../server/.update_required');
|
||||
if (fs.existsSync(updateFlagPath)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue