Skip to content

Commit 57cf72d

Browse files
Hide explorer toggle button when file explorer panel is open (#19)
1 parent 4f907eb commit 57cf72d

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

RELEASES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Releases
22

3+
## 1.3.1
4+
5+
### Fixes
6+
- **Angle brackets in tables**`<` and `>` in table cells and paragraphs no longer break rendering.
7+
- **File explorer toggle** — Toggle button no longer bleeds through the open explorer panel.
8+
9+
---
10+
311
## 1.3.0
412

513
### New features

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@
756756
class="px-4 py-2.5 bg-white border-b border-gray-200 flex items-center justify-between shrink-0"
757757
>
758758
<div class="flex items-center gap-2">
759-
<button id="explorerToggle" class="opacity-50 hover:opacity-80 text-gray-500 transition-all hidden lg:block relative z-40" title="Toggle file explorer (Ctrl+B)">
759+
<button id="explorerToggle" class="opacity-50 hover:opacity-80 text-gray-500 transition-all hidden lg:block" title="Toggle file explorer (Ctrl+B)">
760760
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
761761
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/>
762762
</svg>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "md2docx",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Professional Markdown to DOCX/PDF/HTML converter",
55
"type": "module",
66
"scripts": {

src/file-explorer/ui.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,6 @@ export function toggleExplorer(forceState) {
224224
localStorage.setItem("md2docx-explorer-open", _isOpen);
225225
} catch {}
226226

227-
const toggleBtn = document.getElementById("explorerToggle");
228-
if (toggleBtn) {
229-
toggleBtn.style.opacity = _isOpen ? "1" : "";
230-
toggleBtn.style.color = _isOpen ? "#f97c00" : "";
231-
}
232-
233227
return _isOpen;
234228
}
235229

tests/features/ui/file-explorer.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Feature: File explorer
77
Scenario: Explorer panel is hidden by default
88
Then the file explorer panel should not be visible
99

10-
Scenario: Explorer toggle button opens and closes the panel
10+
Scenario: Explorer panel opens via toggle and closes via close button
1111
When I click the explorer toggle button
1212
Then the file explorer panel should be visible
1313
And the file list should contain 1 document
1414
And the document "main.md" should be listed
15-
When I click the explorer toggle button
15+
When I click the explorer close button
1616
Then the file explorer panel should not be visible
1717

1818
Scenario: Ctrl+B outside editor toggles the explorer

tests/steps/file-explorer.steps.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ When("I click the explorer toggle button", async ({ page }) => {
1818
await btn.click();
1919
});
2020

21+
When("I click the explorer close button", async ({ page }) => {
22+
await page.locator("#explorerClose").click();
23+
});
24+
2125
When("I click outside the editor", async ({ page }) => {
2226
await page.locator("#preview").click({ position: { x: 10, y: 10 } });
2327
await page.evaluate(() => {

0 commit comments

Comments
 (0)