feat: enhance note creation and navigation UX
- Added note creation event handlers to sync selection, scrolling and focus across components - Improved context menu styling with better opacity and z-index handling - Updated mobile layout to hide search input on larger screens - Fixed focus timing issues in move-note-to-folder component - Added URL state management for newly created notes - Removed unused archived note files - Added proper note ID tracking and scroll-into-view behavior - Enhanced error
This commit is contained in:
@@ -33,7 +33,7 @@ type NoteAction =
|
||||
imports: [CommonModule],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
styles: [`
|
||||
:host { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
|
||||
:host { position: fixed; inset: 0; pointer-events: none; z-index: 2147483646; }
|
||||
.ctx {
|
||||
pointer-events: auto;
|
||||
min-width: 17.5rem;
|
||||
@@ -41,15 +41,36 @@ type NoteAction =
|
||||
border-radius: 1rem;
|
||||
padding: 0.5rem 0;
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,.25);
|
||||
backdrop-filter: blur(6px);
|
||||
/* Ensure the menu is fully opaque (no translucency) */
|
||||
-webkit-backdrop-filter: none;
|
||||
backdrop-filter: none;
|
||||
position: relative; /* for cover layer */
|
||||
isolation: isolate; /* prevent blending with background */
|
||||
mix-blend-mode: normal;
|
||||
overflow: hidden; /* clip inner cover to rounded corners */
|
||||
animation: fadeIn .12s ease-out;
|
||||
transform-origin: top left;
|
||||
user-select: none;
|
||||
background: var(--card, #ffffff);
|
||||
/* Use theme variable for solid background (themes define solid hex for --card) */
|
||||
background: var(--card) !important;
|
||||
background-clip: padding-box;
|
||||
opacity: 1 !important;
|
||||
filter: none !important;
|
||||
border: 1px solid var(--border, #e5e7eb);
|
||||
color: var(--text-main, var(--fg, #111827));
|
||||
z-index: 10000;
|
||||
z-index: 2147483647;
|
||||
}
|
||||
/* Opaque cover to defeat any inherited translucency */
|
||||
.ctx::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: var(--card);
|
||||
border-radius: inherit;
|
||||
z-index: 0; /* stays behind menu content but inside .ctx */
|
||||
}
|
||||
.ctx > * { position: relative; z-index: 1; }
|
||||
/* Theme colors come from CSS variables; no hardcoded dark override needed */
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -266,6 +287,14 @@ export class NoteContextMenuComponent implements OnChanges, OnDestroy {
|
||||
// listeners globaux qui ferment le menu
|
||||
this.removeResize = this.r2.listen('window', 'resize', () => this.reposition());
|
||||
this.removeScroll = this.r2.listen('window', 'scroll', () => this.reposition());
|
||||
|
||||
// Move host to document.body to escape any transformed/opacity ancestors
|
||||
try {
|
||||
const el = this.host.nativeElement;
|
||||
if (el && el.parentElement !== document.body) {
|
||||
document.body.appendChild(el);
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
|
||||
Reference in New Issue
Block a user