feat(ext/popup): hide popout-to-tab button in fullscreen forms
The ⤴ popout button is meaningless when the form is already in vault.html — gate it on !isInTab(). Affects all seven type forms plus the type-selection screen. Regression tests cover both popup (button present) and fullscreen (button absent) contexts via it.each across all 7 forms. Plan 2026-04-30 fullscreen UX phase 1 task 7. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/// Typed-item add/edit form dispatcher. Each type's renderForm lives in
|
||||
/// its own module under ./types/. Document stays "coming soon" until γ.
|
||||
|
||||
import { navigate, getState, setState, escapeHtml, popOutToTab } from '../../shared/state';
|
||||
import { navigate, getState, setState, escapeHtml, popOutToTab, isInTab } from '../../shared/state';
|
||||
import type { Item, ItemType } from '../../shared/types';
|
||||
|
||||
const TYPE_OPTIONS: Array<{ type: ItemType; icon: string; label: string }> = [
|
||||
@@ -58,7 +58,7 @@ function renderTypeSelection(app: HTMLElement): void {
|
||||
<button class="btn" id="back-btn">← back</button>
|
||||
<h3 style="margin:0;">new item</h3>
|
||||
<span style="flex:1;"></span>
|
||||
<button class="btn" id="popout-btn" title="Open in tab">⤴</button>
|
||||
${isInTab() ? '' : '<button class="btn" id="popout-btn" title="Open in tab">⤴</button>'}
|
||||
</div>
|
||||
<div class="type-select-list">
|
||||
${TYPE_OPTIONS.map((opt) => `
|
||||
|
||||
Reference in New Issue
Block a user