positioning

This commit is contained in:
Ben Floyd 2025-09-24 19:10:47 -06:00
parent ccb11c718f
commit 066bf1d285
2 changed files with 21 additions and 3 deletions

View file

@ -64,6 +64,8 @@ export default class StreamsPlugin extends Plugin {
// Create global stream indicator
this.createGlobalStreamIndicator();
// No need for dynamic positioning - CSS handles it automatically
this.isInitializing = false;
this.log.info('Streams plugin loaded');
}
@ -188,6 +190,8 @@ export default class StreamsPlugin extends Plugin {
new Notice('Global stream indicator refreshed');
}
});
// No positioning commands needed - CSS handles it automatically
}
private logInitialState(): void {
@ -317,6 +321,8 @@ export default class StreamsPlugin extends Plugin {
existingIndicator.remove();
}
// No observers to clean up
this.commandsByStreamId.clear();
}
@ -771,6 +777,8 @@ export default class StreamsPlugin extends Plugin {
this.createGlobalStreamIndicator();
}
}
// Positioning is now handled automatically by CSS - no JavaScript needed
/**
* Create a unique identifier for a WorkspaceLeaf

View file

@ -145,7 +145,7 @@
}
.streams-calendar-component {
position: fixed;
position: absolute;
top: 0;
left: 0;
right: 0;
@ -162,8 +162,18 @@
padding: 0 14px;
}
/* Ensure content starts below the fixed bar */
body {
/* Position relative to the content container that contains cm-panels */
.streams-markdown-view-content {
position: relative;
}
.streams-markdown-view-content .streams-calendar-component {
position: absolute;
top: 0;
}
/* Ensure content starts below the streams bar */
.view-content {
padding-top: 32px !important;
}