Skip to content

feat: add ability to expand/collapse editor plugins sidebar (closes #93)#94

Open
danyill wants to merge 2 commits into
OMICRONEnergyOSS:mainfrom
danyill:issue-93-fold-editors
Open

feat: add ability to expand/collapse editor plugins sidebar (closes #93)#94
danyill wants to merge 2 commits into
OMICRONEnergyOSS:mainfrom
danyill:issue-93-fold-editors

Conversation

@danyill
Copy link
Copy Markdown
Contributor

@danyill danyill commented Mar 22, 2026

I wonder if this is close to acceptable (closes #93)

The CSS rules are not quite enough for generic icon sizes controlled by variables...

As a drive by since code test coverage was so high I added something for the menu bar appIcon (which I only recently discovered).

I've tried to make the component control it's own state without requiring anything from oscd-shell.

class="toggle-sidebar"
role="button"
tabindex="0"
@click=${() => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter demanded I do this.

:host([expanded]) {
width: var(--editor-plugins-panel-width);
.toggle-sidebar {
margin-left: 12px;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect this is not generic with change in icon size...

display: flex;
align-items: center;
min-height: 56px;
padding-left: calc(var(--editor-plugins-panel-item-leading-space) - 6px);
Copy link
Copy Markdown
Contributor Author

@danyill danyill Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect these two lines are likely not generic with change in icon size...

Copy link
Copy Markdown
Contributor Author

@danyill danyill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small notes.

@@ -78,6 +82,7 @@ export class EditorPluginsPanel extends ScopedElementsMixin(LitElement) {
<div class="footer">
Copy link
Copy Markdown
Contributor Author

@danyill danyill Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose I could have tried to include this as an oscd-list-item which would avoid perhaps some styling consistency issues but I shall await review. Might create more issues (placing at the bottom) than it would solve.

@danyill danyill force-pushed the issue-93-fold-editors branch from 9a8d739 to 1f15191 Compare March 26, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fold away editors panel

1 participant